BlockchainSource (Thu, 09 Feb 2017 09:33:59 GMT):
Has joined the channel.

caylen (Thu, 09 Feb 2017 09:38:13 GMT):
Has joined the channel.

bur (Thu, 09 Feb 2017 09:46:17 GMT):
Has joined the channel.

nickmelis (Thu, 09 Feb 2017 12:10:39 GMT):
Has joined the channel.

rahulhegde (Thu, 09 Feb 2017 14:49:45 GMT):
Has joined the channel.

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

silliman (Thu, 09 Feb 2017 17:19:53 GMT):
Has joined the channel.

subbu165 (Thu, 09 Feb 2017 17:38:14 GMT):
Has joined the channel.

theathibm (Thu, 09 Feb 2017 21:05:24 GMT):
Has joined the channel.

jkirke (Thu, 09 Feb 2017 21:30:10 GMT):
Has joined the channel.

OlufAndrews (Thu, 09 Feb 2017 23:32:40 GMT):
Has joined the channel.

siddhid (Fri, 10 Feb 2017 08:41:42 GMT):
Has joined the channel.

mayerwa (Fri, 10 Feb 2017 19:49:50 GMT):
Has joined the channel.

macribas (Sat, 11 Feb 2017 16:54:09 GMT):
Has joined the channel.

Honglei (Mon, 13 Feb 2017 05:17:29 GMT):
Has joined the channel.

thojest (Mon, 13 Feb 2017 09:51:58 GMT):
Has joined the channel.

nhrishi (Mon, 13 Feb 2017 12:56:30 GMT):
Has joined the channel.

nhrishi (Mon, 13 Feb 2017 13:04:09 GMT):
Hi, I was wondering if chaincode has an API functions for user/application to explicitly sign and verify the content and send it as part of the transaction. Example - If a legal contract is deployed using a chaincode, we need participant to sign on the legal contract content. Can anyone pls advise.

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

pmullaney (Mon, 13 Feb 2017 21:17:32 GMT):
Has joined the channel.

zemtsov (Tue, 14 Feb 2017 12:56:01 GMT):
Has joined the channel.

zemtsov (Tue, 14 Feb 2017 12:56:38 GMT):
Hello everybody. What is the best way to debug chaincode? Which tools can be used for it?

ray (Wed, 15 Feb 2017 03:52:16 GMT):
Has joined the channel.

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

PatisP (Wed, 15 Feb 2017 13:38:51 GMT):
Has joined the channel.

bobbiejc (Wed, 15 Feb 2017 14:16:59 GMT):
Has joined the channel.

nickmelis (Wed, 15 Feb 2017 15:38:21 GMT):
how would you implement a unique id generator (possibly for an incrementing sequence number) within the chaincode? I was thinking about using a variable in the state to keep track of the latest sequence number but how would you ensure it is read/written in an atomic way across nodes?

zemtsov (Wed, 15 Feb 2017 18:47:28 GMT):
It is probably better to generate it on client side

zemtsov (Wed, 15 Feb 2017 18:47:39 GMT):
like it is done in car-lease-demo project

zemtsov (Wed, 15 Feb 2017 18:48:46 GMT):
but if you don't use random numbers and just increment a value, then you can save the last used ID and get the new one based on it.

munapower (Wed, 15 Feb 2017 21:06:09 GMT):
Has joined the channel.

ThomasB (Wed, 15 Feb 2017 23:17:02 GMT):
Has joined the channel.

saifulislamsaaif (Thu, 16 Feb 2017 07:54:37 GMT):
Has joined the channel.

knagware9 (Thu, 16 Feb 2017 09:28:29 GMT):
Has joined the channel.

wutongtree (Thu, 16 Feb 2017 09:47:30 GMT):
Has joined the channel.

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

vigneswaran.r (Thu, 16 Feb 2017 13:50:13 GMT):
Has joined the channel.

vigneswaran.r (Thu, 16 Feb 2017 13:58:57 GMT):
Hello.. In Fabric v0.6.1-preview, is there any way to execute some function inside the chaincode, at a specific date/time automatically? eg., in a share market usecase, can we do calculation and transfer of dividend at a specific day, time of every month/quarter etc? or is it better to have an external application that invokes a transaction on the chaincode to do the necessary calculation and transfer?

nickmelis (Thu, 16 Feb 2017 14:07:21 GMT):
I think you'll need an oracle for that

alviontaran (Thu, 16 Feb 2017 16:15:50 GMT):
Has joined the channel.

farhan3 (Thu, 16 Feb 2017 20:27:38 GMT):
Has joined the channel.

farhan3 (Thu, 16 Feb 2017 20:28:25 GMT):
Hi - in v1.0, does chaincode need to run in a container or can it run as a process? More specifically in "production". What is recommended, container or process?

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

vigneswaran.r (Fri, 17 Feb 2017 04:03:28 GMT):
@nickmelis Ok. Thank you.

karan-bharadwaj (Fri, 17 Feb 2017 08:32:57 GMT):
Has joined the channel.

karan-bharadwaj (Fri, 17 Feb 2017 08:35:48 GMT):
hey guys, i have a few basic questions about deploying chaincode?

karan-bharadwaj (Fri, 17 Feb 2017 08:35:54 GMT):
so how exactly are the init invoke and query functions called? where are they called? I'm assuming init and invoke are called automatically right? also how can i pass args []string to the chaincode?

zemtsov (Fri, 17 Feb 2017 12:25:46 GMT):
@karan-bharadwaj yes, they are called when you deploy or invoke your chaincode.

zemtsov (Fri, 17 Feb 2017 12:27:11 GMT):
and when you do this, for example, with Node SDK, you make a request which is sending to a peer. This request contains some parameters like chaincode ID, function to call and *arguments*

karan-bharadwaj (Fri, 17 Feb 2017 14:13:57 GMT):
@zemtsov right, thanks.

tdietter (Fri, 17 Feb 2017 18:48:42 GMT):
Has joined the channel.

xbee (Sat, 18 Feb 2017 10:42:23 GMT):
Has joined the channel.

rickr (Sat, 18 Feb 2017 11:58:06 GMT):
Has joined the channel.

sidiyer (Sat, 18 Feb 2017 19:57:02 GMT):
Has joined the channel.

ThomasB (Sun, 19 Feb 2017 00:04:05 GMT):
What's the best Hyperledger example to start learning how to work with chain code?

zemtsov (Sun, 19 Feb 2017 06:45:55 GMT):
@ThomasB Hi, it is hard to say which one is the best. Try this: https://github.com/IBM-Blockchain/learn-chaincode

zemtsov (Sun, 19 Feb 2017 06:46:58 GMT):
There are some other examples in IBM blockchain repo (https://github.com/IBM-Blockchain)

alexliu (Sun, 19 Feb 2017 11:22:00 GMT):
Has joined the channel.

ascatox (Mon, 20 Feb 2017 09:50:43 GMT):
Has joined the channel.

ascatox (Mon, 20 Feb 2017 09:50:47 GMT):
Hi all

ascatox (Mon, 20 Feb 2017 09:50:57 GMT):
I've a question to submit

ascatox (Mon, 20 Feb 2017 09:51:12 GMT):
Is it possible in fabric to clone chaincodes?

zemtsov (Mon, 20 Feb 2017 09:53:22 GMT):
To have two same ones?

ascatox (Mon, 20 Feb 2017 09:54:40 GMT):
My idea is having a set of chaincodes

ascatox (Mon, 20 Feb 2017 09:54:45 GMT):
like templates

ascatox (Mon, 20 Feb 2017 09:54:58 GMT):
and using these to clone other ones

ascatox (Mon, 20 Feb 2017 09:55:26 GMT):
the clone could be changed

ascatox (Mon, 20 Feb 2017 09:55:26 GMT):
the clones could be changed

ascatox (Mon, 20 Feb 2017 09:56:10 GMT):
leaving in the initial state the "templates"

zemtsov (Mon, 20 Feb 2017 09:57:09 GMT):
I guess the best way is to modify the code outside blockchain and deploy different versions

ascatox (Mon, 20 Feb 2017 10:00:34 GMT):
Ok thanks

ascatox (Mon, 20 Feb 2017 10:01:08 GMT):
I was thinking there was a cloning functionality inside Hyperledger/Fabric

ascatox (Mon, 20 Feb 2017 10:01:17 GMT):
but I'm wrong

ascatox (Mon, 20 Feb 2017 10:01:17 GMT):
but I was wrong

zemtsov (Mon, 20 Feb 2017 10:02:51 GMT):
When you deploy you chaincode to Fabric, it is compiling.

ascatox (Mon, 20 Feb 2017 10:11:28 GMT):
Thanks again!!!

ascatox (Mon, 20 Feb 2017 10:32:03 GMT):
From the official doc http://hyperledger-fabric.readthedocs.io/en/latest/FAQ/chaincode_FAQ/

ascatox (Mon, 20 Feb 2017 10:32:41 GMT):
How do I create a business contract using the fabric? the second way, and probably the more efficient way, is to use chaincode to create decentralized applications that manage the life cycle of one or multiple types of business contracts, and let end users instantiate instances of contracts within these applications.

ascatox (Mon, 20 Feb 2017 10:33:27 GMT):
Can you give me an example about using use chaincode to create decentralized applications

ascatox (Mon, 20 Feb 2017 10:33:27 GMT):
Can you give me an example about using chaincode to create decentralized applications

ascatox (Mon, 20 Feb 2017 10:33:27 GMT):
Can you give me an example or a doc about using chaincode to create decentralized applications

zemtsov (Mon, 20 Feb 2017 11:12:39 GMT):
Chaincode should implement all your business logic.

zemtsov (Mon, 20 Feb 2017 11:13:40 GMT):
I provided the link above: https://github.com/IBM-Blockchain/learn-chaincode

zemtsov (Mon, 20 Feb 2017 11:14:01 GMT):
It is probably a good example to understand how chaincode works

ascatox (Mon, 20 Feb 2017 11:41:01 GMT):
Thanks a lot

ascatox (Mon, 20 Feb 2017 11:41:01 GMT):
Thanks a lot!!!

thojest (Mon, 20 Feb 2017 12:02:10 GMT):
hey i have a very specific question

thojest (Mon, 20 Feb 2017 12:02:47 GMT):
when you use floating point numbers it is possible that they are to some degree not exact

thojest (Mon, 20 Feb 2017 12:04:22 GMT):
so supposed i have a chaincode using floating point numbers and want to store them on the blockchain... how is it made sure that all nodes find a consensus regarding the possible 'noise' in floating point numbers

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

yury (Mon, 20 Feb 2017 12:53:07 GMT):
Hi, can I add methods to 'qscc' for validate block and validate blockchain?

yury (Mon, 20 Feb 2017 12:53:07 GMT):
Hi, can I add two methods to 'qscc' for ValidateBlock and ValidateBlockchain?

nickmelis (Mon, 20 Feb 2017 14:24:54 GMT):
@all: I started getting this message today when deploying Java chaincode: > vp0_1 | 14:23:50.565 [dockercontroller] deployImage -> ERRO 188 Error building images: Tag latest not found in repository docker.io/hyperledger/fabric-javaenv

nickmelis (Mon, 20 Feb 2017 14:25:06 GMT):
where did it go?

zemtsov (Mon, 20 Feb 2017 14:26:11 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=LtAuXGRTTLc9CtcXN) @nickmelis try to pull x86_64-0.6.1 tag and then retag it to latest https://hub.docker.com/r/hyperledger/fabric-javaenv/tags/

nickmelis (Mon, 20 Feb 2017 14:27:33 GMT):
I haven't done that before, what has changed?

LordChaos (Mon, 20 Feb 2017 23:56:42 GMT):
Has joined the channel.

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

huxiangdong (Tue, 21 Feb 2017 02:58:14 GMT):
Has joined the channel.

Senthil1 (Tue, 21 Feb 2017 05:21:37 GMT):
Has joined the channel.

bercinho (Tue, 21 Feb 2017 10:32:48 GMT):
Has joined the channel.

bercinho (Tue, 21 Feb 2017 10:34:26 GMT):
Dear Gents, does anyone know how to browse the Blocks in the Ledger of Hyperledger (including the data) and not the Worldstate? I guess this requires "admin" rights. But I do want to have a historical view on transactions and also access to the data somehow. Any suggestions? Many thanks

zemtsov (Tue, 21 Feb 2017 13:12:46 GMT):
@bercinho to browse the blockchain there is a blockchain-explorer tool in the incubation https://github.com/hyperledger/blockchain-explorer To see transactions data, I guess, you need to be an auditor. Take a look at car-lease-demo example. There is a Regulator view which shows history of all transactions with details. https://github.com/ibm-blockchain/car-lease-demo

kofman.alex@gmail.com (Tue, 21 Feb 2017 14:25:26 GMT):
Has joined the channel.

bercinho (Tue, 21 Feb 2017 16:11:44 GMT):
Hi @zemtsov thanks for your feedback! The explorer is quite useless in a sense, you don´t have access to the data, so apart from seeing transactions and blocks completing, there ain´t much more. Will look into the demo to see the Regulator view, thanks for advice! :)

arner (Tue, 21 Feb 2017 19:24:12 GMT):
Has joined the channel.

arner (Tue, 21 Feb 2017 19:29:23 GMT):
Hi all, we're facing an interesting challenge. We need to import a large amount of (json encoded) items, process them and store them in the worldstate. There are so many items that we run into an execution timeout on the peer and the transaction fails. We’d prefer to not split the items up and have limited options in reducing processing time per item. Can we increase the timeout or is there another smart way of solving this? (We’re on 0.6 currently but answers for V1 are also welcome). Thanks!

mmani99 (Wed, 22 Feb 2017 03:29:22 GMT):
Has joined the channel.

zemtsov (Wed, 22 Feb 2017 07:19:25 GMT):
Hi, where do you import items from?

arner (Wed, 22 Feb 2017 08:30:22 GMT):
We just call an invoke with the json as payload (it's originally an uploaded file)

bercinho (Wed, 22 Feb 2017 08:33:32 GMT):
Hi @zemtsov, I don´t really get from the car-lease-demo what APIs are available to investigate the ledger itself, browse through the blocks and transactions within. I would need either an API on the Chaincode level (preferably Java) or something in Node.JS in the HFC ... do you know about the APIs I may use? Thanks, Bert

Ying (Wed, 22 Feb 2017 08:35:26 GMT):
Anyone tried fabric\examples\chaincode\go\marbles02? I got an interface undefined error when call init via cli chaincode deploy: src/github.com/hyperledger/fabric/examples/marbles02/marbles_chaincode.go:320: stub.GetStateByPartialCompositeKey undefined (type shim.ChaincodeStubInterface has no field or method GetStateByPartialCompositeKey) src/github.com/hyperledger/fabric/examples/marbles02/marbles_chaincode.go:476: stub.GetHistoryForKey undefined (type shim.ChaincodeStubInterface has no field or method GetHistoryForKey) Is it caused by wrong version of fabric\core\chaincode\shim\interfaces.go? Thanks.

zemtsov (Wed, 22 Feb 2017 08:37:26 GMT):
Hi @bercinho. Take a look at this file: https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Server_Side/blockchain/transactions/CRUD/read.js REST API is used to get transactions info from blocks

bercinho (Wed, 22 Feb 2017 09:38:24 GMT):
Hi @zemtsov, the REST APIs you refer to is exactly what the Blockchain Explorer utilizes, and I guess what we see in the Blockchain Explorer is as far as we can go looking at the Hyperledger blockchain. My problem is this doesn´t provide for a particular user identity a historical human- readable semantic audit log into his interaction with the Blockchain ... The Blockchian Explorer is not restricted to a particular identity, but it would be quite valuable for a particular identity to allow a richer view from his perspective on the Blockchain in respectvie to transactions he has submitted and have been added to the Blockchain in terms of data (maybe even change in the World State). ... now either this audit log for certain users may be built up off-chain, but then we introduce some security & reliability concerns OR we can have specific structures & chaincode to implement such a view and align it with all business transactions. How would you provide such a "historical audit log" to a particular user on the blockchain & transactions?

zemtsov (Wed, 22 Feb 2017 09:51:35 GMT):
So, did I get it right? You want to see not only a list of transactions in block but what is in transaction's payload, right?

zemtsov (Wed, 22 Feb 2017 09:54:39 GMT):
This is how Regulator view looks like in the car-lease-demo:

zemtsov (Wed, 22 Feb 2017 09:54:52 GMT):

Message Attachments

zemtsov (Wed, 22 Feb 2017 09:55:20 GMT):
This is parsed information from transactions. Is it what you're looking for?

dragosh (Wed, 22 Feb 2017 10:38:40 GMT):
Has joined the channel.

zemtsov (Wed, 22 Feb 2017 10:45:58 GMT):
Hi @Ying. Yes, looks like it is about the version on Fabric you use. Which is it? 0.6?

zemtsov (Wed, 22 Feb 2017 10:45:58 GMT):
Hi @Ying Yes, looks like it is about the version on Fabric you use. Which is it? 0.6?

zemtsov (Wed, 22 Feb 2017 10:45:58 GMT):
Hi @Ying Yes, looks like it is about the version of Fabric you use. Which is it? 0.6?

bercinho (Wed, 22 Feb 2017 12:20:27 GMT):
Hi @zemtsov this looks exactly what I am looking for as it cotnains the details of the transactions. Nevertheless when I look at the REST API reference (https://github.com/hyperledger/fabric/blob/master/docs/protocol-spec.md#3121-transaction-data-structure) it says "TransactionPayload.payload - Bytes defining the payload of the transaction. As the payload can be large, only the payload hash is included directly in the transaction message." so you might have lack of data; The Regulator must have special rights in membersrvc.yaml auditor or admin to have such insight?

zemtsov (Wed, 22 Feb 2017 13:02:02 GMT):
@bercinho I'm not sure what to say :) that code woks. It just converts transaction's payload to ascii and then parses it in https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Client_Side/JavaScript/ledger/ledger.js I guess there should be more details about it

zemtsov (Wed, 22 Feb 2017 13:02:02 GMT):
@bercinho I'm not sure what to say :) that code works. It just converts transaction's payload to ascii and then parses it in https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Client_Side/JavaScript/ledger/ledger.js I guess there should be more details about it

bercinho (Wed, 22 Feb 2017 15:00:00 GMT):
Hi @zemtsov what I meant is that the documentation of the API states that you don´t have payload data of the transaction, just a hash of it ... it´s not accurate in this sense as according to your example the payload is actually given back.

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

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

davidkel (Wed, 22 Feb 2017 16:46:13 GMT):
Has joined the channel.

sanchezl (Wed, 22 Feb 2017 18:12:40 GMT):
Has joined the channel.

bart.cant@gmail.com (Wed, 22 Feb 2017 23:35:20 GMT):
Has joined the channel.

Ying (Thu, 23 Feb 2017 00:46:17 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=AMYQh4KomJx7GwY9T) @zemtsov I'm using docker images as the 1.0 stater guide mentioned. Now trying to build the master source code, hope it solve my problem:)

dayubian (Thu, 23 Feb 2017 01:26:12 GMT):
Has joined the channel.

bartcant (Thu, 23 Feb 2017 02:12:00 GMT):
Has joined the channel.

kdj (Thu, 23 Feb 2017 16:49:29 GMT):
Has joined the channel.

CarlXK (Fri, 24 Feb 2017 01:59:33 GMT):
Has joined the channel.

DannyWong (Fri, 24 Feb 2017 11:24:22 GMT):
Has joined the channel.

DannyWong (Fri, 24 Feb 2017 11:25:06 GMT):
hello, is it possible to specify "contract variable" like Ethereum Solidity (although they only allow max 16 of them)?

DannyWong (Fri, 24 Feb 2017 11:25:20 GMT):
or we need to put everything in State?

slender (Sat, 25 Feb 2017 00:43:27 GMT):
Has joined the channel.

Gouravchawla (Sat, 25 Feb 2017 03:17:22 GMT):
Has joined the channel.

jfiscella (Sat, 25 Feb 2017 05:37:26 GMT):
Has joined the channel.

rrader (Sat, 25 Feb 2017 14:52:30 GMT):
Has joined the channel.

itamar-m (Sat, 25 Feb 2017 15:05:29 GMT):
Has joined the channel.

wisam.mohammed (Sun, 26 Feb 2017 03:07:55 GMT):
Has joined the channel.

zemtsov (Mon, 27 Feb 2017 07:24:46 GMT):
Hi @DannyWong. What is this "contract variable" for?

vinodsankar (Mon, 27 Feb 2017 09:31:39 GMT):
Has joined the channel.

greg.haskins (Mon, 27 Feb 2017 13:50:41 GMT):
Has joined the channel.

DannyWong (Tue, 28 Feb 2017 14:46:50 GMT):
@zemtsov I figured out. Ethereum Solidity has a limit on local variable (inside method), depending on variable type size... typical max. no is 16 in solidity. In Solidity, the state of instance variables defined will be stored as well. In HL, the instance variable we defined are still stateless. If we need to persist anything (being stateful), we need to store with shim.putState(key, value).

DannyWong (Tue, 28 Feb 2017 14:46:52 GMT):
thank you.

kletkeman (Tue, 28 Feb 2017 16:42:20 GMT):
Has joined the channel.

kletkeman (Tue, 28 Feb 2017 16:44:04 GMT):
Wow ... just getting into the port of our IoT contract platform to v1 and it is a total bummer that we already had our own composite keys and history and queries with iterators. Because the stub has changed completely with incompatible implementations of all of that ... the term "bleeding edge" could not be more apropos :-)

kletkeman (Tue, 28 Feb 2017 16:45:34 GMT):
@DannyWong Yes, it is an absolute that contract state shall never be maintained in memory. Every transaction or query is completely new and all state must be persisted in world state.

DannyWong (Tue, 28 Feb 2017 16:49:05 GMT):
Yeah right. Actually, i am doing some kind of comparison for my project on Ethereum Solidity and HL

DannyWong (Tue, 28 Feb 2017 16:50:54 GMT):
i think one of the key benefit of Solidity is the OO concept and contract native language design

DannyWong (Tue, 28 Feb 2017 16:51:46 GMT):
but we knew that chaincode-to-chaincode invocation (write) is coming now,.... read is already available

DannyWong (Tue, 28 Feb 2017 16:52:16 GMT):
if we can have something like "msg.sender" in Ethereum in HL, then we can do some kind of "trust" chain code chain call easily

DrTES (Tue, 28 Feb 2017 17:59:10 GMT):
Has joined the channel.

kletkeman (Tue, 28 Feb 2017 18:45:36 GMT):
@DannyWong Chaincode must be installed on peers that can receive the contract invokes. The chaincode must be associated with a channel explicitly (as in deployed to it). And every user access requires a tcert be obtained ahead of time. Channels can be private between tow or more parties. With all of that, what more "trust" were you looking for?

kletkeman (Tue, 28 Feb 2017 18:45:36 GMT):
@DannyWong Chaincode must be installed on peers that can receive the contract invokes. The chaincode must be associated with a channel explicitly (as in deployed to it). And every user access requires a tcert be obtained ahead of time. Channels can be private between two or more parties. With all of that, what more "trust" were you looking for?

l1nux (Tue, 28 Feb 2017 22:42:58 GMT):
Has joined the channel.

snowy13 (Tue, 28 Feb 2017 22:57:55 GMT):
Has joined the channel.

pospi (Wed, 01 Mar 2017 00:21:12 GMT):
Can anyone tell me how to override the logging level of a 0.6 chaincode with an environment variable? I have been trying the instructions at https://github.com/hyperledger/fabric/blob/bb41bbcc9f76154bdea834b51d1f87a3f95a6c4a/docs/Setup/logging-control.md but if I try to call `shim.SetLoggingLevel` before `shim.Start` with a value other than "DEBUG" it seems to crash... and setting it after the call to `.Start` has no effect

kletkeman (Wed, 01 Mar 2017 04:27:39 GMT):
@channel I got no answer to the following questions on the fabric channel, so perhaps this is a better channel for these. I watched the video "Hyperledger install & instantiate code" today, and was left with some questions. 1) If I understand the video, endorsers require install of chaincode in order to execute invokes. But what about queries? Do observers require install of chaincode so that applications can be targeted to the observer? In a globally distributed network, we will want observer peers all over the place so that we don't put pressure on the endorsers with queries. It looks like an install command for every global observer would be required in the new model (i.e. versus the v0.6 model where the chaincode is installed on every peer automatically no longer holds for this scenario). Would this be an accurate interpretation?" 2) I also note that the Query stub API is gone and queries are run through the Invoke entry point now. This makes me wonder if the queries now have write access? And can queries now see *uncommitted* state? Thanks. 3) Also, how do I differentiate insode Invoke between invokes and queries? I don't see a separate parameter that tells me whether I am receiving an invoke or query? Or does it even matter any more? Is it really just down to the specific API function name?

kletkeman (Wed, 01 Mar 2017 04:27:39 GMT):
@channel I got no answer to the following questions on the fabric channel, so perhaps this is a better channel for these. I watched the video "Hyperledger install & instantiate code" today, and was left with some questions. 1) If I understand the video, endorsers require install of chaincode in order to execute invokes. But what about queries? Do observers require install of chaincode so that applications can be targeted to the observer? In a globally distributed network, we will want observer peers all over the place so that we don't put pressure on the endorsers with queries. It looks like an install command for every global observer would be required in the new model (i.e. versus the v0.6 model where the chaincode is installed on every peer automatically no longer holds for this scenario). Would this be an accurate interpretation?" 2) I also note that the Query stub API is gone and queries are run through the Invoke entry point now. This makes me wonder if the queries now have write access? And can queries now see *uncommitted* state? Thanks. 3) Also, how do I differentiate inside Invoke between invokes and queries? I don't see a separate parameter that tells me whether I am receiving an invoke or query? Or does it even matter any more? Is it really just down to the specific API function name?

uber.twin (Wed, 01 Mar 2017 11:03:19 GMT):
Has joined the channel.

satheeshk (Wed, 01 Mar 2017 11:20:08 GMT):
Has joined the channel.

SyneBlockChainTeam (Wed, 01 Mar 2017 11:40:03 GMT):
Has joined the channel.

kletkeman (Wed, 01 Mar 2017 16:08:53 GMT):
More questions: I see Jira changes such as 1751 and 1752 that seem to dramatically change the stub interface without any explanation. Meaning that there are cryptic (or no) reasons to do each of these changes, but I cannot find explanation on how they are to be used in the stub's comments or in the two FABs. The chainge itself is not all that helpful since all of these properties are simply byte arrays with no implied structure. + creator []byte + transient map[string][]byte + binding []byte So I am wondering what I am missing. Does anyone know where the new stub interface is documented? That might help me find the answers to my questions above since none of the channels are at all responsive right now.

kletkeman (Wed, 01 Mar 2017 17:09:10 GMT):
@jimthematrix Hi Jim, just wondering if you can answer my questions above. I see you in some of the Jira issues around the changes from Query as query to Query as proposal. Thanks.

jimthematrix (Wed, 01 Mar 2017 17:09:10 GMT):
Has joined the channel.

samwood (Wed, 01 Mar 2017 19:28:24 GMT):
Has joined the channel.

bkvellanki (Wed, 01 Mar 2017 20:14:38 GMT):
Has joined the channel.

jimthematrix (Wed, 01 Mar 2017 20:48:53 GMT):
@kletkeman `creator []byte` and `transient map[string][]byte` are defined in the protos for proposals. `binding []byte` is computed from (creator, nonce and epoch) as seen in protos/utils/proputils.go -> ComputeProposalBinding()

jimthematrix (Wed, 01 Mar 2017 20:49:37 GMT):
i agree chaincode.go can use better inline doc around the public interfaces

jimthematrix (Wed, 01 Mar 2017 20:50:32 GMT):
the core/chaincode/shim/interface.go has better description of the fields

kletkeman (Wed, 01 Mar 2017 20:56:04 GMT):
@jimthematrix Thanks. I'm also wondering about the questions above that one re the query context. read/write protection, committed versus uncommitted state purview, etc.

jimthematrix (Wed, 01 Mar 2017 21:11:24 GMT):
@kletkeman for queries if it involves chaincode then you'll need to install it on the peer and instantiate it in the channel you'll make queries to. there are other queries that don't require customer chaincode, like the general purposes ones getChainInfo, getBlock by number, get transaction by ID, etc. so an observer peer can serve those query requests without the chaincode.

jimthematrix (Wed, 01 Mar 2017 21:13:20 GMT):
yes the queries are sent as regular endorsement proposals, but they won't be able to see uncommitted state because the ledger won't get updated until the transaction is committed, and since chaincodes are stateless a query request won't get to see internal states of a transaction processing

jimthematrix (Wed, 01 Mar 2017 21:14:34 GMT):
finally yes it's down to the specific function name in the args that get sent in the proposal for the chaincode to tell what's what

kletkeman (Wed, 01 Mar 2017 21:14:35 GMT):
so the query has some sort of marker in the stub that says it is read protected? and that it cannot see uncommitted state? Because the transaction can see the uncommitted state of any previous but not yet committed transactions

kletkeman (Wed, 01 Mar 2017 21:15:19 GMT):
hmmm ... I don't see how a transaction can see uncomitted state while a query cannot ... they both use ReadState

kletkeman (Wed, 01 Mar 2017 21:15:31 GMT):
and both in the context of Invoke

jimthematrix (Wed, 01 Mar 2017 21:16:06 GMT):
'the transaction can see the uncommitted state of any previous but not yet committed transactions' - not sure how that's the case

kletkeman (Wed, 01 Mar 2017 21:16:18 GMT):
that's always been the case ...

jimthematrix (Wed, 01 Mar 2017 21:16:24 GMT):
read state is built from accessing the ledger

kletkeman (Wed, 01 Mar 2017 21:16:57 GMT):
in v0.6, the JSON RPC read method cannot do putstate ... and getstate sees only committed data

kletkeman (Wed, 01 Mar 2017 21:17:15 GMT):
the JSON RPC invoke method can do putstate and ses uncommited transactionse

kletkeman (Wed, 01 Mar 2017 21:17:34 GMT):
I know this because I can send many transactions for the same asset and all can end up in the same block with the correct state changes

jimthematrix (Wed, 01 Mar 2017 21:17:40 GMT):
right, but in the context of that particular transaction request

kletkeman (Wed, 01 Mar 2017 21:17:49 GMT):
it sounds like the new method might have a problem in that this discipline has been lost

jimthematrix (Wed, 01 Mar 2017 21:18:00 GMT):
when you send a separate request, the read set if built from ledger

kletkeman (Wed, 01 Mar 2017 21:18:00 GMT):
no ... multiple transactions in a row

kletkeman (Wed, 01 Mar 2017 21:18:04 GMT):
they can layer in v0.6

kletkeman (Wed, 01 Mar 2017 21:18:24 GMT):
ok ... so this is also true for invokes?

jimthematrix (Wed, 01 Mar 2017 21:18:40 GMT):
i don't know how the internals of v0.6 works

kletkeman (Wed, 01 Mar 2017 21:18:41 GMT):
i.e. parallel requests on the same assets will have race conditions then

jimthematrix (Wed, 01 Mar 2017 21:18:48 GMT):
but i'm pretty sure what i said is true for v1.0

kletkeman (Wed, 01 Mar 2017 21:19:39 GMT):
ok ... this is something to think about ... thanks

jimthematrix (Wed, 01 Mar 2017 21:19:58 GMT):
yes if more than one outstanding tx are modifying the same key, then only the first one is considered valid

kletkeman (Wed, 01 Mar 2017 21:20:45 GMT):
wow ... that's going to be difficult to enforce ... presumably the fabric will take care of returning a failure for all outstanding requests to the same key ...

kletkeman (Wed, 01 Mar 2017 21:21:04 GMT):
I cannot imagine how it can do that ... interesting

jimthematrix (Wed, 01 Mar 2017 21:21:09 GMT):
they get included in the block as invalid transactions

jimthematrix (Wed, 01 Mar 2017 21:21:40 GMT):
but the first one will be successful

kletkeman (Wed, 01 Mar 2017 21:21:41 GMT):
wow ... rejection events are sent automatically ...

kletkeman (Wed, 01 Mar 2017 21:21:46 GMT):
pseudo flow control

kletkeman (Wed, 01 Mar 2017 21:21:57 GMT):
but not as effective ...

kletkeman (Wed, 01 Mar 2017 21:22:34 GMT):
apps will start serializing by asset ID ... something I have already asked for 6 months ago from IoT platform ... looks like we have to do it now for sure

kletkeman (Wed, 01 Mar 2017 21:23:03 GMT):
or we will be flooded with invalid transactions in a fast moving system

kletkeman (Wed, 01 Mar 2017 21:23:15 GMT):
thanks ... this is very illuminating

jimthematrix (Wed, 01 Mar 2017 21:23:46 GMT):
yw, good discussions

mastersingh24 (Wed, 01 Mar 2017 21:30:05 GMT):
Has joined the channel.

kletkeman (Wed, 01 Mar 2017 21:46:02 GMT):
@jimthematrix One last question ... sorry ... for this to work, the entire write set would have to be checked to make sure that no keys appear in a previous transaction in the block ... this would have to be done using a hash table as the block was built for performance reasons. Does this sound about right?

jimthematrix (Wed, 01 Mar 2017 21:49:14 GMT):
are you referring to how the peer/validator enforce this or how you need to "line them up" in the application before submission?

jimthematrix (Wed, 01 Mar 2017 21:51:03 GMT):
you can use the key version to see if the intended write is valid or not

jimthematrix (Wed, 01 Mar 2017 21:51:17 GMT):
but i'm not entirely sure i understand your question...

jimthematrix (Wed, 01 Mar 2017 21:51:17 GMT):
but i'm not entirely sure i understood your question...

kletkeman (Wed, 01 Mar 2017 21:55:42 GMT):
sorry, I was talking about how the enforcement works ...

kletkeman (Wed, 01 Mar 2017 21:56:03 GMT):
in real time, every txn going into the block would have to be checked for a clash with all the previous txns

kletkeman (Wed, 01 Mar 2017 21:56:32 GMT):
we can queue our simple crud txns by assetID ... but complex txns that can write several keys we cannot do anything about

kletkeman (Wed, 01 Mar 2017 21:56:47 GMT):
they are slower, though, and not likely to fail

kletkeman (Wed, 01 Mar 2017 21:57:17 GMT):
queue and serialize I meant

kletkeman (Wed, 01 Mar 2017 21:59:15 GMT):
@jimthematrix what this also implies is that endorsers cannot overlap processing with the committers ... the endorsers must have the latest block with no further blocks outstanding ...

jimthematrix (Wed, 01 Mar 2017 22:01:47 GMT):
ok i see, yes when the committer validates the tx in the block it'll need to take into account previous tx in the same block to decided if a key version has advanced

kletkeman (Wed, 01 Mar 2017 22:01:49 GMT):
I suppose we could have lazy failure ... at the very end based on key versions

jimthematrix (Wed, 01 Mar 2017 22:02:30 GMT):
as for how the endorser and committer/ledger coordinates block commits (or not), you'd have to ask @dave.enyeart

dave.enyeart (Wed, 01 Mar 2017 22:02:30 GMT):
Has joined the channel.

kletkeman (Wed, 01 Mar 2017 22:02:35 GMT):
as in we can run everything in parallel and the key versions get checked at the end, signalling a race condition and failing the txn at the last moment

kletkeman (Wed, 01 Mar 2017 22:03:50 GMT):
thanks ... I'll run that by him sometime ... for now, I can think of ways to do it so I will assume we can get lazy failure ... which is not really different from immediate failure in effect ... we need to wait to submit txns on an asset until we see the previous commit, and then it is safe

kletkeman (Wed, 01 Mar 2017 22:03:56 GMT):
thanks again ... making sense

jimthematrix (Wed, 01 Mar 2017 22:04:26 GMT):
you bet

dave.enyeart (Wed, 01 Mar 2017 22:06:12 GMT):
@kletkeman @jimthematrix The committer 'state validator' ensures that state hasn't changed for all entries in ReadSet. It checks against both state db and prior trans in the block (yes, using a hash map)

kletkeman (Wed, 01 Mar 2017 22:07:29 GMT):
@dave.enyeart Thanks ... basically, the read set must be the same as that used by the endorser, else transaction fails at commit time ...

dave.enyeart (Wed, 01 Mar 2017 22:07:39 GMT):
right

kletkeman (Wed, 01 Mar 2017 22:07:41 GMT):
indicates race condition

kletkeman (Wed, 01 Mar 2017 22:07:45 GMT):
cool, thanks

icordoba (Thu, 02 Mar 2017 12:06:58 GMT):
Has joined the channel.

echenrunner (Thu, 02 Mar 2017 16:37:44 GMT):
Has joined the channel.

echenrunner (Thu, 02 Mar 2017 16:45:13 GMT):
is there a sample "Use Case for Post Trade - Settlement - Delivery vs Payment" chaincode out there? It seems form the descriptions we need multiple types of Ledgers for Bob, Alice and Trent as custodian.

ElliScharlin (Fri, 03 Mar 2017 08:41:41 GMT):
Has joined the channel.

normand (Fri, 03 Mar 2017 09:17:56 GMT):
Has joined the channel.

ElliScharlin (Fri, 03 Mar 2017 10:36:17 GMT):
Hi! I'm newer to the world of Hyperledger. I am making a Java project to be simply like giving out pieces of gum. I wrote a file that handles the initialization and the transferring and the deleting and the different actions that can happen to the gum, but I'm confused with where to go from here. Can someone help me?

kletkeman (Fri, 03 Mar 2017 20:53:41 GMT):
Adding another thread here from the fabric sdk channel: weeds 3:29 PM Got this quick question today highlighted here---> https://jira.hyperledger.org/browse/FAB-2625 Is there a way to include a request that is sent in state in the emitted event, because this team who opened request is using uses a router for chaincode API and rules and so access to intermediate data is difficult at best. Ideally, they want to be able to use SetEvent as done today, but to add more information by calling a new GetEvent function on the shim and then putting it back. Any recommendations on approach here? @kletkeman added her given this is where question originated from kletkeman 3:50 PM Thanks @weeds, we can set only one payload for the emitted event -- in our case a marshalled JSON object -- and so we need to be able to incrementally add to this event. I would much prefer to not have to built it up as a separate passed context, since the shim is already a useful context object for working with the ledger. Instead, the addition of a getter for the intermediate event payload would allow us to put the latest payload and then get it and update it along the way. Note that this would suffer a bit from poor performance, since it has to be serialised and thus marshalled each time we exit from a function. Perhaps we could instead get an actual context object that could be used by complex chaincode to build context up for other purposes and to build up the payload, which can then be set in the shim at the end. This would actually be even more useful. Something like *map[string]interface{} would be incredibly high performing and yet flexible. With or without getter and setter. Anyway, I wonder how others feel about this? (Note also that the shim might even be able to pass this context to all participating chaincodes in a deeply complex chain.)

weeds (Fri, 03 Mar 2017 20:53:41 GMT):
Has joined the channel.

rrader (Sat, 04 Mar 2017 08:17:24 GMT):
Can someone help with this https://stackoverflow.com/questions/42587993/hyperledger-v0-6-anatomy ?

weeds (Sat, 04 Mar 2017 14:57:27 GMT):
@jimthematrix might need to help on event question early next week

asadhayat (Sat, 04 Mar 2017 22:12:33 GMT):
Has joined the channel.

saism (Sun, 05 Mar 2017 19:57:59 GMT):
Has joined the channel.

kletkeman (Sun, 05 Mar 2017 22:28:11 GMT):
@rrader Gave it my best shot.

rrader (Mon, 06 Mar 2017 07:53:55 GMT):
@kletkeman thank you very much

SubhodI (Mon, 06 Mar 2017 09:54:21 GMT):
Has joined the channel.

SubhodI (Mon, 06 Mar 2017 09:55:22 GMT):
How to setup a running environment for java chaincode?

kletkeman (Mon, 06 Mar 2017 13:55:35 GMT):
@SubhodI https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/build.md, https://github.com/hyperledger/fabric/blob/master/docs/install_instantiate.md

SubhodI (Mon, 06 Mar 2017 13:57:19 GMT):

Message Attachments

SubhodI (Mon, 06 Mar 2017 13:58:03 GMT):
@kletkeman Url not found

kletkeman (Mon, 06 Mar 2017 14:00:00 GMT):
@SubhodI I'm suddenly having trouble too ... give me a moment, I need to find if they have been moved or if something else is going on.

SubhodI (Mon, 06 Mar 2017 14:01:29 GMT):
@kletkeman Thank you

kletkeman (Mon, 06 Mar 2017 14:02:28 GMT):
@SubhodI Wow ... the docs have all been recast in the "readthedocs" it appears. I am a little surprised that both are not supported. Looks like we will have to fish the info out of http://hyperledger-fabric.readthedocs.io/en/latest/

kletkeman (Mon, 06 Mar 2017 14:02:56 GMT):
@SubhodI Here's the first: http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html

kletkeman (Mon, 06 Mar 2017 14:03:15 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html#building-outside-of-vagrant

kletkeman (Mon, 06 Mar 2017 14:03:57 GMT):
This is your dev environment http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html

kletkeman (Mon, 06 Mar 2017 14:09:56 GMT):
@SubhodI Looks like someone blew away the install_instantiate doc, which contained instructions for working with the small peer set. There was a ".yml" file under there I used to successfully start up a small fabric .... and it is still there under .../docs/source ... so maybe it will still work ...

kletkeman (Mon, 06 Mar 2017 14:11:00 GMT):

Message Attachments

kletkeman (Mon, 06 Mar 2017 14:11:05 GMT):
To hold you over, here is the original doc ... but we need to find the new version in case it has changed ... bit of a mess it seems

kletkeman (Mon, 06 Mar 2017 14:12:00 GMT):
Ah ... never mind the doc, the rst file seems to be the source for the doc in readthedocs, wherever it might be : https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst

kletkeman (Mon, 06 Mar 2017 14:12:00 GMT):
The rst file seems to be the source for the doc in readthedocs, wherever it might be : https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst

kletkeman (Mon, 06 Mar 2017 14:13:32 GMT):
And here is the other source ... apologies, I just didn't know how that worked ... : https://github.com/hyperledger/fabric/blob/master/docs/source/dev-setup/build.rst

SubhodI (Mon, 06 Mar 2017 14:20:21 GMT):
@kletkeman thank you very much for all docs

SubhodI (Mon, 06 Mar 2017 14:21:16 GMT):
Docker pull for fabric/orderer is not working. docker pull hyperledger/fabric-orderer Using default tag: latest Pulling repository docker.io/hyperledger/fabric-orderer Tag latest not found in repository docker.io/hyperledger/fabric-orderer

StevenLanders (Mon, 06 Mar 2017 20:48:10 GMT):
Has joined the channel.

James.Tech (Mon, 06 Mar 2017 21:08:29 GMT):
Has joined the channel.

weeds (Mon, 06 Mar 2017 22:21:10 GMT):
if you have comments on doc- i would go post them on fabric-documentation.

WeDoIoE (Tue, 07 Mar 2017 00:15:43 GMT):
Has joined the channel.

tbrooke (Tue, 07 Mar 2017 01:39:48 GMT):
Has joined the channel.

greg.haskins (Tue, 07 Mar 2017 05:34:39 GMT):
@SubhodI the software is not released yet, and thus nothing is on dockerhub. You need to build from source. "make docker" will generate the images you are looking for

SubhodI (Tue, 07 Mar 2017 05:36:04 GMT):
@greg.haskins, Okay then i will follow "make docker", thank you

SyneBlockChainTeam (Tue, 07 Mar 2017 07:38:24 GMT):
Earlier we have been using hyperledger fabric v0.5 and v0.6 with vagrant and successfully developed various sample applications. Now we want to switch to v1.0. Though we are following the steps given on "http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html", but somehow we are facing issues while setting up development environment. Is membersrvc.yaml file replaced with fabric-cop? Thanks in advance.

Manikanda Gunasekaran (Tue, 07 Mar 2017 10:14:09 GMT):
Has joined the channel.

kletkeman (Tue, 07 Mar 2017 16:44:06 GMT):
@greg.haskins I created an issue a while ago that it the cli container has no visibility of /local-dev, which makes working on real chaincode impossible with the cli. You mentioned something to me about using the cli like we used to, natively on the mac. The problem I am having is that it is built only inside the peer. So what would be more likely to succeed -- hacking the build to make /local-dev visible inside the cli container; or trying to build the peer outside the container to use its cli features old school?

greg.haskins (Tue, 07 Mar 2017 16:51:12 GMT):
@kletkeman by "inside the peer" I assume you are referring to the fact that the "peer" binary is a multi-mode tool (e.g. "peer node" is a oeer daemon vs "peer chaincode" is a CLI)

greg.haskins (Tue, 07 Mar 2017 16:52:34 GMT):
i still do not think it makes sense to advocate that CLI tools should run inside docker...so I wouldnt be a fan of modifying the containers further.....in addition, as far as I know, you can already build the "peer" binary natively which means "peer chaincode" and other CLI usage of it should already be supported

greg.haskins (Tue, 07 Mar 2017 16:53:30 GMT):
in addition, I am not sure there is really anything the build could do about it: sharing a volume inside a container, as far as I know, is only available as a function of runtime switches like -v

greg.haskins (Tue, 07 Mar 2017 16:53:51 GMT):
by that, i mean: its already available to you today, and I am not sure I could improve upon the usage further

greg.haskins (Tue, 07 Mar 2017 16:55:11 GMT):
we could conceivably offer a wrapper tool (e.g. a script "peer-chaincode.sh" that wraps something like "docker run -it --rm hyperledger/fabric-peer peer chaincode $@"

greg.haskins (Tue, 07 Mar 2017 16:55:32 GMT):
but again, I am not a fan of this approach...i think our CLIs should be native tools ideally

kletkeman (Tue, 07 Mar 2017 17:05:04 GMT):
@greg.haskins Thanks ... I agree with you. Turns out that the SDK end to end just started working again, so now I have to decide how best to recreate our simple debug environment from v0.6 ... command line (which is always painful as transactions get big), or a translator got our POSTMAN collections from v0.6 to run on top of the SDK ... I know that there is a production level initiative to add REST, but I think a quick hack debug facility is needed asap ... might not actually be all that much work ... have to see ...

kletkeman (Tue, 07 Mar 2017 17:05:04 GMT):
@greg.haskins Thanks ... I agree with you. Turns out that the SDK end to end just started working again, so now I have to decide how best to recreate our simple debug environment from v0.6 ... command line (which is always painful as transactions get big), or a translator for our POSTMAN collections from v0.6 to run on top of the SDK ... I know that there is a production level initiative to add REST, but I think a quick hack debug facility is needed asap ... might not actually be all that much work ... have to see ...

greg.haskins (Tue, 07 Mar 2017 17:24:41 GMT):
@kletkeman I did just confirm that I can "make peer" on my mac

greg.haskins (Tue, 07 Mar 2017 17:24:55 GMT):
so I see no reason why "v0.6 CLI" experience is any different

kletkeman (Tue, 07 Mar 2017 17:25:01 GMT):
ah ... cool, thanks

kletkeman (Tue, 07 Mar 2017 17:25:44 GMT):
How do you get around this error? # 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/peer] Error 2

kletkeman (Tue, 07 Mar 2017 17:26:24 GMT):
I can't find a way to get that include onto a mac, whereas it is part of a linux dev kit

greg.haskins (Tue, 07 Mar 2017 17:26:34 GMT):
OTP, but you can brew-install it

kletkeman (Tue, 07 Mar 2017 17:27:18 GMT):
ok, I'll look into that, thx

StevenLanders (Tue, 07 Mar 2017 19:39:50 GMT):
@kletkeman it's `brew install libtools` on the mac

StevenLanders (Tue, 07 Mar 2017 19:39:50 GMT):
@kletkeman it's `brew install libtool` on the mac

kletkeman (Tue, 07 Mar 2017 19:40:01 GMT):
awesome, thanks :-)

kletkeman (Tue, 07 Mar 2017 19:41:52 GMT):
@StevenLanders Oops ... failed ... ==> Renamed Formulae bash-completion2 -> bash-completion@2 erlang-r18 -> erlang@18 mariadb100 -> mariadb@10.0 ==> Deleted Formulae ctorrent ee node@5 Error: No available formula with the name "libtools" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.

StevenLanders (Tue, 07 Mar 2017 19:46:36 GMT):
i corrected it, it's `libtool`

StevenLanders (Tue, 07 Mar 2017 19:46:50 GMT):
sorry about that :)

itamar-m (Tue, 07 Mar 2017 19:47:43 GMT):
Hello .. I' m new here and setting up a dev environment for Ubuntu.. but for some reason I' m not able run the _setupUbuntuOnPPC64le.sh_ as it keeps saying that I need o ensure fabric code is under _/src/github.com/hyperledger/fabric_

itamar-m (Tue, 07 Mar 2017 19:48:06 GMT):
_itamar@blame-me:~/go/src/github.com/hyperledger$ pwd /home/itamar/go/src/github.com/hyperledger itamar@blame-me:~/go/src/github.com/hyperledger$ env | grep GOPATH GOPATH=/home/itamar/go itamar@blame-me:~/go/src/github.com/hyperledger$ sudo fabric/devenv/./setupUbuntuOnPPC64le.sh Ensure fabric code is under /src/github.com/hyperledger/fabric_

itamar-m (Tue, 07 Mar 2017 19:48:06 GMT):
_itamar@blame-me:~/go/src/github.com/hyperledger$ pwd_ _/home/itamar/go/src/github.com/hyperledger_ _itamar@blame-me:~/go/src/github.com/hyperledger$ env | grep GOPATH_ _GOPATH=/home/itamar/go_ _itamar@blame-me:~/go/src/github.com/hyperledger$ sudo fabric/devenv/./setupUbuntuOnPPC64le.sh_ _Ensure fabric code is under /src/github.com/hyperledger/fabric_

kletkeman (Tue, 07 Mar 2017 19:49:30 GMT):
@StevenLanders And that was successful :-) ... thanks!

StevenLanders (Tue, 07 Mar 2017 19:51:01 GMT):
@itamar-m the script evaluates using this: ``` if [ ! -d "$GOPATH/src/github.com/hyperledger/fabric" ] then echo "Ensure fabric code is under $GOPATH/src/github.com/hyperledger/fabric" exit fi ```

StevenLanders (Tue, 07 Mar 2017 19:51:17 GMT):
it appears based on the message that it thinks the $GOPATH isn't set (to it)

StevenLanders (Tue, 07 Mar 2017 19:51:30 GMT):
are you running it with sudo / something similar?

itamar-m (Tue, 07 Mar 2017 19:51:49 GMT):
yes.. sudo.

StevenLanders (Tue, 07 Mar 2017 19:52:00 GMT):
ok, sudo/root must not have the $GOPATH set.

itamar-m (Tue, 07 Mar 2017 19:52:29 GMT):
_itamar@blame-me:~/go/src/github.com/hyperledger$ $($GOPATH/src/github.com/hyperledger/fabric)_ _bash: /home/itamar/go/src/github.com/hyperledger/fabric: Is a directory_

itamar-m (Tue, 07 Mar 2017 19:53:23 GMT):
weird because it is set.

itamar-m (Tue, 07 Mar 2017 19:54:26 GMT):
unless I must create a root user in the Ubuntu and set that to root as well.

StevenLanders (Tue, 07 Mar 2017 19:54:45 GMT):
i would expect the string to include the value of $GOPATH in the error message, but it appears to start with `/src/github.com/hype...`

itamar-m (Tue, 07 Mar 2017 20:11:13 GMT):
just learned something... $GOPATH must be set on the _etc/environment_ not just in the _.bashrc_ file.

kletkeman (Tue, 07 Mar 2017 20:24:02 GMT):
@itamar-m I put these lines in my .profile on my Mac and have had no trouble since ... export LOCALDEVDIR=/Users/kim/DEV export GOROOT=/usr/local/go export GOPATH=$HOME/DEV export PATH=$PATH:$GOROOT/bin

itamar-m (Tue, 07 Mar 2017 20:26:51 GMT):
yeah.. I did similar thing on _.bashrc_ but seems it was not the right place.. so I had to include in that file _etc/environment_ .. btw, script just ran .. seems to be successfully.

kletkeman (Tue, 07 Mar 2017 20:27:37 GMT):
I think .profile is sourced everywhere ... apparently .bashrc is not ...

Tadashi (Wed, 08 Mar 2017 01:31:02 GMT):
Has joined the channel.

skbodwell (Wed, 08 Mar 2017 03:47:53 GMT):
Has joined the channel.

suvpatil (Wed, 08 Mar 2017 10:09:57 GMT):
Has joined the channel.

suvpatil (Wed, 08 Mar 2017 10:10:53 GMT):
can we call third party API from chaincode?

kletkeman (Wed, 08 Mar 2017 15:12:26 GMT):
@suvpatil Here is the problem with calling out from chaincode -- chaincode must be 100% deterministic, and any call to an external system is not guaranteed to work. Moreover, any call that results in information being recorded externally is going to be missing from the read/write set and thus not rolled back if the transaction does not end up committed. Thus, you are immediately out of sync between world state and the external system. Note also that any call made out to the real world is made from every copy of the chaincode on every peer involved in the transaction. So you can call out for read-only, but your peers must all be able to reach the same URL and thus you introduce a major impediment to determinism. Carefully handled, it could be reasonably reliable. But expect transactions to fail more often unless your implementation is bullet proof. And writing externally is unlikely to stay perfectly synced up to world state, so designing that in is simply asking for earth shattering issues. There is an exception that I was shown and agree with. If you want the chaincode to certify an external file's authenticity (for example you want the master copy of the latest Star Wars film to be certified as the original on some IP protection ledger), then you could have the chaincode create the hash of the film (which is much better than passing it in with the "trust me" property set) and store the signature of the film and the exact location. For performance reasons, I suspect that you would need a separate channel per film and you would need the film to be accessible locally on a fast network shared with the peer. Further, each peer would need the same access using the same URL, which implies a distributed file system with appropriate routing. Yet this is all still fine if the endorsers all agree, because the URL and the signatures match and that is all you need. I have not heard of any other scenario where external access is safe and effective, but I really like this one.

kletkeman (Wed, 08 Mar 2017 15:18:59 GMT):
@here Any thoughts on the above? ^^^^^

DannyWong (Wed, 08 Mar 2017 15:39:45 GMT):
i am thinking about one functional requirements that i am doing.... 1) We created a "resolution smart contract" that requires multi-sig from defined set of key members in order to get it "resolved"

Suma (Wed, 08 Mar 2017 15:40:35 GMT):
Has joined the channel.

DannyWong (Wed, 08 Mar 2017 15:40:49 GMT):
so... its like if (obtainedNoOfSig >= requiredNoOfSig) { resolutionStatus = "resolved"; resolutionTime = block.timestamp; // achievable in Etherum Solidity }

DannyWong (Wed, 08 Mar 2017 15:41:30 GMT):
in HL, due to different architecture, we cannot really put a non-determinisitc operations like "now()"

DannyWong (Wed, 08 Mar 2017 15:41:52 GMT):
as it will produce different results in different endorser

DannyWong (Wed, 08 Mar 2017 15:42:24 GMT):
so... even the block creation time is marked in the Orders, it cannot really put this value back to the "writeSet"...

DannyWong (Wed, 08 Mar 2017 15:42:40 GMT):
Of course, we can pass a timestamp from SDK

DannyWong (Wed, 08 Mar 2017 15:43:13 GMT):
but it is not a trusted source (outside chaincode)

DannyWong (Wed, 08 Mar 2017 15:44:15 GMT):
and the timestamp we can pass from SDK is at most "the timestamp of the signing action", which IF this sign action is the one that change the if-statement above to true, then use this timestamp as the resolution time

DannyWong (Wed, 08 Mar 2017 15:44:36 GMT):
so.... i am thinking how we can design this in HL.

DannyWong (Wed, 08 Mar 2017 15:52:36 GMT):
@kletkeman I agreed above. Should avoid external call as much as possible. And implement a trusted idempotent/deterministic Oracle service for all endorsers... but IMO, it makes more sense to do query from Oracle service BUT NOT updating. Since the transaction atomicity cannot guaranteed. If we really need to update external system, we should "event" instead.

kletkeman (Wed, 08 Mar 2017 16:01:01 GMT):
@DannyWong I had the stub API changed about 8 months ago to allow us to get the TX time stamp and I use that as the official time. Note that there can only be one TX time, so all committers will see the same time in your data. Now() is absolutely forbidden, as you mentioned. This is a function from inside the IoT Contract Platform on IBM-Watson-IoT/Blockchain-Samples -- note, v0.6 code // Adds the current transaction timestamp into world state, replacing it if it was already there. func (a *Asset) addTXNTimestampToState(stub shim.ChaincodeStubInterface) error { // add transaction uuid and timestamp a.TXNID = stub.GetTxID() txnunixtime, err := stub.GetTxTimestamp() if err != nil { err = fmt.Errorf("error getting transaction timestamp, err is %s", err) log.Errorf(err.Error()) return err } txntimestamp := time.Unix(txnunixtime.Seconds, int64(txnunixtime.Nanos)) a.TXNTS = &txntimestamp return nil }

kletkeman (Wed, 08 Mar 2017 16:01:30 GMT):
and yes, events are the other half of 2-way communication

DannyWong (Wed, 08 Mar 2017 16:05:47 GMT):
kinda agree on the time... // GetTxTimestamp returns transaction created timestamp, which is currently // taken from the peer receiving the transaction. Note that this timestamp // may not be the same with the other peers' time. func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) { return nil, nil }

DannyWong (Wed, 08 Mar 2017 16:05:57 GMT):
but current implementation is returning nil hahaha

DannyWong (Wed, 08 Mar 2017 16:06:40 GMT):
in v1.0, client (sdk) submits the tx proposal to multiple endorsers

DannyWong (Wed, 08 Mar 2017 16:07:03 GMT):
endorsers should receive the tx in different timestamp

dknochen (Wed, 08 Mar 2017 16:12:10 GMT):
Has joined the channel.

DannyWong (Wed, 08 Mar 2017 16:21:40 GMT):
in fact, potentially in future, if we as client do not need to send proposal to all endorsers ourselves... we just submit to one endorser, then it will internally forward to necessary endorsers via gossip (after checking the endorsement policy for example)... then at that point, i think the receiving peer can mark a tx timestamp and forward it to other endorsers as well

DannyWong (Wed, 08 Mar 2017 16:21:47 GMT):
just some *wild* thought

kletkeman (Wed, 08 Mar 2017 17:10:57 GMT):
If we are not getting TX timestamp in v1, then we have a serious problem ...

kletkeman (Wed, 08 Mar 2017 17:11:44 GMT):
I saw yesterday that there is a move to send to all endorsers in parallel to save time ... but the client will have to do that I suspect ...

kletkeman (Wed, 08 Mar 2017 17:12:38 GMT):
either way, we need a way to get the official transaction time ... and since the SDK gets the nonce before submitting it, we can perhaps have the SDK perform "now()" to assign a TX timestamp. That way, all endorsers get the same timestamp.

kletkeman (Wed, 08 Mar 2017 17:13:10 GMT):
in fact ... if there is a timestamp field on the transaction request, perhaps we just have to set the time there and it will work

kletkeman (Wed, 08 Mar 2017 17:14:14 GMT):
@DannyWong @jimthematrix I am not all that comfortable with so much responsibility in the clients, but we can set the timestamp if need be. ^^^^^

theathibm (Wed, 08 Mar 2017 22:06:24 GMT):
protobuf

DannyWong (Wed, 08 Mar 2017 22:40:10 GMT):
Yes, in fact, i have been discussing why the sdk client has entire respsonsibility to orchestrate everything. Like collecting responses n compare the signatures n determines whether it passes the endorsement policy n submits to orderer services...

DannyWong (Wed, 08 Mar 2017 22:41:38 GMT):
Why the heck a client needs to have all the addresses of endorsers in the first place...

iscy (Thu, 09 Mar 2017 01:03:09 GMT):
Has joined the channel.

bkvellanki (Thu, 09 Mar 2017 01:15:15 GMT):
How do we get the callermetadata in fabric v1. I dont see that method in shim. Is there a way read the caller certs and info in v1.

raj (Thu, 09 Mar 2017 01:38:59 GMT):
Has joined the channel.

xiangyw (Thu, 09 Mar 2017 01:40:57 GMT):
Has joined the channel.

Ratnakar (Thu, 09 Mar 2017 01:41:43 GMT):
Has joined the channel.

DannyWong (Thu, 09 Mar 2017 03:34:53 GMT):
the callermetadata method is removed (2 weeks ago) and replaced by something different getCreator()...

DannyWong (Thu, 09 Mar 2017 03:38:39 GMT):
@bkvellanki in chaincode.go

DannyWong (Thu, 09 Mar 2017 03:38:53 GMT):
`// GetCreator returns SignatureHeader.Creator of the proposal // this Stub refers to. func (stub *ChaincodeStub) GetCreator() ([]byte, error) { return stub.creator, nil }`

bkvellanki (Thu, 09 Mar 2017 03:39:10 GMT):
@DannyWong thank you

DannyWong (Thu, 09 Mar 2017 03:39:35 GMT):
well, i think the rename makes sense.... get the creator of the proposal = the caller in v0.6

jeffchi (Thu, 09 Mar 2017 04:25:31 GMT):
Has joined the channel.

AbhilekhSingh (Thu, 09 Mar 2017 08:41:21 GMT):
Has joined the channel.

rikmoedt (Thu, 09 Mar 2017 11:09:03 GMT):
Has joined the channel.

aberfou (Thu, 09 Mar 2017 13:51:23 GMT):
Has joined the channel.

KoolChain (Thu, 09 Mar 2017 14:42:28 GMT):
Has joined the channel.

KoolChain (Thu, 09 Mar 2017 14:42:40 GMT):
are there any fabric 1.0 chaincode example somewhere ?

sanchezl (Thu, 09 Mar 2017 15:38:38 GMT):
https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go

sanchezl (Thu, 09 Mar 2017 15:38:38 GMT):
There are some examples at: https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go The `chaincode_example_0x` ones are definitely v1.0, not sure about the others.

raj (Thu, 09 Mar 2017 16:06:50 GMT):
@sanchezl is there any instruction on installing the chaincode ?

kletkeman (Thu, 09 Mar 2017 16:16:12 GMT):
@raj The latest docs are only days old and are here: http://hyperledger-fabric.readthedocs.io/en/latest/ If you want to browse the source, then simply drill down into the docs folder to find the *.rst files. Some examples of interesting docs: https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst https://github.com/hyperledger/fabric/blob/master/docs/source/dev-setup/build.rst But the real action for v1 comes from the hyperledger/fabric-sdk-node project. Take a look in there and spend some time on the channel of the same name. Browse the posts form this week and you will be able to deploy and talk to a test chaincode from that project.

kletkeman (Thu, 09 Mar 2017 16:16:12 GMT):
@raj The latest docs are only days old and are here: http://hyperledger-fabric.readthedocs.io/en/latest/ If you want to browse the source, then simply drill down into the docs folder to find the *.rst files. Some examples of interesting docs: https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst https://github.com/hyperledger/fabric/blob/master/docs/source/dev-setup/build.rst But the real action for v1 comes from the hyperledger/fabric-sdk-node project. Take a look in there and spend some time on the channel of the same name. Browse the posts from this week and you will be able to deploy and talk to a test chaincode from that project.

kletkeman (Thu, 09 Mar 2017 16:17:19 GMT):
@sanchezl All examples in the mirror you referenced are v1 compatible. The examples for v0.6 are on that branch.

kletkeman (Thu, 09 Mar 2017 16:17:19 GMT):
@sanchezl All examples in the mirror you referenced are v1 compatible. The examples for v0.6 are on the v0.6 branch.

sanchezl (Thu, 09 Mar 2017 16:21:37 GMT):
You can also read the docs at http://hyperledger-fabric.readthedocs.io/en/latest : • http://hyperledger-fabric.readthedocs.io/en/latest/install_instantiate.html • http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html

weeds (Thu, 09 Mar 2017 17:00:15 GMT):
@KoolChain another good place is to go here: https://jenkins.hyperledger.org/ Under fabric- you can actually see the end to end tests that are run.

raj (Thu, 09 Mar 2017 17:15:21 GMT):
thank you @sanchezl @kletkeman

itamar-m (Thu, 09 Mar 2017 18:05:42 GMT):
Hello .. I'm setting my dev environment.. but when I run _make dist-clean all_ I got one failure ... Any clue to how to get over that? Failing scenarios: features/bootstrap.feature:271 Bootstrap a development network with 4 peers (2 orgs) and 1 orderer (1 org), each having a single independent root of trust (No fabric-ca, just openssl) -- @1.1 Orderer Options 0 features passed, 1 failed, 2 skipped 0 scenarios passed, 1 failed, 24 skipped 28 steps passed, 1 failed, 243 skipped, 0 undefined

KoolChain (Thu, 09 Mar 2017 18:42:13 GMT):
thanks @sanchezl @weeds

weeds (Thu, 09 Mar 2017 19:16:33 GMT):
@rameshthoomu Ramesh- have you run into the problem @itamar-m has run into? just curious

rameshthoomu (Thu, 09 Mar 2017 19:16:33 GMT):
Has joined the channel.

rameshthoomu (Thu, 09 Mar 2017 19:22:04 GMT):
It's working on latest commits.. But in CI, I am seeing failures with build path..

rameshthoomu (Thu, 09 Mar 2017 19:23:06 GMT):
@itamar-m are you following instructions mentioned here https://github.com/hyperledger/fabric/blob/master/bddtests/README.md

itamar-m (Thu, 09 Mar 2017 19:30:15 GMT):
I was doing what describes here .. http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html

itamar-m (Thu, 09 Mar 2017 19:30:15 GMT):
I was doing what describes here .. http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build.html Basically I did install all the required software then I git the fabric, ran _setupUbuntuOnPPC64le.sh_ then ran _make dist-clean all_

itamar-m (Thu, 09 Mar 2017 19:30:21 GMT):
let me check the link you sent.

itamar-m (Thu, 09 Mar 2017 20:00:50 GMT):
@rameshthoomu do I really need to go over all the steps mentioned in the link you gave me to complete the development environment?

samirsadeghi (Thu, 09 Mar 2017 20:10:23 GMT):
Has joined the channel.

jeffgarratt (Thu, 09 Mar 2017 20:11:39 GMT):
Has joined the channel.

jeffgarratt (Thu, 09 Mar 2017 20:12:02 GMT):
@itamar-m @rameshthoomu no. But it may simplify your life considerably.

itamar-m (Thu, 09 Mar 2017 20:24:16 GMT):
so after doing that do I need to run the _make dist-clean all_?

jeffgarratt (Thu, 09 Mar 2017 20:29:14 GMT):
no

jeffgarratt (Thu, 09 Mar 2017 20:29:30 GMT):
@itamar-m just ...

jeffgarratt (Thu, 09 Mar 2017 20:29:33 GMT):
make peer

jeffgarratt (Thu, 09 Mar 2017 20:29:35 GMT):
make peer-docker

jeffgarratt (Thu, 09 Mar 2017 20:29:40 GMT):
make orderer-docker

jeffgarratt (Thu, 09 Mar 2017 20:30:38 GMT):
perhaps PPC64 is diff environment, but I am hopeful

itamar-m (Thu, 09 Mar 2017 20:45:03 GMT):
@jeffgarratt .. got the same error.

itamar-m (Thu, 09 Mar 2017 20:45:23 GMT):
Failing scenarios: features/bootstrap.feature:271 Bootstrap a development network with 4 peers (2 orgs) and 1 orderer (1 org), each having a single independent root of trust (No fabric-ca, just openssl) -- @1.1 Orderer Options 0 features passed, 1 failed, 2 skipped 0 scenarios passed, 1 failed, 24 skipped 33 steps passed, 1 failed, 238 skipped, 0 undefined Took 0m20.680s

jeffgarratt (Thu, 09 Mar 2017 20:45:40 GMT):
k

jeffgarratt (Thu, 09 Mar 2017 20:45:41 GMT):
error?

itamar-m (Thu, 09 Mar 2017 20:46:01 GMT):
sorry .. failure.

itamar-m (Thu, 09 Mar 2017 20:46:38 GMT):
the same scenario is failing.

itamar-m (Thu, 09 Mar 2017 22:44:22 GMT):
done for today .. still the same Failing scenarios: features/bootstrap.feature:275 Bootstrap a development network with 4 peers (2 orgs) and 1 orderer (1 org), each having a single independent root of trust (No fabric-ca, just openssl) -- @1.1 Orderer Options 0 features passed, 1 failed, 0 skipped 0 scenarios passed, 1 failed, 0 skipped 33 steps passed, 1 failed, 27 skipped, 0 undefined

itamar-m (Thu, 09 Mar 2017 22:44:35 GMT):
but now I got the following...

itamar-m (Thu, 09 Mar 2017 22:44:37 GMT):
And user "dev0Org0" using cert alias "dev0Org0App1" creates a install proposal "installProposal1" for channel "com.acme.blockchain.jdoe.Channel1" using chaincode spec "cc_spec" # steps/endorser_impl.py:41 0.007s Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1456, in run match.run(runner.context) File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1903, in run self.func(context, *args, **kwargs) File "steps/endorser_impl.py", line 49, in step_impl ccDeploymentSpec = endorser_util.createDeploymentSpec(context=context, ccSpec=ccSpec) File "/home/itamar-m/go/src/github.com/hyperledger/fabric/bddtests/steps/endorser_util.py", line 171, in createDeploymentSpec _createDeploymentSpecAsFile(ccSpec=ccSpec, outputPath=outputPath) File "/home/itamar-m/go/src/github.com/hyperledger/fabric/bddtests/steps/endorser_util.py", line 159, in _createDeploymentSpecAsFile bdd_test_util.cli_call(["peer","chaincode","package"] + nameArgs + ctorArgs + pathArgs + versionArgs + [outputPath], expect_success=True, env=myEnv) File "/home/itamar-m/go/src/github.com/hyperledger/fabric/bddtests/steps/bdd_test_util.py", line 32, in cli_call p = subprocess.Popen(arg_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

jeffgarratt (Thu, 09 Mar 2017 22:54:22 GMT):
@itamar-m make sure the peer executable has been built an is in path. >make peer

jeffgarratt (Thu, 09 Mar 2017 22:54:22 GMT):
@itamar-m make sure the peer executable has been built and is in path. >make peer

jeffgarratt (Thu, 09 Mar 2017 22:55:32 GMT):
the make puts it in /hyperledger/build/bin/peer

jeffgarratt (Thu, 09 Mar 2017 22:55:42 GMT):
add that path to $PATH and should get further

jeffgarratt (Thu, 09 Mar 2017 22:56:04 GMT):
it is in the path for vagrant setup

kuangchao (Fri, 10 Mar 2017 02:25:30 GMT):
Has joined the channel.

shaily (Fri, 10 Mar 2017 06:58:59 GMT):
Has joined the channel.

KoolChain (Fri, 10 Mar 2017 09:28:17 GMT):
does anyone know if it's possible to have a look at the java doc of 1.0 ? and also a real life app ? like the car lease but in java?

roijo (Fri, 10 Mar 2017 11:06:33 GMT):
Has joined the channel.

xixuejia (Fri, 10 Mar 2017 13:58:45 GMT):
Has joined the channel.

raj (Fri, 10 Mar 2017 15:32:42 GMT):
Hello All, I was able to successfully make e2e example work on my mac on HL V1. I would now like to create my own chaincode and put it on the fabric

raj (Fri, 10 Mar 2017 15:33:04 GMT):
Request you to provide me some direction

raj (Fri, 10 Mar 2017 15:35:35 GMT):
Specifically I would like to understand if How do I create assets, and the chain code. Can I put my assets chaincode code against the same instance of fabric. Please advice

JatinderBali (Fri, 10 Mar 2017 15:40:50 GMT):
Has joined the channel.

kletkeman (Fri, 10 Mar 2017 16:00:51 GMT):
@raj An asset is just something stored against a key in the world state database. It is usually the focus of the contract, but can be one of many such contract foci. There is a project called the fabric-composer that you might want to look at: https://github.com/fabric-composer

kletkeman (Fri, 10 Mar 2017 16:04:38 GMT):
@raj I have an article I put down about 6 months ago. It needs updating for our contract platform, but the info might be useful for you. https://github.com/ibm-watson-iot/blockchain-samples/blob/master/docs/HyperledgerContractsIntroBestPracticesPatterns.md

kletkeman (Fri, 10 Mar 2017 16:04:38 GMT):
@raj I have an article I put down about 6 months ago. It needs updating for our contract platform and of course for v1 fabric, but the info might be useful for you. https://github.com/ibm-watson-iot/blockchain-samples/blob/master/docs/HyperledgerContractsIntroBestPracticesPatterns.md

DannyWong (Fri, 10 Mar 2017 16:33:59 GMT):
hi guys, can I get the "current chaincode ID" inside chaincode?

DannyWong (Fri, 10 Mar 2017 16:36:11 GMT):
i saw something chaincodename := viper.GetString("chaincode.id.name") in shim/chaincode.go

DannyWong (Fri, 10 Mar 2017 16:36:27 GMT):
but not sure whether I can call it in user chaincode

DannyWong (Fri, 10 Mar 2017 16:50:47 GMT):
@here would be nice if someone can she some light to above question on getting current executing chaincode ID in user chain code...

raj (Fri, 10 Mar 2017 16:51:53 GMT):
thank you kletkeman

raj (Fri, 10 Mar 2017 16:53:42 GMT):
I am looking at fabric-composer however it is not yet compatible with HL 1.0

kletkeman (Fri, 10 Mar 2017 16:53:42 GMT):
@DannyWong I don't understand the scenario under which you would need that? If need be, you can always pass the chaincode its own ID in a separate function, which it can store in world state under "MYID" or some such. But ... v1 is also introducing a monikor mechanism to my knowledge where the name will be settable ahead of time, allowing smart contracts / chaincodes to have well known addresses like web services etc. I don't quite know how this would help you, but it might?

greg.haskins (Fri, 10 Mar 2017 16:54:21 GMT):
@DannyWong I believe that may work: the environment is indeed set

greg.haskins (Fri, 10 Mar 2017 16:54:24 GMT):
https://github.com/hyperledger/fabric/blob/f36bcbb9c6d1aef605195d933365b09931a71349/core/chaincode/chaincode_support.go#L328

DannyWong (Fri, 10 Mar 2017 16:54:46 GMT):
@greg.haskins @kletkeman thanks. let me write a test chaincode to verify...

DannyWong (Fri, 10 Mar 2017 16:54:54 GMT):
let me illustrate why i need it

DannyWong (Fri, 10 Mar 2017 16:55:29 GMT):
as we now in v1.0 we can specify the chaincode id in sdk

DannyWong (Fri, 10 Mar 2017 16:55:50 GMT):
i can probably set it to the state db in the init method

DannyWong (Fri, 10 Mar 2017 16:56:02 GMT):
with something suggested "my_cc_id" something like this

zakir2k (Sat, 11 Mar 2017 06:54:11 GMT):
Has joined the channel.

rrader (Sat, 11 Mar 2017 15:51:35 GMT):
I run marbles app with v0.6, I saw `cc_id` is this the signature of transaction?

StevenLanders (Sun, 12 Mar 2017 18:33:43 GMT):
@rrader this is the chaincode ID that you'll need to reference when you invoke/query your chaincode. In a non-dev mode of v0.6, it's a hash of the deployed chaincode.

rrader (Sun, 12 Mar 2017 19:09:56 GMT):
@StevenLanders ok, thanks, but how to sign a transaction?

StevenLanders (Sun, 12 Mar 2017 19:14:18 GMT):
I might need more context. The SDK takes care of certain parts of this, and will request the ECerts/TCerts as needed. One assumption is that the client is running in a secure location.

rrader (Sun, 12 Mar 2017 19:15:13 GMT):
Is it possible to sign a transaction by custom data from application, for example ID + PIN?

StevenLanders (Sun, 12 Mar 2017 19:16:33 GMT):
it is possible: one could sign the transaction as you're doing, and pass the signature in as an argument, and have chaincode logic verify that signature.

StevenLanders (Sun, 12 Mar 2017 19:17:03 GMT):
another approach is to verify cert attributes of the enrolled user, but it's mainly useful for things that do not change

StevenLanders (Sun, 12 Mar 2017 19:18:05 GMT):
(i have a 2FA use case that used this sort of approach)

StevenLanders (Sun, 12 Mar 2017 19:18:05 GMT):
(i have a 2FA use case that used the chaincode logic sort of approach)

rrader (Sun, 12 Mar 2017 19:35:16 GMT):
2FA in chaincode or in application?

StevenLanders (Sun, 12 Mar 2017 19:43:26 GMT):
(for me, in chaincode, but it's something weird i'm doing)

lehors (Mon, 13 Mar 2017 11:43:10 GMT):
hi there

lehors (Mon, 13 Mar 2017 11:43:34 GMT):
does anybody know of a reason for not being able to run two networks within the same environment?

lehors (Mon, 13 Mar 2017 11:43:53 GMT):
I've managed to get two sets of 4 nodes running, sharing one CA

lehors (Mon, 13 Mar 2017 11:44:20 GMT):
but the chaincode deployment on the second network seems to fail for some reason

lehors (Mon, 13 Mar 2017 11:44:32 GMT):
I should say that this is using v0.6

lehors (Mon, 13 Mar 2017 11:45:11 GMT):
the weird thing is that the peer seem to believe the chaincode did deploy successfully

lehors (Mon, 13 Mar 2017 11:45:11 GMT):
the weird thing is that the peer seems to believe the chaincode did deploy successfully

lehors (Mon, 13 Mar 2017 11:45:25 GMT):
but I can see there are no chaincode containers running

lehors (Mon, 13 Mar 2017 11:45:41 GMT):
and any subsequent attempt to query or invoke fails

lehors (Mon, 13 Mar 2017 11:46:34 GMT):
this is the error I get: Error: Error querying chaincode: rpc error: code = 2 desc = Error:Failed to launch chaincode spec(Could not get deployment transaction for 4fd71582cea191fb9e890 8b413d377ceb9ddfb88c8b1d345e81be2417c5f3829d922683fe4ad6e7ac4d77669eefc726d5b18aac7b52134d922bd93a5499d0ebc - LedgerError - ResourceNotFound: ledger: resource n ot found)

lehors (Mon, 13 Mar 2017 11:48:32 GMT):
this is the result of deploy: 15:39:23.703 [chaincodeCmd] chaincodeDeploy -> INFO 003 Deploy result: type:GOLANG chaincodeID: ctorMsg :

normand (Mon, 13 Mar 2017 12:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=pwoBu6FMRx4Yb9ZmC) @lehors Hi! Try to attach to docker container and check logs

lehors (Mon, 13 Mar 2017 12:33:12 GMT):
I understand but what I'm asking for now is whether there is any known limitation

jjohnst (Mon, 13 Mar 2017 12:35:01 GMT):
Has joined the channel.

normand (Mon, 13 Mar 2017 12:36:33 GMT):
Not sure about that. Had same problem when deploy request returned me chaincodeID, but containers weren't created. It couldn't find the baseimage for docker. But u are trying to run on same environment, so docker host is the same and think it's not the problem I encountered.

normand (Mon, 13 Mar 2017 12:37:51 GMT):
There are channels in hyperledger for working within a channel with different chaincodes or different channels for different chaincodes, but as far as I know, this mechanism was implemented in v1.0

lehors (Mon, 13 Mar 2017 12:38:22 GMT):
that's right

lehors (Mon, 13 Mar 2017 12:38:41 GMT):
in my case, the chaincode works just fine on the first set of nodes

lehors (Mon, 13 Mar 2017 12:38:57 GMT):
it's only on the second one that it fails

lehors (Mon, 13 Mar 2017 12:39:34 GMT):
given that it's on the same host it should have the images all right

lehors (Mon, 13 Mar 2017 12:40:05 GMT):
I guess I will need to dig into the logs and code ... or give up

normand (Mon, 13 Mar 2017 12:42:42 GMT):
Are nodes running in PBFT?

kletkeman (Mon, 13 Mar 2017 12:49:41 GMT):
@lehors Have you tried with different parameters for the second set of nodes? The reason I ask is that changing even one thing about the deploy (in this case parameters) will change the ID of the chaincode and thus the name of the container. This might help.

lehors (Mon, 13 Mar 2017 12:50:40 GMT):
yeah, I tried that and did get a different name but that didn't seem to help unfortunately

lehors (Mon, 13 Mar 2017 12:51:57 GMT):
I also thought there might be a conflict with the names

lehors (Mon, 13 Mar 2017 12:52:06 GMT):
now I wonder whether the conflict isn't with the ports

lehors (Mon, 13 Mar 2017 12:52:46 GMT):
that would seem to me to be the most likely cause but what do I know? :)

kletkeman (Mon, 13 Mar 2017 12:53:14 GMT):
Sorry to hear that ... it's the most obvious possibility. Have you set the logs on the peer to DEBUG? That might provide some info. Also, does your second set of nodes have the same level of network access? And are the ports changed correctly? Meaning -- each peer must have unique port assignments, which is done inside the docker-compose file (as I am sure that you know). Did you remember to continue incrementing the port numbers?

lehors (Mon, 13 Mar 2017 12:53:16 GMT):
(answer: just enough to get in trouble ;-)

kletkeman (Mon, 13 Mar 2017 12:53:48 GMT):
i.e. no ports can overlap

kletkeman (Mon, 13 Mar 2017 12:53:52 GMT):
I think

kletkeman (Mon, 13 Mar 2017 12:54:03 GMT):
so I think we agree on the next possible issue

lehors (Mon, 13 Mar 2017 12:54:09 GMT):
yes, I've changed the ports and I'm confident the nodes are well connected each in their own network

kletkeman (Mon, 13 Mar 2017 12:54:25 GMT):
hmmm ... wow ... stump city

lehors (Mon, 13 Mar 2017 12:54:27 GMT):
it's really a problem with the cc deployment

lehors (Mon, 13 Mar 2017 12:54:50 GMT):
so, I will try to dig into those logs (which are way too verbose!)

kletkeman (Mon, 13 Mar 2017 12:54:51 GMT):
which is the first real transaction on that sub network

kletkeman (Mon, 13 Mar 2017 12:55:10 GMT):
I agree on the verbose ... you get slammed with pbft logs that overwhelm the rest

lehors (Mon, 13 Mar 2017 12:55:22 GMT):
yep

kletkeman (Mon, 13 Mar 2017 12:55:36 GMT):
but somewhere in there will be the deploy and there are followon logs that might be illustrative ...

lehors (Mon, 13 Mar 2017 12:57:24 GMT):
thanks

DannyWong (Mon, 13 Mar 2017 15:13:28 GMT):
@StevenLanders good if you can share a bit more on your 2FA chaincode use case... i m designing something similar...

jwalt (Mon, 13 Mar 2017 15:22:31 GMT):
Has joined the channel.

StevenLanders (Mon, 13 Mar 2017 15:27:17 GMT):
@DannyWong we were trying to keep as much of sensitive logic as possible in the chaincode to get the security advantages of decentralized validation. Technically it's pretty straightforward: it involves chaincode checking the value of the 2FA code from the payload against some datasource (e.g., world state).

StevenLanders (Mon, 13 Mar 2017 15:28:22 GMT):
(I'll say that ideally it belongs upstream from chaincode (authentication in general is upstream))

StevenLanders (Mon, 13 Mar 2017 15:29:06 GMT):
(it may have been going overboard to put it in the chaincode)

DannyWong (Mon, 13 Mar 2017 15:32:49 GMT):
in fact it makes sense to put sensitive logic in chaincode as long as it produces deterministic result...

DannyWong (Mon, 13 Mar 2017 15:33:25 GMT):
e.g. if we can get a "trusted" timestamp in chaincode, then it will be great

kletkeman (Mon, 13 Mar 2017 16:24:25 GMT):
@DannyWong https://jira.hyperledger.org/browse/FAB-2701

antoniovassell (Mon, 13 Mar 2017 16:26:26 GMT):
Has joined the channel.

kletkeman (Mon, 13 Mar 2017 16:28:19 GMT):
@StevenLanders @DannyWong I'm curious as to the use case that requires that 2FA be done in chaincode? Basically, you want the COP to do its magic, and if that include 2FA then so be it. By the time you get the transaction (invoke or query), you have a known user and thus it is effectively signed, is it not? Also, there is the transient area in which to pass keys should you be doing obfuscation / anonymization and so on. The chaincode will want to enforce ACLs based on ID or ORG, but otherwise I don't se why the chaincode would be involved in the mechanics of auth in any way.

DannyWong (Mon, 13 Mar 2017 16:35:14 GMT):
Yes for the jira, i am tracking it

DannyWong (Mon, 13 Mar 2017 16:36:02 GMT):
For thr 2fa, i received a requirement now n thinking how to implement it

DannyWong (Mon, 13 Mar 2017 16:36:39 GMT):
The ca can be a good and natural place to integrate with biometric auth like FIDO

kletkeman (Mon, 13 Mar 2017 16:38:57 GMT):
@DannyWong Yeah, I prefer a string separation of duties. Chaincode's purview is the object model and API (transactions and queries) while the ca's purview is authentication for all clients. I would hate to see the line blurred as it is non-intuitive and ultimately not maintainable ...

chaitanya (Mon, 13 Mar 2017 17:06:33 GMT):
Has joined the channel.

chaitanya (Mon, 13 Mar 2017 17:07:12 GMT):
Hello everyone, is this the right place to ask about an error I'm getting on trying to deploy a chaincode on v1.0?

chaitanya (Mon, 13 Mar 2017 17:09:38 GMT):
Hello everyone, is this the right place for me to ask about an error I am getting on trying to deploy a chaincode on Fabric1.0?

chaitanya (Mon, 13 Mar 2017 17:09:38 GMT):
Hello everyone, is this the right place for me to ask about an error I am getting on trying to deploy a chaincode on Fabricv1.0?

chaitanya (Mon, 13 Mar 2017 17:09:38 GMT):
Hello everyone, is this the right place for me to ask about an error I am getting on trying to deploy a chaincode on Fabric-v1.0?

chaitanya (Mon, 13 Mar 2017 17:23:48 GMT):
I'm getting an error:`Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to deploy chaincode spec(Error creating image: %!s())` on deploying chaincodes using via CLI. Any ideas as to what am I missing here?

chaitanya (Mon, 13 Mar 2017 17:23:48 GMT):
I'm getting an error: `Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to deploy chaincode spec(Error creating image: %!s())` on deploying chaincodes using via CLI. Any ideas as to what am I missing here?

StevenLanders (Mon, 13 Mar 2017 18:01:37 GMT):
@kletkeman I think I agree with that. The thought was to use the decentralized peers to limit the attack surface for hacking, and it more-or-less got out of hand. We ended up pushing more authentication into the chaincode in that effort.

mohamoud.egal (Mon, 13 Mar 2017 19:55:29 GMT):
Has joined the channel.

mohamoud.egal (Mon, 13 Mar 2017 19:56:49 GMT):

Message Attachments

bkvellanki (Mon, 13 Mar 2017 22:45:56 GMT):
First Issue: Not able to start the cli container when I execute ./generateCfgTx.sh or ./network.sh. 2nd Issue - Also, I am not able to join the channel manually after creating the channel through CHANNEL_NAME= docker-compose up -d. f61de9057d15 dev-peer3-mycc-1.0 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer3-mycc-1.0 bfc2384bc560 dev-peer0-mycc-1.0 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer0-mycc-1.0 f7463485b4fe dev-peer2-mycc-1.0 "chaincode -peer.a..." 5 minutes ago Up 5 minutes dev-peer2-mycc-1.0 ef5327d8b5b2 hyperledger/fabric-peer "/bin/bash -c './s..." 5 minutes ago Exited (0) 4 minutes ago cli 6812e236050c hyperledger/fabric-peer "peer node start -..." 5 minutes ago Up 5 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer3 cc60631eb5dd hyperledger/fabric-peer "peer node start -..." 5 minutes ago Up 5 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer2 0177f0b9b18a hyperledger/fabric-peer "peer node start -..." 5 minutes ago Up 5 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1 90509019e42b hyperledger/fabric-peer "peer node start -..." 5 minutes ago Up 5 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0 8d41684ba5de hyperledger/fabric-orderer "orderer" 5 minutes ago Up 5 minutes 0.0.0.0:7050->7050/tcp orderer0 I dont know why is my cli exiting.. and why am I not able to join the block, I created any pointers

JonathanTan (Tue, 14 Mar 2017 03:29:35 GMT):
Has joined the channel.

amilazzo (Tue, 14 Mar 2017 09:18:50 GMT):
Has joined the channel.

martijnwouters (Tue, 14 Mar 2017 12:36:08 GMT):
Has joined the channel.

krupabathia (Tue, 14 Mar 2017 12:37:22 GMT):
Has joined the channel.

ruslan.kryukov (Tue, 14 Mar 2017 15:53:37 GMT):
Has joined the channel.

karysto (Tue, 14 Mar 2017 20:48:13 GMT):
Has joined the channel.

schwentker2 (Tue, 14 Mar 2017 21:18:46 GMT):
Has joined the channel.

karysto (Wed, 15 Mar 2017 00:24:27 GMT):
Hi there, new to hyperledger development, I'm digging around examples and finding that the common setup for every example I've come across follows this pattern of having an `Invoke` function, which takes in the name and args for a function, RPC-style, and the function name is mapped to a custom application function in Go to interact with the ledger. Is this RPC-style function calling the only way to interact with the ledger?

karysto (Wed, 15 Mar 2017 00:24:27 GMT):
Hi there, new to hyperledger development, I'm digging around examples and finding that the common setup for every example I've come across follows this pattern of having an `Invoke` function, which takes in the name and args for a function, RPC-style, and the function name is mapped to a custom application function in Go to interact with the ledger. Is this RPC-style function calling the only way to interact with the ledger for developers? Aside from the SDKs in other languages

karysto (Wed, 15 Mar 2017 00:24:27 GMT):
Hi there, new to hyperledger development, I'm digging around examples and finding that the common setup for every example I've come across follows this pattern of having an `Invoke` function, which takes in the name and args for a function, RPC-style, and the function name is mapped to a custom application function in Go to interact with the ledger. Is this RPC-style function calling the only way to interact with the ledger for developers? Aside from the SDKs in other languages

karysto (Wed, 15 Mar 2017 00:24:27 GMT):
Hi there, new to hyperledger development, I'm digging around examples and finding that the common setup for every example I've come across follows this pattern of having an `Invoke` function, which takes in the name and args for a function, RPC-style, and the function name is mapped to a custom application function in Go to interact with the ledger. Is this RPC-style function calling the only way to interact with the ledger for developers?

karysto (Wed, 15 Mar 2017 00:24:27 GMT):
Hi there, new to Fabric and chaincode development, I'm digging around examples and finding that the common setup for every example I've come across follows this pattern of having an `Invoke` function, which takes in the name and args for a function, RPC-style, and the function name is mapped to a custom application function in Go to interact with the ledger. Is this RPC-style function calling the only way to interact with the ledger for developers?

karysto (Wed, 15 Mar 2017 00:27:34 GMT):
Is there a REST-API planned for v1.0 as with previous versions?

karysto (Wed, 15 Mar 2017 00:27:34 GMT):
Is there a REST-API planned for v1.0 as there was with previous versions of Fabric?

karysto (Wed, 15 Mar 2017 00:28:56 GMT):
I know about the Node and Python SDKs, just curious

karysto (Wed, 15 Mar 2017 00:28:56 GMT):
I've looked into the Node and Python SDKs already, just curious

DannyWong (Wed, 15 Mar 2017 03:05:28 GMT):
I dun think there will be a direct RESTful API like v0.6

DannyWong (Wed, 15 Mar 2017 03:06:21 GMT):
they move from RESTful (sync req/response style) to GRPC one as Fabric is a more event based / bidirectional / async nature

DannyWong (Wed, 15 Mar 2017 03:06:43 GMT):
you can wrap the logic with NodeJS SDK to expose REST if needed

DannyWong (Wed, 15 Mar 2017 03:07:11 GMT):
Fabric CA has RESTful API... as it is "sync" based, there is a Swagger file for you to see the API

DannyWong (Wed, 15 Mar 2017 03:08:16 GMT):
@here, in the past (v0.6), when we deploy a chaincode, there is something "ACL" to specify who can actually call the chaincode

DannyWong (Wed, 15 Mar 2017 03:09:27 GMT):
is it gone now? (my initial thought: now we have multi-channel architecture that only relevant parties are in that channel, then we instantiate that piece of chaincode on that channel, instead of just deploy it like in the past)

levinkwong (Wed, 15 Mar 2017 03:11:00 GMT):
Has joined the channel.

DannyWong (Wed, 15 Mar 2017 03:12:01 GMT):
but the ACL per contract level seems to me is... different level of thing

DannyWong (Wed, 15 Mar 2017 03:12:31 GMT):
as we can still have many smart contract that we want some particular eCert can trigger it, some cant

DannyWong (Wed, 15 Mar 2017 03:12:41 GMT):
within same channel

praveennagpal (Wed, 15 Mar 2017 04:02:46 GMT):
Has joined the channel.

praveennagpal (Wed, 15 Mar 2017 04:14:15 GMT):
Hi, can somebody please send me a link for fabric node js sdk specs?

praveennagpal (Wed, 15 Mar 2017 04:15:24 GMT):
i am struggling to find it. I just get a link to http://fabric-sdk-node.readthedocs.io/

praveennagpal (Wed, 15 Mar 2017 04:15:32 GMT):
which does not provide the specs details

praveennagpal (Wed, 15 Mar 2017 04:15:49 GMT):
i am looking for fabric v1.0 specs

antoniovassell (Wed, 15 Mar 2017 05:29:49 GMT):
@praveennagpal you mean docs

antoniovassell (Wed, 15 Mar 2017 05:30:27 GMT):
honestly don't know what is the right one

antoniovassell (Wed, 15 Mar 2017 05:30:29 GMT):
lol

praveennagpal (Wed, 15 Mar 2017 05:30:36 GMT):
yes i meant the docs needed for integration with the fabric client

antoniovassell (Wed, 15 Mar 2017 05:30:59 GMT):
but that's one of the links

praveennagpal (Wed, 15 Mar 2017 05:31:04 GMT):
i have a decentralised app which I need to integrate with fabric

praveennagpal (Wed, 15 Mar 2017 05:31:22 GMT):
so i was thinking of using the fabric node js sdk

praveennagpal (Wed, 15 Mar 2017 05:31:45 GMT):
how do I use it unless I have the published specifications?

antoniovassell (Wed, 15 Mar 2017 05:31:54 GMT):
the best getting to started one so far is

antoniovassell (Wed, 15 Mar 2017 05:31:55 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html

antoniovassell (Wed, 15 Mar 2017 05:33:35 GMT):
fabric v1.0

antoniovassell (Wed, 15 Mar 2017 05:34:03 GMT):
the nodejs sdk is 0.1.0

antoniovassell (Wed, 15 Mar 2017 05:34:03 GMT):
the nodejs sdk is 0.1.0 though in this tutorial

antoniovassell (Wed, 15 Mar 2017 05:34:35 GMT):
latest is 0.2.1, but stuff are breaking

praveennagpal (Wed, 15 Mar 2017 05:35:01 GMT):
@antoniovassell : have seen this set up step..

praveennagpal (Wed, 15 Mar 2017 05:35:34 GMT):
but if I have to send transactions, deploy chain code, query chain code..there should be some apis available to do it..

antoniovassell (Wed, 15 Mar 2017 05:35:48 GMT):
there is, look at the code

antoniovassell (Wed, 15 Mar 2017 05:35:50 GMT):
also

praveennagpal (Wed, 15 Mar 2017 05:35:55 GMT):
i know they are retiring the REST api

praveennagpal (Wed, 15 Mar 2017 05:35:56 GMT):
ok

antoniovassell (Wed, 15 Mar 2017 05:36:04 GMT):
look at the test specs in the repository

antoniovassell (Wed, 15 Mar 2017 05:36:22 GMT):
..until there is better documentation

antoniovassell (Wed, 15 Mar 2017 05:36:45 GMT):
yea i saw that somewhere

antoniovassell (Wed, 15 Mar 2017 05:37:02 GMT):
#confused

antoniovassell (Wed, 15 Mar 2017 05:37:28 GMT):
think #fabric-sdk-node would be a better channel regarding node sdk

praveennagpal (Wed, 15 Mar 2017 05:38:27 GMT):
let me try that

antoniovassell (Wed, 15 Mar 2017 05:40:34 GMT):
@praveennagpal repo is here by the way https://github.com/hyperledger/fabric-sdk-node/tree/master/test/integration

praveennagpal (Wed, 15 Mar 2017 05:41:13 GMT):
thanks @antoniovassell this helps..

antoniovassell (Wed, 15 Mar 2017 05:41:31 GMT):
:thumbup:

praveennagpal (Wed, 15 Mar 2017 06:36:16 GMT):
I found this https://docs.google.com/document/d/1R5RtIBMW9fZpli37E5Li5_Q9ve3BnQ4q3gWmGZj6Sv4/edit#

praveennagpal (Wed, 15 Mar 2017 06:36:37 GMT):
but very much work in progress for the fabric client api specs

LoupTheron (Wed, 15 Mar 2017 09:33:47 GMT):
Has joined the channel.

thojest (Wed, 15 Mar 2017 10:29:19 GMT):
hey guys im using hyperledger v0.6

thojest (Wed, 15 Mar 2017 10:29:36 GMT):
is it somehow possible to loop through all rows of a table?

zemtsov (Wed, 15 Mar 2017 10:33:25 GMT):
stub.GetRows should return all rows to you

thojest (Wed, 15 Mar 2017 10:44:16 GMT):
@zemtsov thx, but for GetRows you have to provide a key dont you ?

zemtsov (Wed, 15 Mar 2017 10:48:54 GMT):
yes. I think you should have the key since there is a key value storage

zemtsov (Wed, 15 Mar 2017 10:49:35 GMT):
If you have a list of all keys, you can iterate all rows

thojest (Wed, 15 Mar 2017 10:50:56 GMT):
so my problem is, I have table where there are users and their holdings users is a key and holdings is not

thojest (Wed, 15 Mar 2017 10:51:26 GMT):
what I want is to simply get the whole table

thojest (Wed, 15 Mar 2017 10:51:59 GMT):
so like for the first entry: get the user and his holding

thojest (Wed, 15 Mar 2017 10:52:04 GMT):
than for the second and so on

thojest (Wed, 15 Mar 2017 10:52:09 GMT):
*then

zemtsov (Wed, 15 Mar 2017 10:52:19 GMT):
if users are keys you probably can store the list of them as a separate value

zemtsov (Wed, 15 Mar 2017 10:53:00 GMT):
do you have the list of all users?

thojest (Wed, 15 Mar 2017 10:53:09 GMT):
no :D that is exactly the point

thojest (Wed, 15 Mar 2017 10:53:40 GMT):
and im unable to find a simple "loop through the table" function

zemtsov (Wed, 15 Mar 2017 10:57:16 GMT):
GetState and PutState are native functions for KVS there. There in no tables. Such functions as GetTable, GetRow just use Get/PutState to operate data

zemtsov (Wed, 15 Mar 2017 10:57:16 GMT):
GetState and PutState are native functions for KVS there. There is no tables. Such functions as GetTable, GetRow just use Get/PutState to operate data

zemtsov (Wed, 15 Mar 2017 10:57:31 GMT):
so I think you need the key anyway to read anything

thojest (Wed, 15 Mar 2017 10:58:08 GMT):
hmm... ok thx anyway :D

thojest (Wed, 15 Mar 2017 10:58:32 GMT):
what i could do is add a key column which gives an integer to every user

zemtsov (Wed, 15 Mar 2017 10:59:03 GMT):
Yes, use UserID as the key

kletkeman (Wed, 15 Mar 2017 14:37:43 GMT):
@thojest The table APIs are gone from v1, so I recommend that you don't play with those. They were just a wrapper on the K:V database anyway. Since GetState and PutState still work fine in v1, it behoves you to work with those.

thojest (Wed, 15 Mar 2017 14:38:17 GMT):
@kletkeman thank you. i will try it

kletkeman (Wed, 15 Mar 2017 14:39:12 GMT):
As for looping, you can get an iterator to loop through a range of keys, so careful naming of keys (and remember that composite keys are your friend) will allow you to do a lot of things that tables promise. Consider using JSON objects as your data and you have much of what you need, and it is portable forward into v1.

kletkeman (Wed, 15 Mar 2017 14:42:38 GMT):
If you want to take the short path, examine the ctasset.go file in my contract platform. It contains "readAllAssets" as an implementation of class-based CRUD style manipulation. There are three sample contracts associated as well. The v0.6 platform is here: https://github.com/ibm-watson-iot/blockchain-samples/tree/master/contracts/platform It's a bit fresh, and the documentation is lagging, but there is a docs folder at the top level that has a few articles to get you started, notably this one: https://github.com/ibm-watson-iot/blockchain-samples/blob/master/docs/HyperledgerContractsIntroBestPracticesPatterns.md

Lin-YiTang (Wed, 15 Mar 2017 16:18:05 GMT):
Has joined the channel.

jdockter (Wed, 15 Mar 2017 16:41:11 GMT):
Has joined the channel.

DannyYang (Thu, 16 Mar 2017 00:53:31 GMT):
Has joined the channel.

genggjh (Thu, 16 Mar 2017 01:23:46 GMT):
Has joined the channel.

praveennagpal (Thu, 16 Mar 2017 04:52:33 GMT):
What is the pattern used for notifying a new chaincode id from the originator/creator to other selected members of the network in Fabric v1.0? Do we need some messaging here outside chain or is there some capability within client sdk to watch on the world state for new chaincode instances?

anthonymo (Thu, 16 Mar 2017 06:58:11 GMT):
Has joined the channel.

o.o. (Thu, 16 Mar 2017 08:13:02 GMT):
Has joined the channel.

ecn (Thu, 16 Mar 2017 08:24:16 GMT):
Has joined the channel.

chaitanya (Fri, 17 Mar 2017 07:20:25 GMT):
Could someone point me to a link or any documentation, mentioning how to write and execute unit tests for chaincode?

kletkeman (Fri, 17 Mar 2017 14:32:02 GMT):
@praveennagpal An application listening for a "block" event could parse the block and look for deploy transactions. The "init()" method for a chaincode could emit an event called "new chaincode version", which would rely on world state storing its name and version (which you could pass into the chaincode during deploy) and thus your own chaincodes could uniquely identify themselves as having been deployed or upgraded.

kletkeman (Fri, 17 Mar 2017 14:46:37 GMT):
@chaitanya There is some mention of unit testing here: https://github.com/hyperledger/fabric/blob/master/docs/source/CONTRIBUTING.rst, but the references in there are the standard sort of unit tests that execute when you run "go test". I have examples of that in our iot contract platform and it works very well for utility modules etc. But if you are asking about the "mock" interface for testing a chaincode as if it were deployed, then I must say that scanning the code and the docs (*.rst) has yielded nothing. I know that there was a breaking change to the stuib API in v0.6 for mocking, and I think I';ve seen some tests based on that somewhere, but I can find no mention in the v1 code or doc bases. Sorry.

donjohnny (Fri, 17 Mar 2017 18:03:58 GMT):
Has joined the channel.

jtrayfield (Sat, 18 Mar 2017 19:20:58 GMT):
Has joined the channel.

jtrayfield (Sat, 18 Mar 2017 19:25:37 GMT):
is there any replacement for the table functions in v1? some helper functions? I realize everything was built on top of GetState/PutState, but does anybody have table-like functions?

hycind (Sun, 19 Mar 2017 01:54:06 GMT):
Has joined the channel.

DannyWong (Sun, 19 Mar 2017 08:39:39 GMT):
we have composite key (like hash key + range key in DynamoDB)

abutler (Sun, 19 Mar 2017 10:06:18 GMT):
Has joined the channel.

kuangchao (Mon, 20 Mar 2017 08:00:38 GMT):
I have a Facebook Fabirc forum on Facebook, welcome to join https://www.facebook.com/groups/876837335752599

padmaja (Mon, 20 Mar 2017 09:50:07 GMT):
Has joined the channel.

dorrakhribi (Mon, 20 Mar 2017 10:21:01 GMT):
Has joined the channel.

SyneBlockChainTeam (Mon, 20 Mar 2017 11:27:55 GMT):
While referring video "V1 Chaincode install and instentiate" from "https://www.youtube.com/watch?v=itn2Ps8sarE", all worked fine but we are facing one issue during the following "query" command: CORE_PEER_ADDRESS=peer0:7051 peer chaincode query -C myc -n mycc -v v0 -c '{"Args":["query ","a"]}' -o orderer:5005 Error: "Error endorsing query: rpc error: code = 2 desc = failed to obtain cds for mycc - transaction not found mycc/myc" Any clue please? Thanks.

SyneBlockChainTeam (Mon, 20 Mar 2017 11:27:55 GMT):
To test chaincode_example02 (of fabric v1), we are referring this video https://www.youtube.com/watch?v=itn2Ps8sarE While executing the 'init' command : CORE_PEER_ADDRESS=peer0:7051 peer chaincode instantiate -C myc -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v v0 -c '{"Args":["init","a","100","b","200"]}' -o orderer:5005 ... we are getting Error : Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image Please let us know if someone knows the clue of this error. Thanks.

dhuseby (Mon, 20 Mar 2017 17:58:06 GMT):
Has joined the channel.

Amanskywalker (Tue, 21 Mar 2017 02:04:18 GMT):
Has joined the channel.

Godwin (Tue, 21 Mar 2017 04:38:48 GMT):
Has joined the channel.

raghavsood (Tue, 21 Mar 2017 09:00:51 GMT):
Has joined the channel.

SyneBlockChainTeam (Tue, 21 Mar 2017 12:37:28 GMT):
"Endorser related Issue" While referring video "V1 Chaincode install and instentiate" from "https://www.youtube.com/watch?v=itn2Ps8sarE", all worked fine but we are facing one issue during the following "query" command: CORE_PEER_ADDRESS=peer0:7051 peer chaincode query -C myc -n mycc -v v0 -c '{"Args":["query ","a"]}' -o orderer:5005 Error: "Error endorsing query: rpc error: code = 2 desc = failed to obtain cds for mycc - transaction not found mycc/myc" Any clue please? Thanks.

weeds (Tue, 21 Mar 2017 17:11:48 GMT):
I came across this article that I thought people might be interested in seeing: https://developer.ibm.com/blockchain/2017/03/17/migrate-fabric-v0-6-based-chaincode-run-latest-fabric-v1-0

weeds (Tue, 21 Mar 2017 17:11:57 GMT):
It talks about how to migrate from Fabric Version 0.6 to Fabric Version 1.0.

weeds (Tue, 21 Mar 2017 17:12:44 GMT):
@chaitanya @bmos299 I would go to the fabric-quality channel to ask about testing. They have an automated CI they have built and the experts are on that channel

bmos299 (Tue, 21 Mar 2017 17:12:44 GMT):
Has joined the channel.

kletkeman (Tue, 21 Mar 2017 18:23:59 GMT):
@weeds That's a good doc, although there is a lot of clutter regarding the specifics of the API being ported. Might be ab idea to put a new migration section with a reference to that doc at readthedocs.

kletkeman (Tue, 21 Mar 2017 18:23:59 GMT):
@weeds That's a good doc, although there is a lot of clutter regarding the specifics of the API being ported. Might be an idea to put a new migration section with a reference to that doc at readthedocs.

weeds (Wed, 22 Mar 2017 04:01:01 GMT):
Right agree- I'll have to ask whether the authors are willing to contribute and clean it up a bit

weeds (Wed, 22 Mar 2017 04:01:14 GMT):
@kletkeman

Sandeep (Wed, 22 Mar 2017 13:51:25 GMT):
Has joined the channel.

thojest (Wed, 22 Mar 2017 15:04:32 GMT):
hey guys im using v0.6 still

thojest (Wed, 22 Mar 2017 15:04:56 GMT):
i have a network of several peer nodes in pbft but running locally so no docker

thojest (Wed, 22 Mar 2017 15:05:12 GMT):
then i deploy the chaincode to one of the nodes

thojest (Wed, 22 Mar 2017 15:05:28 GMT):
and then whenver i query or invoke the chaincode i get transport: http2Server.HandleStreams failed to receive the preface from client: EOF

thojest (Wed, 22 Mar 2017 15:05:42 GMT):
BUT ONLY on the peer node to which the chaincode was deployed

thojest (Wed, 22 Mar 2017 15:06:00 GMT):
what does it mean, can i ignore it or is something not working

kletkeman (Wed, 22 Mar 2017 16:23:28 GMT):
@thojest What do the other peers return?

thojest (Wed, 22 Mar 2017 16:32:08 GMT):
@kletkeman problem solved, got a new one :d

mraikwar (Thu, 23 Mar 2017 01:03:06 GMT):
Has joined the channel.

anik (Thu, 23 Mar 2017 06:05:14 GMT):
Has joined the channel.

RishabhSoni (Thu, 23 Mar 2017 06:32:05 GMT):
Has joined the channel.

RishabhSoni (Thu, 23 Mar 2017 06:32:59 GMT):
can i send a http request from the chaincode to a server outside of the fabric network???

RishabhSoni (Thu, 23 Mar 2017 06:33:17 GMT):
i am new to this...it can be a dumb question

xuzhao103389 (Thu, 23 Mar 2017 10:38:06 GMT):
Has joined the channel.

matanyahu (Thu, 23 Mar 2017 10:58:30 GMT):
Has joined the channel.

rrader (Thu, 23 Mar 2017 12:35:03 GMT):
host:port/chaincode method "deploy" what is actually doing this method?

anrodon (Thu, 23 Mar 2017 14:12:57 GMT):
Has joined the channel.

anrodon (Thu, 23 Mar 2017 14:13:01 GMT):
hey guys

anrodon (Thu, 23 Mar 2017 14:13:12 GMT):
I'm having problems trying to get the role of the caller

anrodon (Thu, 23 Mar 2017 14:13:19 GMT):
which is the best way to do that?

anrodon (Thu, 23 Mar 2017 14:13:26 GMT):
do you have any example?

anrodon (Thu, 23 Mar 2017 14:13:31 GMT):
thanks in advance :D

farhan3 (Thu, 23 Mar 2017 16:12:45 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Dn4RCQwsu3JTuzimS) @RishabhSoni By server do you mean any generic server? If so, I've used `github.com/go-resty/resty` in the past to make REST calls from chaincode.

rrader (Thu, 23 Mar 2017 19:50:35 GMT):
I want to store in hyperledger data about exchange usd to eur, something like(date -> rate) "21 Mar 2017" -> 0.92940 "22 Mar 2017" -> 0.92583 "23 Mar 2017" -> 0.92699 so, as I understand, first I should deploy a chaincode with empty map, and everyday I should call invoke to update the map is this how it should be?

anrodon (Thu, 23 Mar 2017 20:08:40 GMT):
why do you need a Blockchain for that?

markparz (Thu, 23 Mar 2017 20:22:24 GMT):
Has joined the channel.

rrader (Thu, 23 Mar 2017 21:12:22 GMT):
it is for university

rrader (Thu, 23 Mar 2017 21:12:59 GMT):
and I want to know if I understand correct how it should work

WaleIBM (Fri, 24 Mar 2017 00:32:57 GMT):
Has joined the channel.

RishabhSoni (Fri, 24 Mar 2017 06:12:35 GMT):
I have this scenario. B got in agreement in A to solve a mathematical puzzle for him. This matematical puzzle include a encrypted string. A knows the decrypted text beforehand, he just want see B working(for fun). A stores the decrypted text and encrypted string in a database. Duration of this work is several days. After completion/decrypting B submits the decrypted text on the fabric network. Chaincode may have some access to the database from where he matches the answer. How can i convert all this in smart contract to overcome problems like A must pay to B if he successfully decrypt the text. I just need a high level smart contract, not the code. I am new to this i just want to know if contract can be implemented in hyperledger fabric smart contract.

yyyyyyy9 (Fri, 24 Mar 2017 06:27:46 GMT):
Has joined the channel.

ranjan008 (Fri, 24 Mar 2017 06:45:57 GMT):
Has joined the channel.

balakrishna.devasani (Fri, 24 Mar 2017 11:13:12 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. is there any example of such login/logout feature in repository ? using HFC node-sdk

kletkeman (Fri, 24 Mar 2017 13:00:48 GMT):
@RishabhSoni It helps to think of the smart contract as more or less equivalent to a web application with an API. Meaning that you design a datamodel to reflect what you want to be able to do, then a sensible API to reflect how you would like the data to flow in and out, and finally you codify it in whatever language you are working with (JavaScript in web apps, Go in smart contracts, or a sort of hybrid of custom datamodel plus Javascript event model for transactions in composer). There are many details to deal with, especially in v1, but the basics are always the same. Note: if you want privacy etc, things get a lot more complicated, but to simply reflect your scenario into chaincode is quite straightforward. Note that I have always stored everything as JSON objects, which is where fabric has evolved with v1 as well. This makes it pretty easy to understand how your asset states will have to change as events are received. You just do a lot of GetState and PutState to the asset identifiers.

RishabhSoni (Fri, 24 Mar 2017 13:22:00 GMT):
@kletkeman i definitely need some security over that as i understand that the chaincode deploys on both peer A and B. So basically B should not be able to see the decrypted text. What should i do in this scenario. Whare the database should be located show that only A can access it and both peer can endorese it.

kletkeman (Fri, 24 Mar 2017 14:11:58 GMT):
@RishabhSoni Ah yes, I see the issue. Well, there are a few different ways to approach it in a simple demo app. The simplest might be to have the test be one asset and the solution be a second asset (different but related composite keys in the ledger. You could then have a test admin have access to every key while those being tested have access to the test and their own solution key, but not the master solution key and nit any other person's solution key. That way, you can run many in parallel and "tested" people cannot see others' work. Example of asset keys: Key=TEST1 Key=TEST1Solution Key=Test1SolutionStudent1 Key=Test1SolutionStudent2 Student1 can see TEST1 and Test1SolutionStudent1 ... this is easily enforced since the student's ID is part of the key so you don't need any heavy admin solution. Use JSON objects to model the test and the solution and you can see how simple this is to implement. Anyway, just a thought ...

RishabhSoni (Fri, 24 Mar 2017 14:34:45 GMT):
can i block some onse money on a blockchain. Suppose A and B are in agreement, where B do a work for A. Work duration is in days and B want ensure that A must have the payable ammount after the completion of work. it may happen that B agrees to work because A have ammount, but A can spend the ammount during the work duration.

wasted_coder (Fri, 24 Mar 2017 14:39:17 GMT):
Has joined the channel.

wasted_coder (Fri, 24 Mar 2017 14:43:58 GMT):
I am new to the hyperledger. Although have some experience with bitcoin blockchain. In bitcoin blockchain I only executed money transaction on blockchain, but hyperledger provide facility to execute smart contract. I saw an example in hyperledger where confirmation messages are being stored on blockchain, like "asset delevered" and "time exceeded". I need help in understanding how thiese message block are different from transaction block.??? and how current ammount is calculated with these message blocks.

jeffgarratt (Fri, 24 Mar 2017 15:01:33 GMT):
@RishabhSoni you may wish to ask this question in https://chat.hyperledger.org/channel/fabric-composer, where I think they can accommodate this quite simply with their model.

jeffgarratt (Fri, 24 Mar 2017 15:03:16 GMT):
@RishabhSoni the recording from the "Introduction to Composer" meeting is now available on YouTube here: https://youtu.be/fdFUsrsv5iw

jeffgarratt (Fri, 24 Mar 2017 15:03:55 GMT):
they are working towards a HLv1.0 version

jeffgarratt (Fri, 24 Mar 2017 15:04:04 GMT):
fabric v1.0 I should say

kletkeman (Fri, 24 Mar 2017 15:27:15 GMT):
@RishabhSoni You can do quite literally any sequence of transactions that accomplishes your goals. Meaning that your data model and API work together to offer whatever features you define in your requirements / app specification.

GaryDee (Sat, 25 Mar 2017 10:21:00 GMT):
Has joined the channel.

rrader (Sat, 25 Mar 2017 14:50:45 GMT):
is it possible to allow for someone in hyperledger rights only to read, and to others read+write?

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

jackyqiu (Sun, 26 Mar 2017 20:37:27 GMT):
Has joined the channel.

rrader (Sun, 26 Mar 2017 21:14:26 GMT):
When I deploy a chaincode curl -X POST --header "Accept: application/json" "http://localhost:7050/chaincode" -d' { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" }, "ctorMsg": { "function":"init", "args":["a", "1000", "b", "2000"] }, "secureContext": "jim" }, "id": 1 }' I modified file "chaincode_example02.go" this file is in folder ""github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"" Is this ok, or I should compile this file? because know modifications are not applied

anrodon (Mon, 27 Mar 2017 08:48:34 GMT):
Hey guys

anrodon (Mon, 27 Mar 2017 08:48:51 GMT):
I have an empty result when reading the role and the account of the caller

anrodon (Mon, 27 Mar 2017 08:49:31 GMT):
I'm sending the attributes through the call and then getting them with the stub.ReadCertAttribute("role"); function

anrodon (Mon, 27 Mar 2017 08:49:37 GMT):
why is this happening?

subbu165 (Mon, 27 Mar 2017 12:13:32 GMT):
Hi There, for V1.0 how should I set up development environment if I'm not using vagrant?. Previously for V0.6, we just run the memberservice and peer separately like below: 1. github.com/hyperledger/fabric/membersrvc > ./membersrvc (This will start the memberservice which is called CA server I believe now) 2. github.com/hyperledger/fabric/peer > ./peer node start --peer-chaincodedev (this will start the peer in dev mode) 3. github.com/chainwalk/go/pmechainwalk> CORE_CHAINCODE_ID_NAME=chain01 CORE_PEER_ADDRESS=0.0.0.0:7051 ./ in 3 different terminals I will run this and after wards if I run any deploy, invoke services, the logs will appear in the 3rd/last window. As of now for V1.0 I had followed this url and ran the test as given there. http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html. please let me know after this in V1.0 what are the next steps to get there. Is there any documentation available some where?

mastersingh24 (Mon, 27 Mar 2017 21:55:42 GMT):
@subbu165 - assuming you want to do chaincode development, take a look at https://github.com/hyperledger/fabric/blob/master/docs/source/peer-chaincode-devmode.rst

raj (Tue, 28 Mar 2017 00:02:18 GMT):
Hi Subbu, The best example was for me https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/end-to-end.rst

raj (Tue, 28 Mar 2017 00:05:34 GMT):
it uses vagrant. without vagrant here are the steps

raj (Tue, 28 Mar 2017 00:05:36 GMT):
1) after getting fabric, 2) do a `make docker` 3) go to `fabric/examples/e2e_cli` 4) run `docker rm -f $(docker ps -aq)` 5) do a `./network.sh up

raj (Tue, 28 Mar 2017 00:05:57 GMT):
just make sure you have the latest docker images

raj (Tue, 28 Mar 2017 00:06:07 GMT):
all of this on V1

nhrishi (Tue, 28 Mar 2017 01:17:11 GMT):
Hi, Can someone pls explain what is the difference between deploy vs install & Instantiate chainccode now.

kletkeman (Tue, 28 Mar 2017 03:34:27 GMT):
@nhrishi Deploy on v0.6 would send a chaincode path to a peer, it would load the chaincode and build it, performing consensus with the rest of the validating peers, and if all was well they would all have it installed and running and ready to service invokes and queries. V1, on the o ther hand, introduces private channels. So you must create a channel, then install the chaincode on every peer that will use that channel, and then instantiate the chaincode on that channel (also called join I believe). End result is the same, but for only one of many channels.

kletkeman (Tue, 28 Mar 2017 03:35:29 GMT):
Look at the e2e.js test suite under the integration folder here: https://github.com/hyperledger/fabric-sdk-node/tree/master/test

nhrishi (Tue, 28 Mar 2017 06:21:23 GMT):
@kletkeman Thanks for detailed explanation. I understand now. just curious so deploy command is no longer valid in V1. We should install and then instantiate Correct?

Ying (Tue, 28 Mar 2017 09:30:08 GMT):
Who knows if there's any limitation of maximum chaincodes installed in one channel? Thanks

aso (Tue, 28 Mar 2017 10:06:55 GMT):
Has joined the channel.

lowry1515 (Tue, 28 Mar 2017 12:43:18 GMT):
Has joined the channel.

kletkeman (Tue, 28 Mar 2017 13:06:27 GMT):
@nhrishi yes, you need to have a channel created, then install the smart contract chaincode on the peers that you want on that channel, and finally instantiate the chaincode. Having peers join the channel might actually be a separate function ... you can check that by looking over how the e2e tests work ...

nhrishi (Tue, 28 Mar 2017 13:20:24 GMT):
Great Thanks! @kletkeman

subbu165 (Tue, 28 Mar 2017 13:40:32 GMT):
MSPDir

samdeir (Tue, 28 Mar 2017 14:48:58 GMT):
Has joined the channel.

DannyWong (Tue, 28 Mar 2017 16:27:39 GMT):
@Ying I think it depends on multiple factors, I think a max no. of files in a directory can be one of the factor

DannyWong (Tue, 28 Mar 2017 16:28:05 GMT):
ah do you mean how many chaincode can be instantiated on one channel

DannyWong (Tue, 28 Mar 2017 16:28:52 GMT):
no. of chaincode can be installed on peer should be mainy affected by max no. of file in single directory i think

DannyWong (Tue, 28 Mar 2017 16:30:02 GMT):
For how many chaincode can be instantiated on one channel? I think no answer until we have someone really test it... But in what use case will we instantiate so many chaincode on same channel

kletkeman (Tue, 28 Mar 2017 16:38:17 GMT):
@DannyWong There are use cases being discussed where a new channel will be made for every shipment in a large system. Right now, channels look like the best way to protect anonymity of a shipment from spying eyes. However, using a single channel with ACLs may also work well. Each incurs management overhead, but channels mean no extra code in chaincode. Might be a big difference and thus might make many channels the preference in some scenarios.

dorrakhribi (Tue, 28 Mar 2017 20:48:50 GMT):
hi everybody, i'm working on developing a java application that gives its users the ability to do financial transactions. i'm wondering if there will be communication between the different peers of my network. i mean, for example, in case of sending an amount from an account to another, and each account belongs to one user which itself belongs to a peer. so want to know how this communication behind this transaction is going to be established .

Ying (Wed, 29 Mar 2017 00:30:12 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DJAFCybyDpbAEFdFD) @DannyWong agree with you, I"ll test. My case is to use chaincode as somehow partition of my data, since I'm not sure current fabric supports scaled data or not.

DannyWong (Wed, 29 Mar 2017 00:31:12 GMT):
Cannot use channel to separate data?

DannyWong (Wed, 29 Mar 2017 00:31:49 GMT):
May i know what do u mean by scaled data?

gubl (Wed, 29 Mar 2017 06:37:55 GMT):
Has joined the channel.

kletkeman (Wed, 29 Mar 2017 13:25:46 GMT):
@DannyWong @Ying Channels are how data can be separated in such a way that only specific participants ever have access. However, channels are replicated in full across all participating peers, both the blockchain portion and the world state portion. There are no shards (and should not be by definition, unless a peer itself is split to enable higher speed r/w someday), so these copies are always complete. I hope that helps.

Ying (Wed, 29 Mar 2017 13:30:01 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=EY4DzbQHKfcfhYXbX) @kletkeman thanks for the info. My concern is data sacalability rather than complete, thus using chaincodes as partition like sql

kletkeman (Wed, 29 Mar 2017 13:35:22 GMT):
@ying Since you have only one peer and one database, the best you can probably do is to make the database itself scale up. I'm not sure if a remote database is supported, but it can probably be incorporated, in which case you do not need to artificially scale your chaincodes for data scaling alone. On the other hand, the concept of channels offers the opportunity to scale, since they can be processed in parallel. I.e. you must flow control any conflicting writes on the same channel, as you cannot have transactions touch the same keys inside one block. But if you manage to separate the data by channels, you can process the writes in parallel with impunity. And of course you have instantiated the chaincode on each channel separately, so you are in effect using chaincodes to partition data (although the channel is what effects the partitioning). I hope that helps.

Ying (Wed, 29 Mar 2017 13:48:07 GMT):
[ ] (https://chat.hyperledger.org/channel/chaincode-dev?msg=zv2Df8py6MAxm7Htb) @kletkeman your suggestion of scaling db is a good way, I think. Considering my needs of querying the chains history, I still have to use multiple chaincodes (in one channel), each for a piece of states. Currently multiple channels are not suitable for my case. Anyway, appreciation for your discussion.😀

kletkeman (Wed, 29 Mar 2017 13:49:47 GMT):
@ying Multiple contracts on a single channel can also be used. The r/w sets cannot conflict across chaincodes, but you may have quite a lot of chaincode to chaincode traffic and do remember that each runs in a separate container and communicates with gRPC. Good luck.

kletkeman (Wed, 29 Mar 2017 13:49:47 GMT):
@Ying Multiple contracts on a single channel can also be used. The r/w sets cannot conflict across chaincodes, but you may have quite a lot of chaincode to chaincode traffic and do remember that each runs in a separate container and communicates with gRPC. Good luck.

anrodon (Wed, 29 Mar 2017 13:56:05 GMT):
http://area51.stackexchange.com/proposals/107923/hyperledger?referrer=uwBppPb347ObXyZLiQ6nVQ2

kletkeman (Wed, 29 Mar 2017 14:03:49 GMT):
@anrodon Are you proposing that as an alternative to these fora?

kletkeman (Wed, 29 Mar 2017 14:03:49 GMT):
@anrodon Are you proposing that as an alternative to these fora? Or perhaps as a place to capture best answers? Stack Exchange itself would be good for that.

dorrakhribi (Wed, 29 Mar 2017 15:31:38 GMT):
hi, i've been working with fabric 0.6 and i've been disabling the security env_variable because i've been told that the java chaincode does not work with security anbled , now i'm starting to read about fabric 1.0 , i want to know if the java chaincode support security and if i am able to work with certificates

matanyahu (Wed, 29 Mar 2017 18:10:48 GMT):
Hi, is anyone aware of sample chaincode for fabric which demonstrates KYC/AML customer onboarding process, together with processing the profile between different parties?

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

MrMoneyChanger (Wed, 29 Mar 2017 18:20:43 GMT):
working on an issue in fabric 0.6.....retrieving more than 100 records from the ledger at one time causes chaincode to crash

MrMoneyChanger (Wed, 29 Mar 2017 18:20:59 GMT):
proper channel?

MrMoneyChanger (Wed, 29 Mar 2017 18:22:18 GMT):
found this online - https://jira.hyperledger.org/browse/FAB-860

MrMoneyChanger (Wed, 29 Mar 2017 18:22:57 GMT):
updated my code, but there is one difference that I hope is not consequential

MrMoneyChanger (Wed, 29 Mar 2017 18:23:42 GMT):
they want to assemble an array of Row pointers.....[]*shim.Row.......I just assembled an array of Rows......[]shim.Row

MrMoneyChanger (Wed, 29 Mar 2017 18:24:48 GMT):
my code doesn't work....everything matches the fix they mentioned except for how they declared the row array

kletkeman (Wed, 29 Mar 2017 18:34:37 GMT):
@MrMoneyChanger Are you using the table API? I eschewed that from the getgo as I was told that it was implemented on top of the existing K:V API, and I prefer the flexibility of JSON objects anyway. Fabric v1 has gotten rid of tables and gone with JSON objects as well for state and a database option that supports SQL like querying. I would recommend you not fool around with tables as your code has no future.

MrMoneyChanger (Wed, 29 Mar 2017 18:35:29 GMT):
agreed....this is a bug in the current Northern Trust deployment.....they will not upgrade to 1.0 until May

kletkeman (Wed, 29 Mar 2017 18:36:37 GMT):
Ok ... well, since there is no maintenance being done on v0.6, I would suggest that you implement paging at the client end to cover. I am told that the port to v1 is tricky if tables are in use.

MrMoneyChanger (Wed, 29 Mar 2017 18:48:50 GMT):
there is a code fix available - https://gerrit.hyperledger.org/r/#/c/2103/

MrMoneyChanger (Wed, 29 Mar 2017 18:49:25 GMT):
I've done my best to mirror this fix.....just wondered if anyone else has encountered this.....if anyone could tell me what I a still doing wrong

kletkeman (Wed, 29 Mar 2017 18:53:46 GMT):
@MrMoneyChanger These lines seem to imply that the fix was never applied: NOTE - this is not checked into master yet as current master does not completely support Table yet. And they are fixes in the shim that you cannot get around in chaincode.

ecn (Thu, 30 Mar 2017 13:36:52 GMT):
Hi, in fabric v1.0, does the "accesscontrol" still works ? Can I check the user attributes like this : isOk, _ := impl.NewAccessControlShim(stub).VerifyAttribute("role", []byte("assigner")) ? (if there are still attributes for users)

anrodon (Thu, 30 Mar 2017 19:56:54 GMT):
@kletkeman I think it's necessary to have a Stack Exchange site for all Hyperledger related things

anrodon (Thu, 30 Mar 2017 19:56:58 GMT):
http://area51.stackexchange.com/proposals/107923/hyperledger

akashmar (Thu, 30 Mar 2017 21:20:54 GMT):
Has joined the channel.

akashmar (Thu, 30 Mar 2017 21:23:03 GMT):
This might be a stupid question, but is the key/value store local to each chaincode or is it universal for all chaincodes deployed on the channel?

ecn (Fri, 31 Mar 2017 07:07:06 GMT):
@akashmar I think you can read the key/value from another chaincode but not update it (yet) : "State partitioning. Keys in the KVS can be recognized from their name to belong to a particular chaincode, in the sense that only transaction of a certain chaincode may modify the keys belonging to this chaincode. In principle, any chaincode can read the keys belonging to other chaincodes. Support for cross-chaincode transactions, that modify the state belonging to two or more chaincodes is a post-v1 feature."

anrodon (Fri, 31 Mar 2017 08:36:05 GMT):
Hey guys, does anybody here knows how to change the membersrvc.yaml on bluemix???

ft-wanghaibo (Fri, 31 Mar 2017 09:21:08 GMT):
Has joined the channel.

akashmar (Fri, 31 Mar 2017 13:44:55 GMT):
@ecn I'm not sure I understand. Does that mean I can use key1 with chaincode1 and chaincode2?

ecn (Fri, 31 Mar 2017 13:49:51 GMT):
The chaincodes should be in the same channel you will probably have to provide the chaincode ID with the key to get the data

ymchee (Fri, 31 Mar 2017 13:51:29 GMT):
Has joined the channel.

ecn (Fri, 31 Mar 2017 13:51:34 GMT):
But you won't be able to modify the state

akashmar (Fri, 31 Mar 2017 14:06:42 GMT):
@ecn the chaincodes will be in the same channel. I'm just trying to avoid creating composite keys, for example, assetType1.id1 vs assetType2.id1

akashmar (Fri, 31 Mar 2017 14:06:59 GMT):
or is that the normal procedure when managing multiple assets?

akashmar (Fri, 31 Mar 2017 14:14:10 GMT):
multiple types of assets that is

ecn (Fri, 31 Mar 2017 14:20:43 GMT):
@akashmar I wouldn't be able to answer of how to do it the right way, I don't have enough expertise sorry.

kletkeman (Fri, 31 Mar 2017 14:48:50 GMT):
@akashmar I am not using the new composite key APIs, but my platform has used composite keys very effectively for months. I consider composite keys to be the secret behind "smart" smart contracts. For example, I use a designated 3 letter code to define the asset class in world state, and this prefaces the asset's key. So I have implemented "read all assets by class" as one example of why this is so interesting. It obviously uses iterators, but I also allow a simple filter to be passed in so that you can further restrict results (I store JSON objects as state so you can send qualified paths and values to restrict the result set). I assume that this pattern has been common since the stub has now codified it in the composite key APIs.

akashmar (Fri, 31 Mar 2017 14:51:19 GMT):
@kletkeman I wasn't aware of a composite key API. Do you have a link? I was just trying to understand how to manage keys across chaincodes on the same channel. I assumed that the keys are unique across the channel

kletkeman (Fri, 31 Mar 2017 14:54:11 GMT):
@akashmar in v0.6, keys were unique by chaincode. I am not certain that this has changed, but perhaps someone can point out where the partitioning of world state ends (channel? contract instance?). Regarding the APIs, these are what I am talking about ... // Given a list of attributes, CreateCompositeKey function combines these attributes // to form a composite key. The objectType and attributes are expected to have only // valid utf8 strings and should not contain U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point) CreateCompositeKey(objectType string, attributes []string) (string, error) // Given a composite key, SplitCompositeKey function splits the key into attributes // on which the composite key was formed. SplitCompositeKey(compositeKey string) (string, []string, error) And they can be found

kletkeman (Fri, 31 Mar 2017 14:54:11 GMT):
@akashmar in v0.6, keys were unique by chaincode. I am not certain that this has changed, but perhaps someone can point out where the partitioning of world state ends (channel? contract instance?). Regarding the APIs, these are what I am talking about ... ``` // Given a list of attributes, CreateCompositeKey function combines these attributes // to form a composite key. The objectType and attributes are expected to have only // valid utf8 strings and should not contain U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point) CreateCompositeKey(objectType string, attributes []string) (string, error) // Given a composite key, SplitCompositeKey function splits the key into attributes // on which the composite key was formed. SplitCompositeKey(compositeKey string) (string, []string, error) ``` And they can be found at https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go

akashmar (Fri, 31 Mar 2017 15:25:36 GMT):
I see. Thanks @kletkeman

lehors (Fri, 31 Mar 2017 18:10:05 GMT):
@jeffgarratt are you still using vagrant?

lehors (Fri, 31 Mar 2017 18:11:15 GMT):
it turns out that I can no longer install chaincode on vagrant

lehors (Fri, 31 Mar 2017 18:12:32 GMT):
the latest code (not sure when that actually came in) check on the file mode and will reject anything that "looks suspect"

lehors (Fri, 31 Mar 2017 18:13:07 GMT):
unfortunately vagrant has this unfortunate habit of exposing all windows files as 777

lehors (Fri, 31 Mar 2017 18:13:21 GMT):
so the chaincode fails the filemode test and gets rejected

jeffgarratt (Fri, 31 Mar 2017 18:13:23 GMT):
@lehors I change one file to disable while I work locally

ssaddem (Mon, 03 Apr 2017 08:43:23 GMT):
Has joined the channel.

ssaddem (Mon, 03 Apr 2017 08:44:33 GMT):
hi how can i call an emit couchdb design ?

dharmjit (Mon, 03 Apr 2017 10:17:44 GMT):
Has joined the channel.

ssaddem (Mon, 03 Apr 2017 16:36:00 GMT):
hello

rahulhegde (Mon, 03 Apr 2017 21:26:18 GMT):
In user-chain-code development, I am using SHIM interface to create logger instance. How do i control the Log Level [Info/Debug...] at runtime?

rockandroll-4w (Mon, 03 Apr 2017 23:46:39 GMT):
Has joined the channel.

dklesev (Tue, 04 Apr 2017 09:03:58 GMT):
Has joined the channel.

Olmo (Tue, 04 Apr 2017 13:24:05 GMT):
Has joined the channel.

akashmar (Tue, 04 Apr 2017 14:27:53 GMT):
@rahulhegde you configure the CORE_LOGGING_LEVEL when you create the peer. It's an environment variable you can provide in the docker-compose script. Valid values are CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG

rahulhegde (Tue, 04 Apr 2017 14:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=FSPQFt42eMqcTvnfa) @akashmar Is there way i can change the log level at runtime?

rahulhegde (Tue, 04 Apr 2017 14:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=FSPQFt42eMqcTvnfa) @akashmar Is there way i can change the log level at runtime of chain-code container?

akashmar (Tue, 04 Apr 2017 14:29:45 GMT):
@rahulhegde i don't think that's possible for any application. You can change the value of the environment variable and then restarted the peer

rahulhegde (Tue, 04 Apr 2017 14:29:58 GMT):
that's possible for peer logs

rahulhegde (Tue, 04 Apr 2017 14:29:58 GMT):
that's possible for peer logs using the Peer CLI.

akashmar (Tue, 04 Apr 2017 14:31:26 GMT):
not sure then

akashmar (Tue, 04 Apr 2017 14:31:28 GMT):
sorry

rahulhegde (Tue, 04 Apr 2017 14:31:57 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=JpWMqPo3MZ93RW86W) @akashmar Hey that's ok. Thanks for update on CORE_LOGGING_LEVEL. I will try this out

akashmar (Tue, 04 Apr 2017 14:51:00 GMT):
I'm getting this error when instantiating java chaincode: ``` Error: Error endorsing chaincode: rpc error: code = 2 desc = Timeout expired while starting chaincode resource-publisher:1.0(networkid:org1peer1,peerid:org1peer1,tx:38fdbd983cd6f55d6a6946b452ecbec6bec5ff028d0847bc3e3afd9abacf91f2) ``` Does this mean that I didn't receive enough endorsements?

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

vjuge (Wed, 05 Apr 2017 06:47:15 GMT):
Has joined the channel.

vjuge (Wed, 05 Apr 2017 06:47:52 GMT):
hello, noobs question does the source code of the chaincode is visible by participants once it's deployed on the ledger ?

mydiva (Wed, 05 Apr 2017 11:06:19 GMT):
Has joined the channel.

ssaddem (Wed, 05 Apr 2017 15:56:13 GMT):
every peer in the same channel need to install chaincode

shiliy (Wed, 05 Apr 2017 23:40:56 GMT):
Has joined the channel.

lizhih (Thu, 06 Apr 2017 09:43:29 GMT):
Has joined the channel.

sandroku63 (Thu, 06 Apr 2017 15:04:52 GMT):
Has joined the channel.

kobigurk (Fri, 07 Apr 2017 09:17:31 GMT):
Has joined the channel.

sarkoi (Fri, 07 Apr 2017 17:15:00 GMT):
Has joined the channel.

ppats15 (Fri, 07 Apr 2017 21:33:37 GMT):
Has joined the channel.

ray (Sat, 08 Apr 2017 16:17:57 GMT):
Has left the channel.

zian (Mon, 10 Apr 2017 13:56:51 GMT):
Has joined the channel.

swettdj (Mon, 10 Apr 2017 15:21:03 GMT):
Has joined the channel.

TBK17 (Mon, 10 Apr 2017 18:25:40 GMT):
Has joined the channel.

nhrishi (Tue, 11 Apr 2017 08:54:48 GMT):
Hi, real quick question - Can 2 chaincodes from 2 different channels invoke or query each other?

ranjan008 (Tue, 11 Apr 2017 09:34:26 GMT):
hi is the table concept which was in version 0.6 chaincode still there in version 1.0 or not ?

sbr007 (Tue, 11 Apr 2017 11:47:06 GMT):
Has joined the channel.

sbr007 (Tue, 11 Apr 2017 11:51:23 GMT):
Hi, I am tying to register the chaincode example, within the build/distributions folder, execute the following script: ./Example/bin/Example but I am getting attached error .. please help me to solve the same ... Thanks

sbr007 (Tue, 11 Apr 2017 11:51:27 GMT):
MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~/Desktop $ cd\ > MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~ $ cd gocode MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~/gocode $ cd src/github.com/hyperledger/fabric/examples/chaincode/java/Example MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~/gocode/src/github.com/hyperledger/fabric/examples/chaincode/java/Example (v0.6) $ cd build/distributions/ MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~/gocode/src/github.com/hyperledger/fabric/examples/chaincode/java/Example/build/distributions (v0.6) $ ./Example/bin/Example Picked up _JAVA_OPTIONS: -Xmx512M Hello world! starting [Ljava.lang.String;@198a335 Apr 11, 2017 5:15:39 PM example.Example main INFO: starting Apr 11, 2017 5:15:40 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@192ebc1(/127.0.0.1:7051) for /127.0.0.1:7051 Apr 11, 2017 5:15:42 PM io.grpc.internal.TransportSet$TransportListener transportShutdown INFO: Transport io.grpc.netty.NettyClientTransport@192ebc1(/127.0.0.1:7051) for /127.0.0.1:7051 is being shutdown Apr 11, 2017 5:15:42 PM io.grpc.internal.TransportSet$TransportListener transportTerminated INFO: Transport io.grpc.netty.NettyClientTransport@192ebc1(/127.0.0.1:7051) for /127.0.0.1:7051 is terminated Apr 11, 2017 5:15:42 PM org.hyperledger.java.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNAVAILABLE MEA+Suresh.Ratnala@IN45205198W4 MINGW64 ~/gocode/src/github.com/hyperledger/fabric/examples/chaincode/java/Example/build/distributions (v0.6) $

sbr007 (Tue, 11 Apr 2017 11:55:08 GMT):
Docker response ..:

sbr007 (Tue, 11 Apr 2017 11:55:19 GMT):
vp0_1 | 11:54:02.606 [peer] ensureConnected -> DEBU 194 Touch service indicates no dropped connections vp0_1 | 11:54:02.606 [peer] ensureConnected -> DEBU 195 Connected to: [] vp0_1 | 11:54:02.606 [peer] ensureConnected -> DEBU 196 Discovery knows about: [] vp0_1 | 11:54:08.606 [peer] ensureConnected -> DEBU 197 Touch service indicates no dropped connections vp0_1 | 11:54:08.606 [peer] ensureConnected -> DEBU 198 Connected to: [] vp0_1 | 11:54:08.606 [peer] ensureConnected -> DEBU 199 Discovery knows about: [] vp0_1 | 11:54:14.606 [peer] ensureConnected -> DEBU 19a Touch service indicates no dropped connections vp0_1 | 11:54:14.606 [peer] ensureConnected -> DEBU 19b Connected to: [] vp0_1 | 11:54:14.606 [peer] ensureConnected -> DEBU 19c Discovery knows about: [] vp0_1 | 11:54:20.606 [peer] ensureConnected -> DEBU 19d Touch service indicates no dropped connections vp0_1 | 11:54:20.606 [peer] ensureConnected -> DEBU 19e Connected to: [] vp0_1 | 11:54:20.606 [peer] ensureConnected -> DEBU 19f Discovery knows about: [] vp0_1 | 11:54:26.606 [peer] ensureConnected -> DEBU 1a0 Touch service indicates no dropped connections vp0_1 | 11:54:26.606 [peer] ensureConnected -> DEBU 1a1 Connected to: [] vp0_1 | 11:54:26.606 [peer] ensureConnected -> DEBU 1a2 Discovery knows about: [] vp0_1 | 11:54:32.606 [peer] ensureConnected -> DEBU 1a3 Touch service indicates no dropped connections vp0_1 | 11:54:32.606 [peer] ensureConnected -> DEBU 1a4 Connected to: [] vp0_1 | 11:54:32.606 [peer] ensureConnected -> DEBU 1a5 Discovery knows about: [] vp0_1 | 11:54:38.606 [peer] ensureConnected -> DEBU 1a6 Touch service indicates no dropped connections vp0_1 | 11:54:38.606 [peer] ensureConnected -> DEBU 1a7 Connected to: [] vp0_1 | 11:54:38.606 [peer] ensureConnected -> DEBU 1a8 Discovery knows about: []

ssaddem (Tue, 11 Apr 2017 13:34:02 GMT):
Hey guys please tell how we can use mapreduce with couchdb in chaincode ?

ssaddem (Tue, 11 Apr 2017 16:46:36 GMT):
@here Hey guys please tell how we can use mapreduce with couchdb in chaincode ?

samdeir (Tue, 11 Apr 2017 16:49:01 GMT):
hi all , any example on how to use stub.GetCreator ?

AbhilekhSingh (Wed, 12 Apr 2017 05:50:36 GMT):
@samdeir

AbhilekhSingh (Wed, 12 Apr 2017 05:50:37 GMT):
creator, _ := stub.GetCreator() identity := &SerializedIdentity{} err := proto.Unmarshal(creator, identity) if err != nil { return "", errors.New("Could not deserialize a SerializedIdentity") } block, _ := pem.Decode(identity.IdBytes) if block == nil { return "", errors.New("failed to parse PEM block containing the public key") } var cert* x509.Certificate cert, err = x509.ParseCertificate(block.Bytes) if err != nil { return "", errors.New("Could not parse certificate") }

msoumeit (Wed, 12 Apr 2017 17:05:28 GMT):
Has joined the channel.

reoim10 (Thu, 13 Apr 2017 00:53:48 GMT):
Has joined the channel.

eyalron (Thu, 13 Apr 2017 06:48:42 GMT):
Has joined the channel.

epal (Thu, 13 Apr 2017 07:22:00 GMT):
Has joined the channel.

epal (Thu, 13 Apr 2017 07:30:56 GMT):
I'm having troubles understanding how chaincodes are envisioned to be made available to all peers in a production scenario. As I see it, chaincodes are essentially separate processes that communicate with peers via a messaging protocol built around GRPC. When a chaincode is invoked, each peer sends a message to the correct chaincode process with the executed transaction, which responds, if successful, with a state delta that is later applied to the key/value store (or other data structure) maintained by the peer. If I host a HF cluster, am I expected to run one chaincode process for each combination of chaincode/peer to ensure redundancy? Do I have to manually set up all chaincode processes, in the same way I do it when I develop my chaincode?

haiderny (Thu, 13 Apr 2017 14:11:05 GMT):
Has joined the channel.

debrajo (Thu, 13 Apr 2017 14:16:43 GMT):
Has joined the channel.

joeysun (Thu, 13 Apr 2017 20:11:35 GMT):
Has joined the channel.

LIANSHE (Fri, 14 Apr 2017 11:54:58 GMT):
Has joined the channel.

simcan (Fri, 14 Apr 2017 13:22:41 GMT):
Has joined the channel.

mastersingh24 (Sat, 15 Apr 2017 10:19:24 GMT):
Hi @epal - sorry for the delay getting back to you: take a look at http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#manually-execute-the-transactions

mastersingh24 (Sat, 15 Apr 2017 10:19:42 GMT):
there are a couple of sections on installing and instantiating chaincode on peers

hilbertzw (Mon, 17 Apr 2017 06:57:13 GMT):
Has joined the channel.

epal (Tue, 18 Apr 2017 07:34:05 GMT):
@mastersingh24 Thank you for your reply. I've been away for Easter celebrations anyway. I came back to the office today. So, if I understood it correctly, peers are able to themselves create and start containers containing chaincode processes. Part of creating the containers, I assume, is compiling the chaincode Go/Java program into something that can be executed. Then, how is the chaincode program code, the actual source files, expected to be made available to each peer? Is distribution of source files at all part of the HF application, or are source files assumed to be distributed some other way? The example you refer to uses a chaincode that is available locally on in peer containers.

jiten-thakkar (Wed, 19 Apr 2017 02:34:01 GMT):
Has joined the channel.

rickr (Wed, 19 Apr 2017 10:58:05 GMT):
You can send when invoking chaincode transient data in the proposal. Does anyone know if the chaincode can access this and if so have an example GO chaincode that shows how to do this ?

nadejdaceban (Wed, 19 Apr 2017 12:42:24 GMT):
Has joined the channel.

JohnWhitton (Wed, 19 Apr 2017 19:02:30 GMT):
Has joined the channel.

nickgaski (Wed, 19 Apr 2017 21:08:12 GMT):
Has joined the channel.

Amjadnz (Wed, 19 Apr 2017 21:19:53 GMT):
Has joined the channel.

ShenthilkumarCK (Thu, 20 Apr 2017 03:17:20 GMT):
Has joined the channel.

StudioBlackrose (Thu, 20 Apr 2017 06:57:29 GMT):
Has joined the channel.

akshay111meher (Thu, 20 Apr 2017 07:22:07 GMT):
Has joined the channel.

akshay111meher (Thu, 20 Apr 2017 07:22:39 GMT):
i have gone through examples on asset management. is it possible to model the same using UTXO i.e i wish to know the current state of asset along with its previous state. The current state should be the result of all the transfers that happen across various users rather than storing the same in a table or a state variable(the same that happens with bitcoin). is it possible write such a chaincode

angel-ibm (Thu, 20 Apr 2017 08:12:45 GMT):
Has joined the channel.

eetti (Thu, 20 Apr 2017 12:48:13 GMT):
Has joined the channel.

joe-alewine (Thu, 20 Apr 2017 15:55:34 GMT):
Has joined the channel.

epal (Fri, 21 Apr 2017 12:47:31 GMT):
@akshay111meher I'm not a developer on the project. That being said, Hyperledger Fabric is not a UTXO blockchain. Rather, each state-changing transaction is (usually) an invocation of a so-called chaincode method. Such methods are defined as part of a chaincode application (or smart contract). Accepted chaincode invocations are accepted into the blockchain, and change the global "state" data structure associated with the blockchain. The "state" is configurable, but would typically be a key/value store. If you want transactions to both contain consumed previous state and a declaration of intent, such as in the case of Bitcoin, you just have to write your chaincode program in a way that forces that behaviour.

epal (Fri, 21 Apr 2017 12:49:42 GMT):
You could regard Bitcoin as an instance of Hyperledger Fabric (or actually, more accurately, Ethereum, as it shares more uncertainty properties due to its more similar consensus algorithm) with only a single chaincode, which deals with only transfer of money.

epal (Fri, 21 Apr 2017 12:56:18 GMT):
There might be one issue with the current chaincode API, however. Chaincodes cannot access the actual blockchain, only the "state" data structure. You can see the API available to chaincodes here: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go In particular, an instance of the ChaincodeStubInterface interface is provided whenever a chaincode is invoked, and is what allows the chaincode to query or modify the current "state".

epal (Fri, 21 Apr 2017 12:57:10 GMT):
You could still, however, simulate it by writing all blockchain transactions to the "state". I'm not sure about how efficient that would be, however.

Amjadnz (Sat, 22 Apr 2017 14:45:13 GMT):
Can somebody help me here. please?

Amjadnz (Sat, 22 Apr 2017 14:45:25 GMT):
```2017-04-22 11:37:07.148 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'chaincode' 2017-04-22 11:37:07.163 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP 2017-04-22 11:37:07.163 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity 2017-04-22 11:37:07.174 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default escc 2017-04-22 11:37:07.174 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 005 Using default vscc 2017-04-22 11:37:07.177 UTC [msp] Sign -> DEBU 006 Sign: plaintext: 0A8B050A5508032205616A3030352A40...304D53500A04657363630A0476736363 2017-04-22 11:37:07.177 UTC [msp] Sign -> DEBU 007 Sign: digest: C0955F453C7309BFB4096941118E7F28B3901A655C2E08C6365D36027EF3388B Error: Error endorsing chaincode: rpc error: code = 2 desc = Timeout expired while starting chaincode aj005:1.0(networkid:dev,peerid:peer0,tx:3edd80708ea8ed61285933575b094356a743d142c6431ef8445f9120d932d136)```

Amjadnz (Sat, 22 Apr 2017 14:45:50 GMT):
docker images output

Amjadnz (Sat, 22 Apr 2017 14:45:54 GMT):
```REPOSITORY TAG IMAGE ID CREATED SIZE dev-peer0-aj005-1.0 latest ca2bae4d3179 3 hours ago 176 MB dev-peer0-aj004-1.0 latest e6773217c7e4 4 hours ago 176 MB dev-peer0-aj002-1.0 latest f3e828838f17 2 days ago 176 MB```

Amjadnz (Sat, 22 Apr 2017 14:46:06 GMT):
Tried many times hence aj001 to aj005

Amjadnz (Sat, 22 Apr 2017 14:46:28 GMT):
steps followed:

Amjadnz (Sat, 22 Apr 2017 14:46:36 GMT):
``````Step 1: Create new channel with TX and BLOCK files (as per the getting started on fabric site) Step 2: Create a new channel at the start up by pasing the channel name CHANNEL_NAME=aj005 docker-compose -f ./docker-compose.yaml up -d Step 3: Create a new network of peers using docker-compose.yaml this creates 4 Peers Peer 0, Peer 1 for (ORG0) and Peer 2 and Peer 3 (for ORG1) 1 Orderer 4 Couch DB State DBs 1 Fabric CA 1 Cli Step 4: All start up fine and I login to CLI (as per the fabric site) Step 5: Create channels again within CLI (by passing peer0 to peer3) - All looks fine. Step 6: Join the channels - all is fine here too (no errors) Step 7: Deploy the chaincode - all fine here too (no errors) Step 8: Initialize the chain code - here is where the things breaks and cannot get hte container up and running. ```

Amjadnz (Sat, 22 Apr 2017 14:46:45 GMT):
```Step 1: Create new channel with TX and BLOCK files (as per the getting started on fabric site) Step 2: Create a new channel at the start up by pasing the channel name CHANNEL_NAME=aj005 docker-compose -f ./docker-compose.yaml up -d Step 3: Create a new network of peers using docker-compose.yaml this creates 4 Peers Peer 0, Peer 1 for (ORG0) and Peer 2 and Peer 3 (for ORG1) 1 Orderer 4 Couch DB State DBs 1 Fabric CA 1 Cli Step 4: All start up fine and I login to CLI (as per the fabric site) Step 5: Create channels again within CLI (by passing peer0 to peer3) - All looks fine. Step 6: Join the channels - all is fine here too (no errors) Step 7: Deploy the chaincode - all fine here too (no errors) Step 8: Initialize the chain code - here is where the things breaks and cannot get hte container up and running. ```

Amjadnz (Sat, 22 Apr 2017 14:47:50 GMT):
Command to instantiate

Amjadnz (Sat, 22 Apr 2017 14:47:53 GMT):
```CORE_PEER_ADDRESS=peer0:7051 peer chaincode instantiate -o orderer0:7050 --tls false --cafile $GOPATH/src/github.com/hyperledger/fabric/peer/crypto/orderer/localMspConfig/cacerts/ordererOrg0.pem -C aj005 -n aj005 -v 1.0 -p tts/sc/user05 -c '{"Args":["init"]}' ```

Amjadnz (Sat, 22 Apr 2017 14:48:33 GMT):
even tried with ```CORE_PEER_ADDRESS=peer0:7051 peer chaincode instantiate -o orderer0:7050 --tls false --cafile $GOPATH/src/github.com/hyperledger/fabric/peer/crypto/orderer/localMspConfig/cacerts/ordererOrg0.pem -C aj005 -n aj005 -v 1.0 -p tts/sc/user05 -c '{"Args":["init"]}' -P "OR ('Org0MSP.member','Org1MSP.member')"```

Amjadnz (Sat, 22 Apr 2017 14:48:39 GMT):
```CORE_PEER_ADDRESS=peer0:7051 peer chaincode instantiate -o orderer0:7050 --tls false --cafile $GOPATH/src/github.com/hyperledger/fabric/peer/crypto/orderer/localMspConfig/cacerts/ordererOrg0.pem -C aj005 -n aj005 -v 1.0 -p tts/sc/user05 -c '{"Args":["init"]}' -P "OR ('Org0MSP.member','Org1MSP.member')"```

Amjadnz (Sat, 22 Apr 2017 14:49:27 GMT):
My init function is also very small nothing taht might take time

Amjadnz (Sat, 22 Apr 2017 14:49:38 GMT):
`shim.Success(nil)`

Amjadnz (Sat, 22 Apr 2017 14:50:36 GMT):
@mastersingh24 can you please advise here.

Amjadnz (Sat, 22 Apr 2017 14:52:51 GMT):
Or anybody in this galaxy :-)

ioctl (Sat, 22 Apr 2017 16:32:54 GMT):
Has joined the channel.

Amjadnz (Sun, 23 Apr 2017 06:31:25 GMT):
I feel there is some issue with "endorsing peers"

Amjadnz (Sun, 23 Apr 2017 07:10:55 GMT):
```root@81f402cb0e99:/opt/gopath/src/github.com/hyperledger/fabric/peer# CORE_PEER_ADDRESS=peer2:7051 peer chaincode install -n aj005 -v 1.0 -p tts/sc/user05 2017-04-23 07:10:08.624 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'chaincode' 2017-04-23 07:10:11.626 UTC [logging] GetModuleLevel -> DEBU 002 Module 'error' logger enabled for log level: DEBUG Error: Error getting endorser client chaincode: PEER_CONNECTIONERROR - Error trying to connect to local peer: grpc: timed out when dialing```

Amjadnz (Sun, 23 Apr 2017 07:11:15 GMT):
I'm trying to install the chaincode on the "peer2" of the network - I get the above error

Amjadnz (Sun, 23 Apr 2017 07:11:27 GMT):
Peer0,1,2,3 are all on the same channel aj005

Amjadnz (Sun, 23 Apr 2017 07:11:34 GMT):
and joined too

chiutceric (Sun, 23 Apr 2017 13:50:33 GMT):
Has joined the channel.

rranslam (Sun, 23 Apr 2017 17:06:16 GMT):
Has joined the channel.

shanthi0547 (Tue, 25 Apr 2017 00:14:46 GMT):
Has joined the channel.

shanthi0547 (Tue, 25 Apr 2017 00:14:49 GMT):
hi

shanthi0547 (Tue, 25 Apr 2017 00:15:06 GMT):
..\..\..\..\vendor\github.com\miekg\pkcs11\lt__private.h:37:22: fatal error: config.h: No such file or directory # include ^ compilation terminated. ..\..\..\..\vendor\github.com\miekg\pkcs11\lt__private.h:37:22: fatal error: config.h: No such file or directory # include ^ compilation terminated. c:\Go\src\github.com\hyperledger\fabric\examples\chaincode\go\chaincode_example02>go build . # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 In file included from ..\..\..\..\vendor\github.com\miekg\pkcs11\lt__alloc.c:32:0: ..\..\..\..\vendor\github.com\miekg\pkcs11\lt__private.h:37:22: fatal error: config.h: No such file or directory # include ^ compilation terminated.

FengChen_1982 (Tue, 25 Apr 2017 01:59:53 GMT):
Has joined the channel.

FengChen_1982 (Tue, 25 Apr 2017 02:03:28 GMT):
The github contains Chaincode example of Go Language only for now? No other languages?

FengChen_1982 (Tue, 25 Apr 2017 02:04:54 GMT):
And the peer chaincode(in Go language) deploy is actually done on source level instead of binary package?

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

Rupertredding (Tue, 25 Apr 2017 06:19:15 GMT):
Hyperledger Fabric (GO or Java) question - (1) how to get Ethereum like "msg.sender" in chaincode (smart contract)? (2) When chaincode A calls chaincode B, will the msg.sender be address of A (like in Ethereum)?

sivarajanrp (Tue, 25 Apr 2017 09:40:06 GMT):
Has joined the channel.

Amjadnz (Tue, 25 Apr 2017 12:22:08 GMT):
Hi a question if anybody is aware

Amjadnz (Tue, 25 Apr 2017 12:22:36 GMT):
How to limit a particular PEER to execute a particular method on the SMART contract?

Amjadnz (Tue, 25 Apr 2017 12:23:16 GMT):
I mean I have a security setup being done in chaincode that does all the CRUD to the Role Document. I do not want anyone other than peer0 to call this method?

Amjadnz (Tue, 25 Apr 2017 12:23:32 GMT):
the method of lets take "Create role"

Amjadnz (Tue, 25 Apr 2017 12:27:09 GMT):
All can execute "queries" no issues there but creating and updated I have to restrict

Amjadnz (Tue, 25 Apr 2017 12:27:11 GMT):
Any ideas?

Amjadnz (Tue, 25 Apr 2017 12:37:35 GMT):
Forget that - I found it in samples

LoupTheron (Tue, 25 Apr 2017 12:39:30 GMT):
Can you share it ? :)

Amjadnz (Tue, 25 Apr 2017 12:40:45 GMT):
github.com/hyperledger/fabric/examples/chaincode/go/authorizable_counter/authorizable_counter.go

LoupTheron (Tue, 25 Apr 2017 12:47:19 GMT):
thank you

LoupTheron (Tue, 25 Apr 2017 12:49:30 GMT):
(be carefull, this is a v0.6 chaincode)

LoupTheron (Tue, 25 Apr 2017 12:50:28 GMT):
-> no more Query(), but only Invoke

Amjadnz (Tue, 25 Apr 2017 12:54:10 GMT):
Yep - needed a pointer to get it going

Amjadnz (Tue, 25 Apr 2017 12:54:13 GMT):
there it was

Amjadnz (Tue, 25 Apr 2017 12:55:05 GMT):
I still find v0.6 very useful in all my 1.0 testing. Great work by the fabric team. Documentation so far has been very helpful

LoupTheron (Tue, 25 Apr 2017 12:55:54 GMT):
might help you https://developer.ibm.com/blockchain/wp-content/uploads/sites/87/Migration-of-Auction-issue-0.5.pdf

Amjadnz (Tue, 25 Apr 2017 12:56:35 GMT):
Thanks - would read it through. Still have some reading fuel left :-)

LoupTheron (Tue, 25 Apr 2017 12:57:08 GMT):
:)

Amjadnz (Tue, 25 Apr 2017 12:59:13 GMT):
Looks good actually. A lot of things I had to find hard way. Where were you man couple of months back - could have saved a lot of ginger tea

Amjadnz (Tue, 25 Apr 2017 12:59:29 GMT):
:-)

Amjadnz (Tue, 25 Apr 2017 13:00:31 GMT):
I do not know if anyone faces this in this rocket chat - you post a question come next day you have a 100s of them and no way to find responses to your own questions.

Amjadnz (Tue, 25 Apr 2017 13:01:58 GMT):
Yea it seems it is there in the @mentions at the right had side of the rocket-chat

Amjadnz (Tue, 25 Apr 2017 13:02:13 GMT):
For responses that have the logins as yours

nickgaski (Tue, 25 Apr 2017 13:53:11 GMT):
@Amjadnz - did you solve your hiccups with the install/instantiate operations through CLI?

Amjadnz (Tue, 25 Apr 2017 14:18:23 GMT):
yup - all clear now

Amjadnz (Tue, 25 Apr 2017 14:19:11 GMT):
I need to close the issue in the JIRA as well with steps

Amjadnz (Tue, 25 Apr 2017 14:19:20 GMT):
I raised one item there too

nickgaski (Tue, 25 Apr 2017 14:29:51 GMT):
ok cool. it'd be great if you can recreate and give steps to solve in JIRA. At a quick glance, it seemed like you were missing some environment variables that need to accompany your calls; and possibly the chaincode source wasn't mounted in the CLI container (although I expect you didn't overlook that).

samdeir (Tue, 25 Apr 2017 17:01:28 GMT):
thanks @AbhilekhSingh

Amjadnz (Tue, 25 Apr 2017 21:13:03 GMT):
Yea the folder paths were the issue. I ran all from the e2e_cli folder and everything was fine.

shanthi0547 (Tue, 25 Apr 2017 23:59:03 GMT):
chain code dev ad fabric dev . are they two differernt?

William_weicong (Wed, 26 Apr 2017 01:53:50 GMT):
Has joined the channel.

raghavsood (Wed, 26 Apr 2017 04:23:51 GMT):
Has left the channel.

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

swangbj (Wed, 26 Apr 2017 09:25:57 GMT):
Has joined the channel.

ansonlau3 (Thu, 27 Apr 2017 06:45:03 GMT):
Has joined the channel.

wsh_bob (Fri, 28 Apr 2017 07:58:22 GMT):
Has joined the channel.

Amjadnz (Sat, 29 Apr 2017 09:32:32 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=maiYynbuch4SvpfFP) @nickgaski Just added more comments to the JIRA Item on I resolved my issue

Amjadnz (Sat, 29 Apr 2017 09:34:09 GMT):
@nickgaski @LoupTheron have you come across any good NodeSDK read on the NodeJS-SDK for V1.0 (other than samples)?

Amjadnz (Sat, 29 Apr 2017 09:35:03 GMT):
My bankend code and test are completed - now its the time to go for Middleware. Planning to use NodeSDK only as this is the path moving forward.

Amjadnz (Sat, 29 Apr 2017 09:35:43 GMT):
Hitting roadblocks due to the nature of samples and the code within. Without basics doubts cleared - cannot prepare a production ready API.

Amjadnz (Sat, 29 Apr 2017 09:44:13 GMT):
FOR NODE SDK - Starting page

Amjadnz (Sat, 29 Apr 2017 09:44:24 GMT):
https://fabric-sdk-node.readthedocs.io/en/master/ - very good starting point

Amjadnz (Sat, 29 Apr 2017 09:44:36 GMT):
Sharing if anyone is in need.

Amjadnz (Sat, 29 Apr 2017 09:44:51 GMT):
This is for v1.0 - BTW

Amjadnz (Sat, 29 Apr 2017 09:54:57 GMT):
If any better starting - please share.

svasilyev (Sat, 29 Apr 2017 14:34:02 GMT):
Has joined the channel.

anistark (Sat, 29 Apr 2017 18:18:21 GMT):
Has joined the channel.

shanthi0547 (Sun, 30 Apr 2017 12:16:47 GMT):
ubuntu@hyperledger-devenv:a6ecd3e:/opt/gopath/src/github.com/hyperledger/fabric-sample$ curl -L https://logs.hyperledger.org/sandbox/vex-yul-hyp-jenkins-2/fabric-verif y-x86_64_1/5/release.tar.gz -o release.tar.gz 2> /dev/null; tar -xvf release.tar.gz tar: This does not look like a tar archive gzip: stdin: not in gzip format tar: Child returned status 1

davidka1 (Mon, 01 May 2017 10:20:13 GMT):
Has joined the channel.

shanthi0547 (Mon, 01 May 2017 12:15:17 GMT):
jo

shanthi0547 (Mon, 01 May 2017 12:15:24 GMT):
hi

shanthi0547 (Mon, 01 May 2017 12:15:42 GMT):
i am trying in windows 64 bit

shanthi0547 (Mon, 01 May 2017 12:15:50 GMT):
windows 10

shanthi0547 (Mon, 01 May 2017 12:15:59 GMT):
docker toolbox

shanthi0547 (Mon, 01 May 2017 12:16:04 GMT):
docker pull hyperledger/fabric-peer:latest

shanthi0547 (Mon, 01 May 2017 12:16:11 GMT):
the above gives

shanthi0547 (Mon, 01 May 2017 12:16:32 GMT):
Warning: failed to get default registry endpoint from daemon (error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.). Using system default: https://index.docker.io/v1/ error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/images/create?fromImage=hyperledger%2Ffabric-peer&tag=latest: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

shanthi0547 (Mon, 01 May 2017 12:16:36 GMT):
suggest

zhangchao (Tue, 02 May 2017 01:31:00 GMT):
Has joined the channel.

Lakshmipadmaja (Tue, 02 May 2017 04:59:22 GMT):
Has joined the channel.

zhangchao (Tue, 02 May 2017 05:50:37 GMT):
can anyone tell me how to debug a chaincode locally for development/test purpose?

zhangchao (Tue, 02 May 2017 05:51:50 GMT):
I mean go chaincode

HubertYoung (Tue, 02 May 2017 06:50:14 GMT):
Has joined the channel.

noursaadallah (Tue, 02 May 2017 09:22:24 GMT):
Has joined the channel.

muralisr (Tue, 02 May 2017 10:09:10 GMT):
Has joined the channel.

jaswanth (Tue, 02 May 2017 10:23:02 GMT):
Has joined the channel.

jaswanth (Tue, 02 May 2017 10:25:23 GMT):
Hi . am geeting this error

jaswanth (Tue, 02 May 2017 10:25:29 GMT):
2017-05-02 09:36:57.671 UTC [shim] func1 -> ERRO 007 Received error from server: rpc error: code = 2 desc = Error handling message, ending stream: [739be4bb218ccb912f464512547432ff336a9ace3a522dd525a464a9bbfc0ef9]Chaincode handler validator FSM cannot handle message (INIT) with payload size (6) while in state: established, ending chaincode stream Error while starting Student Chaincode - rpc error: code = 2 desc = Error handling message, ending stream: [739be4bb218ccb912f464512547432ff336a9ace3a522dd525a464a9bbfc0ef9]Chaincode handler validator FSM cannot handle message (INIT) with payload size (6) while in state: established

jaswanth (Tue, 02 May 2017 10:27:08 GMT):
i created a channel and joined peer0 .. no problem with that but when i ran CORE_PEER_ADDRESS=peer0:7051 peer chaincode instantiate -o 192.168.99.100:8050 -C ch1 -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 -c '{"Args":["init"]}' its givving me above errors

jaswanth (Tue, 02 May 2017 10:27:52 GMT):
can anyone help me with that ?

muralisr (Tue, 02 May 2017 11:09:58 GMT):
@jaswanth first of all please take a look chaincode logs ... secondly what is your git commit level ?

muralisr (Tue, 02 May 2017 11:14:19 GMT):
@zhangchao while others have tried various debuggers for go, I haven't done that yet myself. A simple way would be to put the peer in `--peer-chaincodedev` mode as described in docs/source/peer-chaincode-devmode.rst... you'll have to do one thing extra ... in the section `Use the chaincode` before you instantiate, also do `peer chaincode instantiate -n mycc -v 0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02`

houssemchebbi (Tue, 02 May 2017 16:08:26 GMT):
Has joined the channel.

houssemchebbi (Tue, 02 May 2017 16:10:19 GMT):
hello , im using a simple transfer chaincode , and im tryin to invoke that smart contract from another chaincode and it returns success but when i query the first contract to check , the values didnt changes ....

zhangchao (Wed, 03 May 2017 03:34:13 GMT):
@muralisr , this doc uses devmode during peer node start, it helps. But I am wondering whether there is a way to debug go cc inside an IDE without any peer, even if a workaround. I like use breakpoint to suspend the code and inpspect the variables

albert.lacambra (Wed, 03 May 2017 06:22:55 GMT):
Has joined the channel.

albert.lacambra (Wed, 03 May 2017 06:28:48 GMT):
hi, from the docu, chaper 25, I have found the following paragraph "There are generally two ways to develop business contracts: the first way is to code individual contracts into standalone instances of chaincode; the second way, and probably the more efficient way, is to use chaincode to create decentralized applications that manage the life cycle of one or multiple types of business contracts, and let end users instantiate instances of contracts within these applications."

albert.lacambra (Wed, 03 May 2017 06:29:26 GMT):
Knows someone how to create chaincode that calls other chaincode on an scheduled way?

albert.lacambra (Wed, 03 May 2017 06:29:47 GMT):
Exists some example or explicit documentaion?

Kenster (Wed, 03 May 2017 07:31:40 GMT):
Has joined the channel.

muralisr (Wed, 03 May 2017 10:10:39 GMT):
@zhangchao I believe people have used `delve` to debug peer ... i'm not sure about the chaincode

muralisr (Wed, 03 May 2017 10:11:03 GMT):
something I have wanted to try for a while

mhawesh (Wed, 03 May 2017 10:56:24 GMT):
Has joined the channel.

SoumyaP (Wed, 03 May 2017 11:00:13 GMT):
Has joined the channel.

KHANnida (Wed, 03 May 2017 12:06:27 GMT):
Has joined the channel.

akshay.lawange (Wed, 03 May 2017 12:57:05 GMT):
Has joined the channel.

akshay.lawange (Wed, 03 May 2017 14:11:53 GMT):
hi..can anyone explain how v0.6 chaincodes can be instantiated in v1..i am able to install the chaincode but for instantiation it is giving an error..

akshay.lawange (Wed, 03 May 2017 14:12:20 GMT):

Message Attachments

subbu165 (Wed, 03 May 2017 14:32:30 GMT):
channel

arun17 (Thu, 04 May 2017 06:20:21 GMT):
Has joined the channel.

linyuadam (Thu, 04 May 2017 09:38:45 GMT):
Has joined the channel.

kletkeman (Thu, 04 May 2017 14:22:39 GMT):
@akshay.lawange V1 has changed the stub interface to chaincode. You will need to clone v1 and build your chaincode against that before deploying into a v1 fabric. Make sure you get your clone aligned with the fabric into which you deploy.

kletkeman (Thu, 04 May 2017 14:23:17 GMT):
If you are deploying a sample, then make sure that you take the same from a clone of the same version of fabric as that into which you deploy.

alex.shpurov (Thu, 04 May 2017 15:06:32 GMT):
Has joined the channel.

alex.shpurov (Thu, 04 May 2017 15:15:55 GMT):
I am trying to run/debug a go contract in 1.0-alpha, i used the docker yml from https://github.com/hyperledger/fabric/blob/master/test/docker-compose.yml. When I run the contract it gives me the message REGISTERED, but i never saw the message READY (however I can see when i dont use docker and run it locally as described in docs/source/peer-chaincode-devmode.rst.) when i run the instantiate command peer chaincode instantiate -o orderer:7050 -n mycc1 -v 0 -C ch1 then i my contract chashes and i got the same message as @jaswanth. Should I map some volume? how the contract gets into READY state ?

arnuschky (Thu, 04 May 2017 15:31:36 GMT):
Has joined the channel.

smkriz (Fri, 05 May 2017 04:19:45 GMT):
Has joined the channel.

shanthi0547 (Fri, 05 May 2017 04:53:45 GMT):
2017/05/05 10:22:52 transport: http2Client.notifyError got notified that the client transport was broken read tcp 127.0.0.1:56910->127.0.0.1:7051: wsarecv: An existing connection was forcibly closed by the remote host.. Error starting Simple chaincode: Error sending chaincode REGISTER: rpc error: code = 13 desc = transport: write tcp 127.0.0.1:56910->127.0.0.1:7051: wsasend: An existing connection was forcibly closed by the remote host.2017/05/05 10:22:52 transport: http2Client.notifyError got notified that the client transport was broken read tcp 127.0.0.1:56911->127.0.0.1:7051: wsarecv: An existing connection was forcibly closed by the remote host..

shanthi0547 (Fri, 05 May 2017 06:41:18 GMT):
hi

shanthi0547 (Fri, 05 May 2017 06:41:27 GMT):
any clue wih

shanthi0547 (Fri, 05 May 2017 06:41:28 GMT):
$ docker exec -it cli bash time="2017-05-05T12:07:22+05:30" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows" Error response from daemon: Container 0dd3efb4d8fa7d16db6ae84ce0fbee02b55122c66052bd623f2a52d22898eb18 is not running

Amjadnz (Fri, 05 May 2017 09:26:26 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=MovfgrgHDJfpLJ8rA) @shanthi0547 Replied to you in private chat.

Amjadnz (Fri, 05 May 2017 09:28:04 GMT):
Check docker version and pre requisites

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

akshay.lawange (Fri, 05 May 2017 12:02:49 GMT):
@kletkeman Thanks..but i have cloned v1 and made changes to chaincode according to the version..and these are the errors i faced after making changes..

akshay.lawange (Fri, 05 May 2017 12:04:11 GMT):
and also now there is an update in the fabric image cloning as given on the hyperledger fabric site(http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html)..again i am getting the errors as i am following the steps..

akshay.lawange (Fri, 05 May 2017 12:04:26 GMT):
Error:

akshay.lawange (Fri, 05 May 2017 12:04:30 GMT):
Pulling hyperledger/fabric-peer:x86_64-1.0.0-alpha Warning: failed to get default registry endpoint from daemon (An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/info: open //./pipe/docker_engine: The system cannot find the file specified.). Using system default: https://index.docker.io/v1/ An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=hyperledger%2Ffabric-peer&tag=x86_64-1.0.0-alpha: open //./pipe/docker_engine: The system cannot find the file specified.

abaumhof (Fri, 05 May 2017 12:12:51 GMT):
Has joined the channel.

abaumhof (Fri, 05 May 2017 12:14:05 GMT):
Hi, I'm trying to follow https://github.com/hyperledger/fabric/blob/master/docs/source/peer-chaincode-devmode.rst, but I get an error message after I try to create the channels (Rejecting CONFIG_UPDATE because: Proposed configuration has no application group members, but consortium contains members). Anyone had the same issue?

kletkeman (Fri, 05 May 2017 13:45:29 GMT):
@akshay.lawange The next question then is what development environment you are using? Vagrant tends to work best, followed by native Linux, then native Mac, and native Windows tends be not work.

kletkeman (Fri, 05 May 2017 13:45:29 GMT):
@akshay.lawange The next question then is what development environment you are using? Vagrant tends to work best, followed by native Linux, then native Mac. Native Windows tends be not work.

kletkeman (Fri, 05 May 2017 13:45:29 GMT):
@akshay.lawange The next question then is what development environment you are using? Vagrant tends to work best, followed by native Linux, then native Mac. Native Windows tends to not work.

muralisr (Sat, 06 May 2017 12:19:15 GMT):
@here for those interested in chaincode dev mode - doc was updated https://gerrit.hyperledger.org/r/#/c/8985/

habpygo (Sat, 06 May 2017 16:37:40 GMT):
Has joined the channel.

narayanprusty (Sun, 07 May 2017 05:52:28 GMT):
Has joined the channel.

narayanprusty (Sun, 07 May 2017 05:53:32 GMT):
how can I find the organization name or a organization unique identifier that created the transaction in the chaincode?

MohammadObaid (Sun, 07 May 2017 15:42:19 GMT):
Has joined the channel.

Amjadnz (Sun, 07 May 2017 21:43:59 GMT):
@muralisr - a question if you might be able to help me with. A chain-code (chain-code A version 1.0) is installed, instantiated and transactions happened. It has a state DB (couch db where lets take an account "a" has "10" assets) There is an upgrade that is needed to chain-code (chain-code V2.0) - I call the upgrade command from CLI and it gets upgraded. question #1 : Would chain-code v2 still have the same State and transaction DB (i.e account "a" still has "10" assets) question #2: A new docker container is created? if so how this is going to effect the ledger sharing. Or any one who can answer this - just to clear up some design elements before hand.

Amjadnz (Sun, 07 May 2017 21:56:05 GMT):
It seems the older data is stored as part of upgrade as-it-is. So no data loss.

Amjadnz (Sun, 07 May 2017 21:56:07 GMT):
It seems the chaincode upgrade keeps the ledger state as-it is and you can keep using older data as-it-is.

Amjadnz (Sun, 07 May 2017 21:56:30 GMT):
Any one if needed - https://www.youtube.com/watch?v=hlJmRKo8HXE

ShafqatMasood (Mon, 08 May 2017 08:47:52 GMT):
Has joined the channel.

albert.lacambra (Mon, 08 May 2017 09:27:21 GMT):
Can someone tell which sdk is recommended? node or java? Why?

akshay.lawange (Mon, 08 May 2017 10:32:13 GMT):
@kletkeman I am using vagrant on windows..when i tried chaincode_example02, everything went smoothly. This is a different chaincode.

MohammadObaid (Mon, 08 May 2017 15:31:36 GMT):
Has left the channel.

kletkeman (Mon, 08 May 2017 15:42:49 GMT):
@akshay.lawange Ok, I too have found it difficult to work with new chaincode and v1 Fabric. Debug mode worked well for me (but that was a long time ago), but deploying to a channel did not. I apologize, but I don't have any ideas to get you over than hump at this time.

kletkeman (Mon, 08 May 2017 15:44:40 GMT):
@albert.lacambra Both communities seem to be making good progress, so you should theoretically be able to make progress in either language. However, our experience was that node was generally the first to update to newer version of Fabric. Not sure that this is true any more, and of course Fabric is maturing all the time, so difference should diminish over the coming months.

paulmersky (Mon, 08 May 2017 19:47:30 GMT):
Has joined the channel.

komminist (Mon, 08 May 2017 20:19:33 GMT):
Has joined the channel.

amber-zhang (Tue, 09 May 2017 00:55:16 GMT):
Has joined the channel.

akshay.lawange (Tue, 09 May 2017 07:22:18 GMT):
@kletkeman No issues,sir. Thanks for the help.:slight_smile:

akshay.lawange (Tue, 09 May 2017 07:22:18 GMT):
@kletkeman No issues,sir. Thanks for the help. :slight_smile:

ammarq (Tue, 09 May 2017 07:55:05 GMT):
Has joined the channel.

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

jchenibm (Tue, 09 May 2017 13:39:59 GMT):
Has joined the channel.

Yuvaraj_Ravi (Tue, 09 May 2017 19:52:04 GMT):
hi, I get following error after i reinstalled & recompiled the docker images. I use V1.0-alpha version & non-vagrant environment 2017-05-09 19:40:41.648 UTC [configtx/tool/localconfig] Load -> CRIT 188 Could not find profile SampleSingleMSPSolo 2017-05-09 19:40:41.648 UTC [nodeCmd] 1 -> CRIT 189 Peer configured to start with the default test chain, but supporting configuration files did not match. Please ensure that configtx.yaml contains the unmodified SampleSingleMSPSolo profile and that msp/sampleconfig is present. Could not find profile SampleSingleMSPSolo What i did was,"make configtxgen" & "make docker" & then ./network_setup.sh. It created peers,orderere & cli and then thrown this error. I tried to look for the sampleSingleMSPSolo references in configtx.yaml but could not find any. Can someone help me resolve this issue?

abaumhof (Wed, 10 May 2017 03:44:14 GMT):
Hi, I have my chaincode in java running just fine... I want to figure out how long it takes for a value to be written to the ledger, so I'm updating a key a stub.putStringState(key, newvalue)...however when I wait a bit and then simply query stub.getStringState(key); I always still get the old value... If I return in my function and then call my chaincode again (via peer chaincode), then I have the new value... How can I (within the same function) know when the new value is written? Thanks for any pointers...

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

FengChen_1982 (Wed, 10 May 2017 08:58:49 GMT):
I encountered the same error as described here: https://jira.hyperledger.org/browse/FAB-2653

FengChen_1982 (Wed, 10 May 2017 08:59:51 GMT):
but setting $GOPATH in the docker container does not help at all, same error when I try to do "docker exec peer0 peer chaincode install" again, can anyone help me out?

alesebi91 (Wed, 10 May 2017 09:52:16 GMT):
Has joined the channel.

bercinho (Wed, 10 May 2017 11:29:08 GMT):
Dear All, I have a question I would appreciate if you could help out with.

bercinho (Wed, 10 May 2017 11:29:11 GMT):
"Then, the peer forwards internally tran-proposal (and possibly tx ) to the part of its (peer’s) logic that endorses a transaction, referred to as endorsing logic. By default, endorsing logic at a peer accepts the tran-proposal and simply signs the tran-proposal . However, endorsing logic may interpret arbitrary functionality, to, e.g., interact with legacy systems with tran-proposal and tx as inputs to reach the decision whether to endorse a transaction or not."

bercinho (Wed, 10 May 2017 11:29:17 GMT):
This is in the documentation latest.

bercinho (Wed, 10 May 2017 11:29:41 GMT):
so I would be allowed to write custom endorsement logic

bercinho (Wed, 10 May 2017 11:29:56 GMT):
which actually acts on the data within the proposed transaction

bercinho (Wed, 10 May 2017 11:30:32 GMT):
How can we write custom endorsement logic?

bercinho (Wed, 10 May 2017 11:30:44 GMT):
And I am not speaking about the endorsement policy here :)

bercinho (Wed, 10 May 2017 11:31:09 GMT):
And how may we inject such logic into the peer´s operations?

SanthoshKumarMK (Wed, 10 May 2017 19:50:08 GMT):
Has joined the channel.

SanthoshKumarMK (Wed, 10 May 2017 19:50:15 GMT):
stub.PutState() is throwing Tranport closing error when i call it from invoke method but, it works fine when i call it from Init method. May i know why it is happening like this?

SanthoshKumarMK (Wed, 10 May 2017 19:50:15 GMT):
stub.PutState() is throwing Tranport closing error when i call it from invoke method but, it works fine when i call it from Init method. May i know why it is happening like this? @muralisr

SanthoshKumarMK (Wed, 10 May 2017 19:54:33 GMT):

Message Attachments

muralisr (Wed, 10 May 2017 19:55:58 GMT):
@SanthoshKumarMK look like orderer.example.com:7050 is unreachable

muralisr (Wed, 10 May 2017 19:56:48 GMT):
and that is consistent with the "query" working (it doesn't open connection to orderer to submit transaction)

SanthoshKumarMK (Wed, 10 May 2017 19:58:30 GMT):
@muralisr but i see orderer container is still running

muralisr (Wed, 10 May 2017 19:59:42 GMT):
just going by what I see in the log

jeffgarratt (Wed, 10 May 2017 20:11:44 GMT):
@SanthoshKumarMK I would make sure that your configuration is good, as this can lead to strange failures

jeffgarratt (Wed, 10 May 2017 20:12:56 GMT):
and sometimes something as simple as a docker restart can aid (especially with network related issues)

jeffgarratt (Wed, 10 May 2017 20:13:03 GMT):
sudo service docker restart

SanthoshKumarMK (Wed, 10 May 2017 20:19:00 GMT):
thanks @jeffgarratt. let me give a shot

SanthoshKumarMK (Wed, 10 May 2017 20:26:07 GMT):
i restarted the docker but no luck @jeffgarratt

jeffgarratt (Wed, 10 May 2017 20:26:43 GMT):
how are you running?

jeffgarratt (Wed, 10 May 2017 20:26:44 GMT):
e2e?

SanthoshKumarMK (Wed, 10 May 2017 20:27:11 GMT):
e2e_cli

wlahti (Wed, 10 May 2017 20:59:37 GMT):
Has joined the channel.

SanthoshKumarMK (Wed, 10 May 2017 21:26:55 GMT):
@muralisr Thanks Murali, it worked. The issue was i was not passing --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA parameters in my invoke command

hekinami (Thu, 11 May 2017 00:10:34 GMT):
Has joined the channel.

ssaddem (Thu, 11 May 2017 08:08:06 GMT):
hi, in couchdb with chaincode can i use map reduce ?

bercinho (Thu, 11 May 2017 09:35:11 GMT):
hi @ssaddem , what is your use case for the map reduce on the couchdb?

ssaddem (Thu, 11 May 2017 09:36:59 GMT):
i want to count object by status

ssaddem (Thu, 11 May 2017 09:36:59 GMT):
i want to count objects by status

ssaddem (Thu, 11 May 2017 09:37:38 GMT):
@bercinho

bercinho (Thu, 11 May 2017 09:39:54 GMT):
what is your estimation on the size of data / number of objects you want to perform this operation for?

jordipainan (Thu, 11 May 2017 10:48:42 GMT):
Has joined the channel.

bkvellanki (Thu, 11 May 2017 14:38:39 GMT):
@here Do we have a function in the shim to get the user attributes like similar to getUserAffiliates() in 0.6. The key reason for this is to restrict the user to perform only reads or writes based on the Role. Is see that we have them hfc sdk (getAffiliates, getSigningEntity, etc) and i think HFC fabric communicates with the Fabric CA to get the details. Is there any way to restrict the user in the chaincode to perforn only certian operations

angelhb (Thu, 11 May 2017 15:21:55 GMT):
Has joined the channel.

angelhb (Thu, 11 May 2017 15:22:31 GMT):
Hi, where can I find the latest status of java chaincode development for HLFv1?

ssaddem (Thu, 11 May 2017 15:26:34 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=gcTZH3hgNW9j9gNw8) @bercinho i dont know

shanthi0547 (Fri, 12 May 2017 10:14:57 GMT):
sudo CHANNEL_NAME=shanthiC docker-compose -f docker-compose-no-tls.yaml up WARNING: The ARCH_TAG variable is not set. Defaulting to a blank string. ERROR: no such image: hyperledger/fabric-orderer:-1.0.0-alpha: invalid reference format

shanthi0547 (Fri, 12 May 2017 10:17:29 GMT):
shanthi@ubuntu:~/fabric-sample/release/samples/e2e$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-couchdb x86_64-1.0.0-alpha f3ce31e25872 8 weeks ago 1.51GB hyperledger/fabric-kafka x86_64-1.0.0-alpha 589dad0b93fc 8 weeks ago 1.3GB hyperledger/fabric-zookeeper x86_64-1.0.0-alpha 9a51f5be29c1 8 weeks ago 1.31GB hyperledger/fabric-orderer x86_64-1.0.0-alpha 5685fd77ab7c 8 weeks ago 182MB hyperledger/fabric-peer x86_64-1.0.0-alpha 784c5d41ac1d 8 weeks ago 184MB hyperledger/fabric-javaenv x86_64-1.0.0-alpha a08f85d8f0a9 8 weeks ago 1.42GB hyperledger/fabric-ccenv x86_64-1.0.0-alpha 91792014b61f 8 weeks ago 1.29GB hello-world

shanthi0547 (Fri, 12 May 2017 10:18:46 GMT):
Please hellp

shanthi0547 (Fri, 12 May 2017 10:34:44 GMT):
tputCreateChannelTx channel.tx -channelID shanthiC 2017-05-12 03:33:10.609 PDT [common/configtx/tool] main -> INFO 001 Loading configuration 2017-05-12 03:33:10.610 PDT [configtx/tool/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" goroutine 1 [running]: panic(0x88ade0, 0xc420185390) /opt/go/go1.7.linux.amd64/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panicf(0xc420163650, 0x95e309, 0x1f, 0xc4201852b0, 0x1, 0x1) /w/workspace/fabric-binaries/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:194 +0x127 github.com/hyperledger/fabric/common/configtx/tool/localconfig.Load(0x7ffd7a554770, 0x7, 0x0) /w/workspace/fabric-binaries/gopath/src/github.com/hyperledger/fabric/common/configtx/tool/localconfig/config.go:195 +0x79c main.main() /w/workspace/fabric-binaries/gopath/src/github.com/hyperledger/fabric/common/configtx/tool/configtxgen/main.go:204 +0x405

sclczk (Fri, 12 May 2017 13:57:35 GMT):
Has joined the channel.

joe-alewine (Fri, 12 May 2017 18:46:15 GMT):
Has left the channel.

cauep (Fri, 12 May 2017 19:48:06 GMT):
Has joined the channel.

EnioMoura (Fri, 12 May 2017 21:51:30 GMT):
Has joined the channel.

shanthi0547 (Sat, 13 May 2017 01:42:50 GMT):
root@ubuntu:/home/shanthi/fabric-sample/release/samples/e2e# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ee6d60f3e95c dev-peer1.org2.example.com-mycc-1.0 "chaincode -peer.a..." 2 minutes ago Up 2 minutes dev-peer1.org2.example.com-mycc-1.0 ac09180c3aca dev-peer0.org1.example.com-mycc-1.0 "chaincode -peer.a..." 2 minutes ago Up 2 minutes dev-peer0.org1.example.com-mycc-1.0 cec724667f1a dev-peer0.org2.example.com-mycc-1.0 "chaincode -peer.a..." 3 minutes ago Up 2 minutes dev-peer0.org2.example.com-mycc-1.0 32d9f649884e hyperledger/fabric-peer:x86_64-1.0.0-alpha "peer node start -..." 3 minutes ago Up 3 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 3c44a844953e hyperledger/fabric-peer:x86_64-1.0.0-alpha "peer node start -..." 3 minutes ago Up 3 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com 4c1a241cd63f hyperledger/fabric-peer:x86_64-1.0.0-alpha "peer node start -..." 3 minutes ago Up 3 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com 4c9e731373be hyperledger/fabric-peer:x86_64-1.0.0-alpha "peer node start -..." 3 minutes ago Up 3 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 8a18d55b2591 hyperledger/fabric-orderer:x86_64-1.0.0-alpha "orderer" 3 minutes ago Up 3 minutes 0.0.0.0:7050->7050/tcp orderer.example.com

shanthi0547 (Sat, 13 May 2017 01:43:19 GMT):
root@ubuntu:/home/shanthi/fabric-sample/release/samples/e2e# docker exec -it cli bash Error response from daemon: Container 81b3624316bdcf411b06f3562c3ea03d8a50bcf232fad047889219cbc6197545 is not running root@ubuntu:/home/shanthi/fabric-sample/release/samples/e2e# docker ps -f 81b3624316bdcf4 invalid argument "81b3624316bdcf4" for f: bad format of filter (expected name=value) See 'docker ps --help'. root@ubuntu:/home/shanthi/fabric-sample/release/samples/e2e# docker version Client:

mastersingh24 (Sun, 14 May 2017 12:16:55 GMT):
@shanthi0547 - not sure how far you got here? Looks like the containers are up and running? The cli container just executes a script and then shuts down - so that's probably why you are seeing that error.

habpygo (Sun, 14 May 2017 12:38:22 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=mpuFMjBN5npr4KEfb) @mastersingh24 Ah! exactly the same problem here! You say _The cli container just executes a script and then shuts down_, but the manual/tutorial says that you should be able (and have to!) enter the cli container to execute the commands after that. But this is not possible, given the fact that the cli container exits immediately after it has executed the scripts -- other containers are up and running indeed. Is this an error in the docs? Do we really need the cli container up? If not, what would you suggest to be the following step?

habpygo (Sun, 14 May 2017 12:38:22 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=mpuFMjBN5npr4KEfb) @mastersingh24 Ah! exactly the same problem here! You say _The cli container just executes a script and then shuts down_, but the manual/tutorial says that you should be able (and have to!) enter the cli container to execute the commands after that. But this is not possible, given the fact that the cli container exits immediately after it has executed the scripts. Is this an error in the docs?

habpygo (Sun, 14 May 2017 12:38:22 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=mpuFMjBN5npr4KEfb) @mastersingh24 Ah! exactly the same problem here! You say _The cli container just executes a script and then shuts down_, but the manual/tutorial says that you should be able (and have to!) enter the cli container to execute the commands after that. But this is not possible, given the fact that the cli container exits immediately after it has executed the scripts -- other containers are up and running indeed. Is this an error in the docs? Do we really need the cli container up? If not, what would you suggest to be the following step.

mastersingh24 (Sun, 14 May 2017 13:47:51 GMT):
@habpygo - http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#start-the-network-no-tls

mastersingh24 (Sun, 14 May 2017 13:48:34 GMT):
take a look at the part about commenting out the command entry in the compose file

Amjadnz (Sun, 14 May 2017 16:25:33 GMT):
@mastersingh24 - can you please let me know where are references to identify the invoker - from @jimthematri

Amjadnz (Sun, 14 May 2017 16:26:13 GMT):
from @jimthematrix I got the reference of using `stub.GetCreator()` - that returns a protobuf

Amjadnz (Sun, 14 May 2017 16:26:41 GMT):
Any other source is there in samples - which I can use as starting point to decode this info?

Amjadnz (Sun, 14 May 2017 16:27:53 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=JWh4kQy8CocBkHAWx) @habpygo I happen to create another CLI container with only bash and use that to test the remaining CURL commands.

Amjadnz (Sun, 14 May 2017 16:29:05 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=kEE5XXfBFNJ5tPDj9) @shanthi0547 - your {ARCH_TAG} is missing

Amjadnz (Sun, 14 May 2017 16:29:42 GMT):
```export os_arch=$(echo "$(uname -s)-amd64" | awk '{print tolower($0)}') export ARCH_TAG=$(uname -m)```

Amjadnz (Sun, 14 May 2017 16:29:58 GMT):
export os_arch=$(echo "$(uname -s)-amd64" | awk '{print tolower($0)}')

Amjadnz (Sun, 14 May 2017 16:30:05 GMT):
export ARCH_TAG=$(uname -m)

Amjadnz (Sun, 14 May 2017 16:30:23 GMT):
This is tested on FEDORA and UBUNTU linux by the way

mastersingh24 (Sun, 14 May 2017 21:56:59 GMT):
@Amjadnz (https://chat.hyperledger.org/channel/chaincode-dev?msg=7Wrh4JP8YgnBjfXTu)

mastersingh24 (Sun, 14 May 2017 21:59:01 GMT):
[It's a SerializedIdentity - https://github.com/hyperledger/fabric/blob/master/protos/msp/identities.proto#L27 ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7Wrh4JP8YgnBjfXTu) @Amjadnz

mastersingh24 (Sun, 14 May 2017 21:59:01 GMT):
@Amjadnz - it's a SerializedIdentity - https://github.com/hyperledger/fabric/blob/master/protos/msp/identities.proto#L27 (https://chat.hyperledger.org/channel/chaincode-dev?msg=7Wrh4JP8YgnBjfXTu)

zerppen (Mon, 15 May 2017 03:23:21 GMT):
Has joined the channel.

zerppen (Mon, 15 May 2017 03:26:25 GMT):
After restarting my ubuntu 16.4LTS,because crash,my e2e chaincode can only excute `query`,`invoke` is always geting error.Here are logs

zerppen (Mon, 15 May 2017 03:27:03 GMT):

Message Attachments

zerppen (Mon, 15 May 2017 03:28:33 GMT):
@here I am using fabric master. I think it's a bug.

jimthematrix (Mon, 15 May 2017 03:33:44 GMT):
@zerppen it seems the orderer can't find the channel 00001, one possible cause is the orderer is set to use `ram` as ledger type, crashed and lost the system ledger?

jimthematrix (Mon, 15 May 2017 03:34:36 GMT):
try `ORDERER_LEDGER_TYPE=file` (you'll have to recreate the channel)

zerppen (Mon, 15 May 2017 03:36:12 GMT):
if it is true.why it can query the ledger?

zerppen (Mon, 15 May 2017 03:40:15 GMT):
And I excuted `install` `instantiate`,logs showed the chaincode existed.So I don't think it's chaincode's fault

zerppen (Mon, 15 May 2017 03:43:58 GMT):
Maybe endorsers lost the chaincode file but wrote down the chaincode name and path?

zerppen (Mon, 15 May 2017 03:45:45 GMT):
Because `query` does not need endorsing. @jimthematrix

jimthematrix (Mon, 15 May 2017 03:48:52 GMT):
query only contacts the peers. apparently the channel exists in peers. invoke contacts the peers for endorsement and then sends to the orderer. did the orderer crash after the instantiate and before the invoke?

jimthematrix (Mon, 15 May 2017 03:49:57 GMT):
(endorsers have the chaincode since your query uses the chaincode which succeeded)

jimthematrix (Mon, 15 May 2017 03:49:57 GMT):
(endorsers must have the chaincode since your query uses the chaincode which succeeded)

zerppen (Mon, 15 May 2017 03:50:18 GMT):
All peers crashed of the chain:disappointed:

zerppen (Mon, 15 May 2017 03:54:37 GMT):
excuting `nstantiate` ` query` `invoke` ` query` ran well.But after all peers of the chain crashing, it can't invoke but query

zerppen (Mon, 15 May 2017 03:54:37 GMT):
excuting `instantiate` ` query` `invoke` ` query` ran well.But after all peers of the chain crashing, it can't invoke but query

Amjadnz (Mon, 15 May 2017 05:12:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=6dmBxaotwuMKQZ7Hv) @mastersingh24 - yep that's what I saw in the code too. But after getting the SerializedIdentity - how do we get the required attributes from the caller like his username, org and his departments etc.

Amjadnz (Mon, 15 May 2017 05:12:38 GMT):
do we have a reference anywhere on that item?

habpygo (Mon, 15 May 2017 08:49:00 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=2xTLGjBs9RYtfs7A5) @mastersingh24 Now it works like a clock, instantiating, querying, invoking (a couple of times with different numbers) and querying again. So it works. Thanks a million!

habpygo (Mon, 15 May 2017 08:51:42 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=4dovHnzYqauvRdWaa) @Amjadnz My problem was answered by mastersingh24 (see above). Thanks..

Amjadnz (Mon, 15 May 2017 08:52:11 GMT):
Perfect

Amjadnz (Mon, 15 May 2017 08:52:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=EYqtetnKcQyLKWSwe) @habpygo perfect

bur (Mon, 15 May 2017 12:27:38 GMT):
Hi, does the current version of the peer already support --chaincodedev again? I've found this here, but seems to be outdated. https://github.com/hyperledger/fabric/blob/master/docs/source/Setup/Chaincode-setup.rst

MohammadObaid (Mon, 15 May 2017 13:52:58 GMT):
Has joined the channel.

leonli0811 (Mon, 15 May 2017 15:26:31 GMT):
Has joined the channel.

leonli0811 (Mon, 15 May 2017 15:27:52 GMT):
Dear all, I try to run. docker exec -it cli bash. But the cli container is not running.

leonli0811 (Mon, 15 May 2017 15:28:29 GMT):
Can somebody figure out how to solve the problem please

leonli0811 (Mon, 15 May 2017 15:31:00 GMT):
Dear @mastersingh24 I am also trying this step http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#start-the-network-no-tls

leonli0811 (Mon, 15 May 2017 15:31:19 GMT):
but the cli container won't run

leonli0811 (Mon, 15 May 2017 15:31:35 GMT):
Could you please help me ?

MohammadObaid (Mon, 15 May 2017 17:22:08 GMT):
@leonli0811 what error you got?

habpygo (Mon, 15 May 2017 18:23:50 GMT):
@leonli0811 what you should do is comment the line in the files `docker-compose.yaml`, `docker-compose-template.yaml` and `docker-compose-no-tls.yaml` out that fires up the `script.sh` script. The line is `command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; ‘` which you will find near the end of the above mentioned files in the `cli` container. Then follow the instructions from the _Getting Started_ part line by line. To avoid mistakes copy the whole lot where the doc says “So our command in its entirety would be:” and paste it into the cli container.

habpygo (Mon, 15 May 2017 18:23:50 GMT):
@leonli0811 what you should do is comment the line in the files `docker-compose.yaml` and `docker-compose-template.yaml` out that fires up the `script.sh` script. The line is `command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; ‘` which you will find near the end of the above mentioned files in the `cli` container. Then follow the instructions from the _Getting Started_ part line by line. To avoid mistakes take the whole lot where the doc says “So our command in its entirety would be:”

habpygo (Mon, 15 May 2017 18:23:50 GMT):
@leonli0811 what you should do is comment the line in the files `docker-compose.yaml` and `docker-compose-template.yaml` out that fires up the `script.sh` script. The line is `command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; ‘` which you will find near the end of the above mentioned files in the `cli` container. Then follow the instructions from the _Getting Started_ part line by line. To avoid mistakes copy the whole lot where the doc says “So our command in its entirety would be:” and paste it into the cli container.

MohammadObaid (Mon, 15 May 2017 19:10:34 GMT):
Can anyone refer me good tutorial for building custom chaincode ?

czar0 (Mon, 15 May 2017 20:08:21 GMT):
Has joined the channel.

bkvellanki (Mon, 15 May 2017 20:52:36 GMT):
@here can we call one chaincode from another..Lets say there is a billing department and accounting department, accounting department can have reference to billing department. Can we have two CC's separate where one cc can query another an get the values. In this case billing and accounting.

kartikeya95 (Tue, 16 May 2017 07:02:47 GMT):
Has joined the channel.

kartikeya95 (Tue, 16 May 2017 07:03:14 GMT):
Has anyone tried marbles v3 locally?

oooo (Tue, 16 May 2017 08:48:28 GMT):
Has joined the channel.

JAVIERFALCESMARIN (Tue, 16 May 2017 10:25:40 GMT):
Has joined the channel.

gomsb143 (Tue, 16 May 2017 11:52:12 GMT):
Has joined the channel.

gomsb143 (Tue, 16 May 2017 11:53:04 GMT):
hello , is there anyway to create docker images of java chaincode

rocket.cat (Tue, 16 May 2017 11:53:04 GMT):
Good day, gomsb143

habpygo (Tue, 16 May 2017 13:41:39 GMT):
@mastersingh24 hi, is there an error in the source code of `marbles_chaincode.go`? After installing it on peer0 I get a couple of error messages when I try to instantiate the chaincode beginning with ```2017-05-16 13:13:29.885 UTC [chaincode-platform] func1 -> ERRO 001 Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/hyperledger/fabric/examples/chaincode/go/marbles02 peer0.org1.example.com | chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/marbles_chaincode.go:370: assignment count mismatch: 2 = 3``` But looking at the `marbles_chaincode.go` file I see the same error message in the Visual Studio Code IDE, e.g. lines 370 `queryResponse, err := resultsIterator.Next()`, 428 `responseRange, err := coloredMarbleResultsIterator.Next()`, 538 and 586 show an error `assignment count mismatch: 2 = 3` ` Any idea what could be wrong or am I goofing up again?

habpygo (Tue, 16 May 2017 13:41:39 GMT):
@mastersingh24 hi, is there an error in the source code of `marbles_chaincode.go`? After installing it on peer0 I get a couple of error messages beginning with `2017-05-16 13:13:29.885 UTC [chaincode-platform] func1 -> ERRO 001 Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/hyperledger/fabric/examples/chaincode/go/marbles02 peer0.org1.example.com | chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/marbles_chaincode.go:370: assignment count mismatch: 2 = 3` But looking at the `marbles_chaincode.go` file I see the same error message in the Visual Studio Code IDE, e.g. lines 370 `queryResponse, err := resultsIterator.Next()`, 428 `responseRange, err := coloredMarbleResultsIterator.Next()`, 538 and 586 show an error `assignment count mismatch: 2 = 3` ` Any idea what could be wrong or am I goofing up again?

habpygo (Tue, 16 May 2017 13:41:39 GMT):
@mastersingh24 hi, is there an error in the source code of `marbles_chaincode.go`? After installing it on peer0 I get a couple of error messages when I try to instantiate the chaincode beginning with `2017-05-16 13:13:29.885 UTC [chaincode-platform] func1 -> ERRO 001 Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/hyperledger/fabric/examples/chaincode/go/marbles02 peer0.org1.example.com | chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/marbles_chaincode.go:370: assignment count mismatch: 2 = 3` But looking at the `marbles_chaincode.go` file I see the same error message in the Visual Studio Code IDE, e.g. lines 370 `queryResponse, err := resultsIterator.Next()`, 428 `responseRange, err := coloredMarbleResultsIterator.Next()`, 538 and 586 show an error `assignment count mismatch: 2 = 3` ` Any idea what could be wrong or am I goofing up again?

habpygo (Tue, 16 May 2017 13:48:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=sPKka3dy6LqcckycP) @kartikeya95 hi, no I'm still trying to get `marbles02` to work. Please keep us informed about your progress.

kartikeya95 (Tue, 16 May 2017 14:15:59 GMT):
Hi, i got marbles 3 to work locally. and was able to write chaincode for my application with the same basic structure as marbles.

kartikeya95 (Tue, 16 May 2017 14:16:09 GMT):
it was a good day :p

rocket.cat (Tue, 16 May 2017 14:16:09 GMT):
Marnin', kartikeya95

gonephishing (Tue, 16 May 2017 15:37:34 GMT):
Has joined the channel.

gonephishing (Tue, 16 May 2017 15:38:26 GMT):
Hi, hyperledger alpha1 image is not working with couchdb peers are not able to connect to the respective couchdb docker images Is it a known issue or is there a workaround for the same The alpha 2 release fixes this but orderer service is not working in alpha2 release

gonephishing (Tue, 16 May 2017 15:38:55 GMT):
Can anyone please help?

Davia (Tue, 16 May 2017 16:22:30 GMT):
Has joined the channel.

habpygo (Tue, 16 May 2017 17:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=T7sBMZNijaPF8ax3X) @kartikeya95 Congrats! Any do's and don'ts you want to share? :slight_smile:

habpygo (Tue, 16 May 2017 17:04:13 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=T7sBMZNijaPF8ax3X) @kartikeya95 Congrats! Any do's and don't you want to share? :slight_smile:

kartikeya95 (Wed, 17 May 2017 06:58:11 GMT):
@habpygo Majority the errors come because of incorrect environment setup. Once you have that, just follow the marbles structure and you should be okay. Carefully have a look at script.sh in e2e_cli/scripts/ carefully for correct commands and environment variable. Let me know if you rub into any problems.

habpygo (Wed, 17 May 2017 07:16:47 GMT):
:thumbsup:

bercinho (Wed, 17 May 2017 07:52:04 GMT):
Dear All, does the Peer eventually communicate with the CA?

bercinho (Wed, 17 May 2017 09:10:15 GMT):
I have read this: "The Peer no longer enrols itself (like it did in 0.6) and currently does not talk to the Fabric CA at all."

bercinho (Wed, 17 May 2017 09:10:24 GMT):
can someone please confirm this?

ambatigaan (Wed, 17 May 2017 09:28:42 GMT):
Has joined the channel.

FengChen_1982 (Wed, 17 May 2017 09:46:25 GMT):
Is there any way to redeploy a ChainCode after modifying the code?

mastersingh24 (Wed, 17 May 2017 10:55:02 GMT):
@bercinho : `does the Peer eventually communicate with the CA?` : No - the peer does not communicate with the fabric-ca (or any CA) at all `The Peer no longer enrols itself (like it did in 0.6) and currently does not talk to the Fabric CA at all.`: This is correct. The peer and orderer both support crypto material obtained from the fabric-ca but don't require the use of the fabric-ca (i.e. you can use your own CA, bring your own certs, etc)

albert.lacambra (Wed, 17 May 2017 11:04:45 GMT):
@mastersingh24 @bercinho its is possible to use the nodesk without to enroll user? or how can I create an enroll certificate and secret for a user without the use of the CA?

bercinho (Wed, 17 May 2017 11:51:39 GMT):
My understanding is: we need to attach Transaction Certificates to every Transaction Proposal submitted to a Peer by Node.SDK, so I guess you need the mechanism of ECAs & TCAs, which might be provided by the Fabric CA or anyone else implementing the MSP of Fabric. @mastersingh24 is this your understanding as well?

habpygo (Wed, 17 May 2017 14:54:15 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) ```orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory)``` and ```CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true)``` Any suggestions of what to look for; where the error might be?

habpygo (Wed, 17 May 2017 14:54:15 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) ```orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory)``` and ```CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true)``` Any suggestions of what to look for; where the error might be?

habpygo (Wed, 17 May 2017 14:54:15 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) ```orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory)``` and ```CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true)``` Any suggestions of what to look for; where the error might be?

habpygo (Wed, 17 May 2017 14:58:33 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) when starting the network with TLS and couchdb enabled. ``` orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory) ``` and ``` CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true ``` Any suggestions of what to look for; where the error might be?

habpygo (Wed, 17 May 2017 14:58:33 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) ``` orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory) ``` and ``` CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true ```

habpygo (Wed, 17 May 2017 14:58:33 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) ``` orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory) ``` and ``` CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true ``` Any suggestions of what to look for; where the error might be?

habpygo (Wed, 17 May 2017 14:58:33 GMT):
I’m trying to get `marbles02` up and running on alpha2, but I get the error(s) when starting the network with TLS ``` orderer.example.com | 2017-05-17 14:46:32.202 UTC [orderer/main] main -> CRIT 002 Failed to load PrivateKey file '/var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk' (open /var/hyperledger/orderer/msp/keystore/3e7dcc1480dec0c1f6ab9f087f553f0cc138e794f4714300ffbb8823775899d1_sk: no such file or directory) ``` and ``` CreatePeerServer -> ERRO 019 Failed to create peer server (secureConfig must contain both ServerKey and ServerCertificate when UseTLS is true ``` Any suggestions of what to look for; where the error might be?

PushpalathaHiremath (Thu, 18 May 2017 05:02:28 GMT):
Has joined the channel.

PushpalathaHiremath (Thu, 18 May 2017 05:04:13 GMT):
Hi All, While using leveldb in fabric, Is there any way that we modify the key reference and still hold the previous history of transactions with the new key?

albert.lacambra (Thu, 18 May 2017 08:29:23 GMT):
Hi Guys,

albert.lacambra (Thu, 18 May 2017 08:29:34 GMT):
some information about chaincode java development?

albert.lacambra (Thu, 18 May 2017 08:29:39 GMT):
Exist the development mode?

albert.lacambra (Thu, 18 May 2017 08:29:57 GMT):
Do you know how to debug dev code running into an IDE?

ssaddem (Thu, 18 May 2017 10:33:13 GMT):
hi?

ssaddem (Thu, 18 May 2017 10:33:13 GMT):
hi im not an expert on golang but in another folder than hyperledger fabric i got this error *"github.com/hyperledger/fabric/vendor/github.com/golang/protobuf/ptypes/timestamp".Timestamp) as type *"github.com/golang/protobuf/ptypes/timestamp".Timestamp in assignment what is the best solution ? unvendor fabric or point my vendor folder on fabric's vendor

bercinho (Thu, 18 May 2017 11:34:53 GMT):
Dear All

bercinho (Thu, 18 May 2017 11:35:09 GMT):
Can you please confirm this ISSUE is part of Alpha 2 release?

bercinho (Thu, 18 May 2017 11:35:09 GMT):
https://jira.hyperledger.org/browse/FAB-3850

bercinho (Thu, 18 May 2017 11:35:23 GMT):
"don't allow Java CC access for alpha2 as its not quite usable yet"

bercinho (Thu, 18 May 2017 11:35:39 GMT):
Is Java ChainCode functional for Alpha2 or not?

bercinho (Thu, 18 May 2017 12:08:07 GMT):
https://github.com/hyperledger/fabric/commit/32bb1526077f9fadfef10f3df8bccfa3469e3ccb

bercinho (Thu, 18 May 2017 14:13:56 GMT):
I see the ticket has been removed

bercinho (Thu, 18 May 2017 14:13:56 GMT):
https://jira.hyperledger.org/browse/FAB-3850 ?

bercinho (Thu, 18 May 2017 14:13:56 GMT):
but the code is still there

bercinho (Thu, 18 May 2017 14:13:56 GMT):
is this going to be fixed? what is happening?

houssemchebbi (Thu, 18 May 2017 15:03:22 GMT):
hello , does any one know how can i make a function get executed automatic upon an event ?! plz help

muralisr (Thu, 18 May 2017 15:38:39 GMT):
@bercinho https://jira.hyperledger.org/browse/FAB-3218 lists the work that went into Java CC and the list of some pending items to bring Java CC to the same level as go. Given that this is still WIP support for Java was disabled by https://jira.hyperledger.org/browse/FAB-3850

muralisr (Thu, 18 May 2017 15:38:58 GMT):
@sanchezl ^^^

bercinho (Thu, 18 May 2017 15:39:13 GMT):
ok cool

bercinho (Thu, 18 May 2017 15:40:15 GMT):
but what would be good to get the detail on issues like this: https://jira.hyperledger.org/browse/FAB-3170

bercinho (Thu, 18 May 2017 15:40:20 GMT):
so we don´t play with it :)

bercinho (Thu, 18 May 2017 15:40:34 GMT):
anyway

rmohta (Thu, 18 May 2017 16:14:22 GMT):
Has joined the channel.

sanchezl (Thu, 18 May 2017 17:28:49 GMT):
The Java chaincode found in alpha2, although disabled, has feature parity with the golang chaincode, except for the following issues: • https://jira.hyperledger.org/browse/FAB-3648 • https://jira.hyperledger.org/browse/FAB-3649 • https://jira.hyperledger.org/browse/FAB-3650 • https://jira.hyperledger.org/browse/FAB-3651 • https://jira.hyperledger.org/browse/FAB-3652 • https://jira.hyperledger.org/browse/FAB-3653 • https://jira.hyperledger.org/browse/FAB-3470 • https://jira.hyperledger.org/browse/FAB-3716 • https://jira.hyperledger.org/browse/FAB-1794 • https://jira.hyperledger.org/browse/FAB-3618 (applies to both Java and Go) These can basically be summarized as: • Some missing APIs that were added to golang chaincode as part of https://jira.hyperledger.org/browse/FAB-1751 and https://jira.hyperledger.org/browse/FAB-1752. • A bug regarding composite keys. • Ability to set logging levels in Java chaincode.

gonephishing (Thu, 18 May 2017 19:59:21 GMT):
insertion in couchdb using GO PuState function is posting wrong data

gonephishing (Thu, 18 May 2017 19:59:41 GMT):
Or that it is handling utf-8 chrancter in a wrong way

Rachitga (Fri, 19 May 2017 06:33:37 GMT):
Has joined the channel.

Rachitga (Fri, 19 May 2017 06:35:44 GMT):
hello, I wanted to study how a new chaincode gets inserted into the syste, basically the init() command, can u share or point the link to the piece of code that executes that?

saptarshee (Fri, 19 May 2017 10:38:52 GMT):
Has joined the channel.

bercinho (Fri, 19 May 2017 10:49:09 GMT):
Dear @sanchezl , Many Thanks for the summary on the Java Chaincode state, as discussed with @muralisr we will still enable it and do some tests. Cheers

SaranyaM (Fri, 19 May 2017 10:53:40 GMT):
Has joined the channel.

eetti (Fri, 19 May 2017 14:36:38 GMT):
On V0.6 we could view block info through the *GET* /chain & *GET* /chain/blocks/{Block} rest endpoints, How would we go about this in v1.0

samarcho (Fri, 19 May 2017 14:45:34 GMT):
Has joined the channel.

samarcho (Fri, 19 May 2017 21:10:25 GMT):
Hi All...when we run "peer chaincode instantiate", does it create a docker container for the chaincode? It does appear to be trying to that...Just trying to confirm....

muralisr (Sat, 20 May 2017 00:31:30 GMT):
@samarcho if the chaincode is not running, yes, it will create the container.

yacovm (Sat, 20 May 2017 08:59:34 GMT):
Has joined the channel.

tom.appleyard (Sat, 20 May 2017 13:04:19 GMT):
has anyone seen this error: cError: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: API error (404): {"message":"network e2e_default not found"}

bmalavan (Sat, 20 May 2017 14:22:05 GMT):
Has joined the channel.

anik (Sat, 20 May 2017 16:34:47 GMT):
geting # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 exec: "gcc": executable file not found in %PATH% while running go build v1.0. any pointer ?

anik (Sat, 20 May 2017 16:38:01 GMT):
this command worked with v0.6 set up .

anik (Sat, 20 May 2017 17:43:28 GMT):
running on window

hendry19901990 (Sat, 20 May 2017 19:23:16 GMT):
Has joined the channel.

kfichter (Sun, 21 May 2017 03:18:18 GMT):
Has joined the channel.

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

trilochanachary (Mon, 22 May 2017 01:04:32 GMT):
Has joined the channel.

trilochanachary (Mon, 22 May 2017 01:04:45 GMT):
guys

trilochanachary (Mon, 22 May 2017 01:04:47 GMT):
please help

trilochanachary (Mon, 22 May 2017 01:04:54 GMT):
root@charry:/src/github.com/hyperledger/fabric/core/chaincode/shim/java# gradle -b build.gradle build You are using Gradle 2.10: This version of the protobuf plugin works with Gradle version 2.12+ FAILURE: Build failed with an exception. * Where: Build file '/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 29 * What went wrong: An exception occurred applying plugin request [id: 'java'] > Failed to apply plugin [id 'org.gradle.java'] > Could not create an instance of type com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED root@charry:/src/github.com/hyperledger/fabric/core/chaincode/shim/java# gradle -b build.gradle build You are using Gradle 2.10: This version of the protobuf plugin works with Gradle version 2.12+ FAILURE: Build failed with an exception. * Where: Build file '/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 29 * What went wrong: An exception occurred applying plugin request [id: 'java'] > Failed to apply plugin [id 'org.gradle.java'] > Could not create an instance of type com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED root@charry:/src/github.com/hyperledger/fabric/core/chaincode/shim/java# gradle -b build.gradle build You are using Gradle 2.10: This version of the protobuf plugin works with Gradle version 2.12+ FAILURE: Build failed with an exception. * Where: Build file '/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 29 * What went wrong: An exception occurred applying plugin request [id: 'java'] > Failed to apply plugin [id 'org.gradle.java'] > Could not create an instance of type com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

trilochanachary (Mon, 22 May 2017 01:05:17 GMT):
can some one please help

trilochanachary (Mon, 22 May 2017 01:05:21 GMT):
asap

trilochanachary (Mon, 22 May 2017 01:06:14 GMT):
any one... there/..

trilochanachary (Mon, 22 May 2017 01:06:16 GMT):
knock knock

vinitesh (Mon, 22 May 2017 09:12:54 GMT):
Has joined the channel.

Maha1992 (Mon, 22 May 2017 10:38:38 GMT):
Has joined the channel.

Maha1992 (Mon, 22 May 2017 11:25:41 GMT):
how to write a chaincode for storing a document (pdf) (asset transfer between peers)...any ideas?

Maha1992 (Mon, 22 May 2017 12:12:21 GMT):
@kartikeya95 i need to model a pdf as an asset in hyperledger and track the ownership of asset...can i model it as json and give attributes like file path owner etc ?

kartikeya95 (Mon, 22 May 2017 12:55:58 GMT):
@Maha1992 We can store any kind of JSON data on to CouchDB. If you look at the Marbles examples. Assuming you pdf is analogous to a marble. we can give it an owner, have other identifiers including size etc. One draw back i can think of is the 32 character limit to a string.

kartikeya95 (Mon, 22 May 2017 12:56:12 GMT):
and couch db supports rich query

raghu_vamz (Mon, 22 May 2017 14:03:22 GMT):
Has joined the channel.

raghu_vamz (Mon, 22 May 2017 14:03:37 GMT):
Hey! How do i make my application depend on 0.6 branch of fabric. I imported the shim path but it shows the methods in 1.0.How do i configure to get methods in 0.6

raghu_vamz (Mon, 22 May 2017 14:04:21 GMT):
@Maha1992 - you need to convert the pdf as bytes from your front end and pass it as string into arguments

Maha1992 (Mon, 22 May 2017 16:56:12 GMT):
@kartikeya95 am trying to run multiple host but i get the following error image hyperledger/fabric-zookeeper:x86_64-1.0.0-alpha3-snapshot-5759ee4 could not be accessed on a registry to record its digest. Each node will access hyperledger/fabric-zookeeper:x86_64-1.0.0-alpha3-snapshot-5759ee4 independently, possibly leading to different nodes running different versions of the image.

gerardo (Tue, 23 May 2017 02:08:33 GMT):
Has joined the channel.

Maha1992 (Tue, 23 May 2017 07:23:55 GMT):
@kartikeya95 it is not able load images from my local registry

Maha1992 (Tue, 23 May 2017 07:30:48 GMT):
@kartikeya95 the digest in foe these images

alfa (Tue, 23 May 2017 09:33:26 GMT):
Has joined the channel.

ssaddem (Tue, 23 May 2017 13:59:11 GMT):
in chaincode can i know if it s an invoke or query event ?

ssaddem (Tue, 23 May 2017 13:59:11 GMT):
in chaincode can i know if it s an invoke or query event ?

anik (Tue, 23 May 2017 18:47:17 GMT):
getting # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ..\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.go:29:10: fatal error: ltdl.h: No such file or directory #include while running go build in v1.0 on window 7 . any pointer ?

praveennagpal (Wed, 24 May 2017 06:21:52 GMT):
@anik I had this error on my Mac and this was because I had not installed libtools. You need to do the same on Windows 7 I guess.

anik (Wed, 24 May 2017 06:43:18 GMT):
@praveennagpal thanks which IDE have you used ? i faced this while running on eclipse

praveennagpal (Wed, 24 May 2017 06:44:40 GMT):
@anik, I use Atom but IDE should not matter. You can do a go build on the cli and see if the error still comes.

anik (Wed, 24 May 2017 06:46:21 GMT):
@praveennagpal let me try if there is any support on window 7

anik (Wed, 24 May 2017 06:46:26 GMT):
thanks

Jay (Wed, 24 May 2017 08:24:13 GMT):
Has joined the channel.

tom.appleyard (Wed, 24 May 2017 09:40:09 GMT):
When it comes to composite keys in fabric, does searching for `AB` give the same as `BA`?

rajendrakolli03 (Wed, 24 May 2017 11:28:17 GMT):
Has joined the channel.

angelhb (Wed, 24 May 2017 11:29:17 GMT):
Hi, I am working a pilot on a bank and we have developed a sample java chain code. if I deploy on docker environment described on http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html the java chaincode deployment gives error: Java chaincode is work-in-progress and disabled Complete output: root@ip-172-31-20-12:/home/ubuntu/fabric-sample/release/linux-amd64# CHANNEL_NAME=mychannel TIMEOUT=180 docker-compose -f docker-compose-cli.yaml up -d Starting peer1.org1.example.com Starting peer0.org2.example.com Starting peer0.org1.example.com Starting orderer.example.com Starting peer1.org2.example.com Starting cli root@ip-172-31-20-12:/home/ubuntu/fabric-sample/release/linux-amd64# docker exec -it cli bash root@4ff013d19a7f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -l java -n myccJava -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/java/Example 2017-05-24 10:39:04.135 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts: no such file or directory] 2017-05-24 10:39:04.135 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/crls: no such file or directory] 2017-05-24 10:39:04.135 UTC [msp] getMspConfig -> INFO 003 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/config.yaml: no such file or directory] 2017-05-24 10:39:04.160 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP 2017-05-24 10:39:04.160 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity Error: Usage: ...... ....... My question: is the java for chaincodes working properly fabric v1? I have seen in the slack that there are some issues with java chaincodes and we should wait till HLF1 GA ((perhaps is possible to get some working java sdk environmnet before GA?)))

angelhb (Wed, 24 May 2017 11:54:34 GMT):
@sanchezl I am relatively new on Fabric1 , and I trying to install and instantiate some java chaincodes on the docker plafform but unsuccesfully. is the java chaincoden alpha2 disabled?

angelhb (Wed, 24 May 2017 11:54:50 GMT):
see my previos entry

angelhb (Wed, 24 May 2017 11:54:50 GMT):
see my previous entry

sanchezl (Wed, 24 May 2017 12:42:48 GMT):
@angelhb Yes, java chaincode is disabled on alpha2.

albert.lacambra (Wed, 24 May 2017 14:04:10 GMT):
it is possible to develope chaincode (so run peer in dev mode) using the 2 orgs 2 peers docker example, just changing the command?

MohammadObaid (Wed, 24 May 2017 14:35:10 GMT):
I was going through marble chain code program and one thing I noticed there is no merkel hash stored when marble is created and I know merkel hash is one of main things in blockchain? How we can add merkel hash in marble chaincode?

Maha1992 (Wed, 24 May 2017 15:52:31 GMT):
Am getting following error when trying to install my chaincode goroutine 1 [running]: panic(0xc74f20, 0xc4200120a0) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/chaincode/platforms/golang.(*Platform).ValidateSpec(0x13c0f90, 0xc4202ec0c0, 0x13c0f90, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/platforms/golang/platform.go:87 +0x36d github.com/hyperledger/fabric/peer/chaincode.checkSpec(0xc4202ec0c0, 0x6, 0xc42016855c) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/common.go:51 +0xf1 github.com/hyperledger/fabric/peer/chaincode.getChaincodeDeploymentSpec(0xc4202ec0c0, 0xc4202ec001, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/common.go:59 +0x147 github.com/hyperledger/fabric/peer/chaincode.generateChaincode(0xc420197d40, 0x7ffe81483739, 0x4, 0x7ffe81483741, 0x3, 0x0, 0xc4202bcc80, 0xc4202bcc60) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:102 +0x1f7 github.com/hyperledger/fabric/peer/chaincode.chaincodeInstall(0xc420197d40, 0x0, 0x0, 0xc4202c8a80, 0xd5a058, 0x5) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:170 +0x181 github.com/hyperledger/fabric/peer/chaincode.installCmd.func1(0xc420197d40, 0xc42021f9e0, 0x0, 0x6, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:54 +0x54 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc420197d40, 0xc42021f8c0, 0x6, 0x6, 0xc420197d40, 0xc42021f8c0) /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(0x13699e0, 0xf, 0xc420010075, 0x7) /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(0x13699e0, 0x28, 0xc420010075) /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:118 +0x54e root@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# docker ps bash: docker: command not found root@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# ls

Maha1992 (Wed, 24 May 2017 15:52:38 GMT):
can anyone help me ?

Maha1992 (Wed, 24 May 2017 15:53:07 GMT):
Full stack trace: root@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/sampleconfigroot@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# CORE_PEER_LOCALMSPID="Org1MSP" root@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/msp/sampleconfigroot@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# CORE_PEER_ADDRESS=192.168.7.189:7051 root@017f41ee8c5c:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-05-24 15:39:22.501 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/etc/hyperledger/fabric/msp/sampleconfig/intermediatecerts]. Skipping.: [stat /etc/hyperledger/fabric/msp/sampleconfig/intermediatecerts: no such file or directory] 2017-05-24 15:39:22.502 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/etc/hyperledger/fabric/msp/sampleconfig/intermediatecerts]. Skipping.: [stat /etc/hyperledger/fabric/msp/sampleconfig/crls: no such file or directory] 2017-05-24 15:39:22.502 UTC [msp] getMspConfig -> INFO 003 MSP configuration file not found at [/etc/hyperledger/fabric/msp/sampleconfig/config.yaml]: [stat /etc/hyperledger/fabric/msp/sampleconfig/config.yaml: no such file or directory] 2017-05-24 15:39:22.540 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP 2017-05-24 15:39:22.540 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity panic: runtime error: index out of range goroutine 1 [running]: panic(0xc74f20, 0xc4200120a0) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/chaincode/platforms/golang.(*Platform).ValidateSpec(0x13c0f90, 0xc4202ec0c0, 0x13c0f90, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/platforms/golang/platform.go:87 +0x36d github.com/hyperledger/fabric/peer/chaincode.checkSpec(0xc4202ec0c0, 0x6, 0xc42016855c) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/common.go:51 +0xf1 github.com/hyperledger/fabric/peer/chaincode.getChaincodeDeploymentSpec(0xc4202ec0c0, 0xc4202ec001, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/common.go:59 +0x147 github.com/hyperledger/fabric/peer/chaincode.generateChaincode(0xc420197d40, 0x7ffe81483739, 0x4, 0x7ffe81483741, 0x3, 0x0, 0xc4202bcc80, 0xc4202bcc60) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:102 +0x1f7 github.com/hyperledger/fabric/peer/chaincode.chaincodeInstall(0xc420197d40, 0x0, 0x0, 0xc4202c8a80, 0xd5a058, 0x5) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:170 +0x181 github.com/hyperledger/fabric/peer/chaincode.installCmd.func1(0xc420197d40, 0xc42021f9e0, 0x0, 0x6, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/install.go:54 +0x54 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc420197d40, 0xc42021f8c0, 0x6, 0x6, 0xc420197d40, 0xc42021f8c0) /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(0x13699e0, 0xf, 0xc420010075, 0x7) /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(0x13699e0, 0x28, 0xc420010075) /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:118 +0x54e

Maha1992 (Wed, 24 May 2017 15:57:06 GMT):
this is the issue https://jira.hyperledger.org/browse/FAB-2653

ArchanaBalaji (Wed, 24 May 2017 16:01:25 GMT):
Has joined the channel.

Ladar (Wed, 24 May 2017 19:09:48 GMT):
Has joined the channel.

Ladar (Wed, 24 May 2017 19:12:51 GMT):
Which one of these Rocket Chat things is for Go Chaincode development

Ladar (Wed, 24 May 2017 19:15:01 GMT):
If anyone is doing ChainCode development func (t *doesNotMatter) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) how do I determine "who" is calling this function. GetCreator?

muralisr (Wed, 24 May 2017 22:35:12 GMT):
@Ladar yes

muralisr (Wed, 24 May 2017 22:37:25 GMT):
@Maha1992 I'd check to see if GOPATH is defined

Ladar (Wed, 24 May 2017 22:49:27 GMT):
@muralisr Which version do I have to download from Github to have that function work. Cause currently... it ain't working.

Ladar (Wed, 24 May 2017 22:49:53 GMT):
At least for HyperLedger Fabric

Maha1992 (Thu, 25 May 2017 05:55:12 GMT):
@muralisr i have set the GOPATH but it is showinf the following error this is the error %FF7m%F4%84V 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]

Maha1992 (Thu, 25 May 2017 05:56:44 GMT):
@muralisr some error to do with the certs

levinkwong (Thu, 25 May 2017 09:34:47 GMT):
Hi all, does anyone has idea how to do an unit test against a chaincode using `GetQueryResult`? The mock engine does not (and maybe cannot) support this function.

levinkwong (Thu, 25 May 2017 09:34:47 GMT):
Hi all, does anyone have idea how to do an unit test against a chaincode using `GetQueryResult`? The mock engine does not (and maybe cannot) support this function.

kontos (Thu, 25 May 2017 15:43:01 GMT):
Has joined the channel.

kontos (Thu, 25 May 2017 15:46:34 GMT):
Hi folks, I have been trying to get setup for developing chaincode following the documentation at http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup.html?highlight=api#running-the-chaincode . I'm trying to get the docker image setup working with the alpha2 code. If I try to run a dev setup using docker-compose file in the documentation, the network will not start up. The folks from #general pointed me here.

kontos (Thu, 25 May 2017 15:46:55 GMT):

Message Attachments

kontos (Thu, 25 May 2017 15:47:57 GMT):
Above is the error that I see when running the docker-compose up command. Below is the output of $(docker images)

kontos (Thu, 25 May 2017 15:48:01 GMT):

Message Attachments

mastersingh24 (Fri, 26 May 2017 11:24:35 GMT):
@kontos - which compose file are you using? Likely some type of timing issue

kontos (Fri, 26 May 2017 12:55:12 GMT):
@mastersingh24 The docker file that I am using is : membersrvc: image: hyperledger/fabric-membersrvc ports: - "7054:7054" command: membersrvc vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7053:7053" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054 - CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENROLLID=test_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT links: - membersrvc command: sh -c "sleep 5; peer node start --peer-chaincodedev"

kontos (Fri, 26 May 2017 12:55:46 GMT):
From the section Option 2: Docker for windows or mac -- http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup.html?highlight=api#option-2-docker-for-mac-or-windows

lignyxg (Fri, 26 May 2017 14:54:31 GMT):
Has joined the channel.

Maha1992 (Mon, 29 May 2017 07:36:07 GMT):
i started the two organizations on a multi node setup ....but inside the client container i get RPC timed out error .can anyone help me? i could not figure it out

Maha1992 (Mon, 29 May 2017 07:37:51 GMT):
when creating a channel

saptarshee (Mon, 29 May 2017 10:24:39 GMT):
Is the accesscontrol package functional in v1.0.0-alpha??? There is an example given in v1.0.0-alpha, but while instantiation i keep getting the following error cannot find package "github.com/hyperledger/fabric/accesscontrol/impl" in any of: /opt/go/src/github.com/hyperledger/fabric/accesscontrol/impl (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/accesscontrol/impl (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/accesscontrol/impl Anybody any help with this, I am using v1.0.0-alpha version of hyperledger/fabric

jimouris (Mon, 29 May 2017 11:37:29 GMT):
Has joined the channel.

rajeev20 (Mon, 29 May 2017 14:45:30 GMT):
Has joined the channel.

Maha1992 (Mon, 29 May 2017 15:34:08 GMT):
i get the following error during channel creation Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509:

bluesledmaster (Mon, 29 May 2017 17:46:47 GMT):
Has joined the channel.

bluesledmaster (Mon, 29 May 2017 17:48:43 GMT):
hey i'm a newbie so please forgive me if this is the wrong channel to ask, but is it possible for peer nodes to run _different_ chaincode to achieve consensus? for the case where different organizations might have different criteria for endorsement?

MDBijman (Mon, 29 May 2017 20:04:04 GMT):
Has joined the channel.

MDBijman (Mon, 29 May 2017 20:24:29 GMT):
I'm running into the same issue as @kontos, but I'm following the setup at http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html. When I run ./network_setup.sh up couchdb I get the same error messages (Failed connecting to orderer:7050). I ran the end2end script (run ./scripts/script inside the cli container) and it works fully, so should I just ignore these errors?

MDBijman (Mon, 29 May 2017 20:24:29 GMT):
I'm running into the same issue as @kontos, but I'm following the setup at http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html. When I run `./network_setup.sh up couchdb` I get the same error messages (Failed connecting to orderer:7050). I ran the end2end script (run ./scripts/script inside the cli container) and it works fully, so should I just ignore these errors?

MDBijman (Mon, 29 May 2017 20:24:29 GMT):
I'm running into the same issue as @kontos, but I'm following the setup at http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html. When I run `./network_setup.sh up couchdb` I get the same error messages (Failed connecting to orderer:7050). I ran the end2end script (run `./scripts/script` inside the cli container) and it works fully, so should I just ignore these errors?

mpigmans (Tue, 30 May 2017 08:05:45 GMT):
Has joined the channel.

mpigmans (Tue, 30 May 2017 08:10:28 GMT):
Hey, I'm trying to setup and running into the following error; `[gossip/gossip] NewGossipService -> WARN 04e External endpoint is empty, peer will not be accessible outside of its organization`. It seems to be a configuration error but I can't figure out how to fix it. Does someone know how to solve this?

yacovm (Tue, 30 May 2017 08:12:32 GMT):
@mpigmans it's not an error, it's a warning

yacovm (Tue, 30 May 2017 08:12:50 GMT):
Unless you want this peer to be accessible from other orgs, you shouldn't resolve it.

mpigmans (Tue, 30 May 2017 08:13:52 GMT):
Allright, that seems fine. Thanks for the reply!

mpigmans (Tue, 30 May 2017 08:22:02 GMT):
The reason I asked is that I can't seem to reach a peer via REST, that should still be possible with 1.0 alpha2 right?

yacovm (Tue, 30 May 2017 08:29:23 GMT):
no

yacovm (Tue, 30 May 2017 08:29:27 GMT):
no REST anymore

eetti (Tue, 30 May 2017 14:43:14 GMT):
@yacovm Please do you have any idea how to get block info on 1.0 (e.g current height, chain length etc.). Thanks

yacovm (Tue, 30 May 2017 15:03:02 GMT):
Afraid that's impossible

kontos (Tue, 30 May 2017 15:07:52 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7s9zdZXuDon8CYJiW) @yacovm Is this a temporary change? Or is the REST API moving to a new module / sub-project?

yacovm (Tue, 30 May 2017 15:10:36 GMT):
It is just not there

yacovm (Tue, 30 May 2017 15:10:41 GMT):
not exists in v1.0

yacovm (Tue, 30 May 2017 15:10:49 GMT):
not sure about future versions

someshjha (Tue, 30 May 2017 17:10:02 GMT):
Has joined the channel.

reoim10 (Wed, 31 May 2017 02:02:44 GMT):
@here Is there any API document for ChainCode development?

mariogemoll (Wed, 31 May 2017 10:00:59 GMT):
Has joined the channel.

jordipainan (Wed, 31 May 2017 10:55:10 GMT):
HI I have the same error but i cannot resolve it ,,,, https://stackoverflow.com/questions/43678445/start-up-fabric-composer-rest-api-server ,,,, any hint ?

RaphaelArias (Wed, 31 May 2017 11:20:06 GMT):
Has joined the channel.

PhDev (Wed, 31 May 2017 12:32:53 GMT):
Has joined the channel.

rrader (Wed, 31 May 2017 13:30:51 GMT):
When deploying chaincode, "path":"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" it is from github how to load from local machine?

rrader (Wed, 31 May 2017 13:30:51 GMT):
When deploying chaincode, "path":"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" it is from github how to deploy from local machine?

wlahti (Wed, 31 May 2017 14:58:27 GMT):
@rrader It's actually pulling the code from your local machine under the GOPATH: $GOPATH/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

rockandroll-4w (Thu, 01 Jun 2017 04:47:40 GMT):
where can get example about eventhub

qiang0723 (Thu, 01 Jun 2017 05:34:04 GMT):
Has joined the channel.

rrader (Thu, 01 Jun 2017 10:04:49 GMT):
@wlahti it is pulling only the code, or the binary?

wlahti (Thu, 01 Jun 2017 11:39:47 GMT):
@rrader It pulls the code.

SRK (Fri, 02 Jun 2017 07:04:57 GMT):
Has joined the channel.

raghu_vamz (Fri, 02 Jun 2017 09:21:51 GMT):
can someone help me fix this! I try to create a channel on fabric-1.0 command : CHANNEL_NAME=testChannel TIMEOUT=600 docker-compose -f docker-compose-cli.yaml up i get this error within logs: deliveryClient] connect -> ERRO 3c8 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]

rama_rahul (Fri, 02 Jun 2017 11:52:15 GMT):
Has joined the channel.

rama_rahul (Fri, 02 Jun 2017 11:54:06 GMT):
Hello all, I am interested in deploying a sample chaincode. Can someone suggest me the link where I can follow step by step process to do so

SRK (Fri, 02 Jun 2017 12:25:23 GMT):
How can i store files in chain code.?

dklesev (Fri, 02 Jun 2017 12:26:21 GMT):
@SRK usually you don't store files on blockchain. only the hash value

SRK (Fri, 02 Jun 2017 12:27:43 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=WRTMwScitG6NRoxG2) @dklesev : that means I have to create hash value of files. then I can store in chain code

dklesev (Fri, 02 Jun 2017 12:29:13 GMT):
yes, of course you can store byte values on the blockchain, but it's not practical

alfa (Fri, 02 Jun 2017 12:29:50 GMT):
@SRK : please take a look into IPFS that will help u :)

SRK (Fri, 02 Jun 2017 12:35:17 GMT):
oh yes. IPFS is perfect for me. thanks guys.

alfa (Fri, 02 Jun 2017 12:38:32 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=mHuDSGxnBrG3gBByG) @rama_rahul : follow steps from https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html First take look into Create Network, Add Peer creating chennel, order block, etc. When you have fabric N/W. then you can deploy/invoke/query chaincode.

rama_rahul (Fri, 02 Jun 2017 12:49:30 GMT):
No command 'peer' found, did you mean: Command 'beer' from package 'gerstensaft' (universe) Command 'pear' from package 'php-pear' (main) Command 'peet' from package 'pipexec' (universe) Command 'pee' from package 'moreutils' (universe) peer: command not found

rama_rahul (Fri, 02 Jun 2017 12:50:10 GMT):
I am getting this when I run peer chaincode .... command. How to fix this?

dklesev (Fri, 02 Jun 2017 12:54:05 GMT):
@rama_rahul you run the peer executable not from within the cli container I guess

mvkmvk (Fri, 02 Jun 2017 14:27:41 GMT):
Has joined the channel.

rama_rahul (Sat, 03 Jun 2017 03:55:37 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ReWvfjjTWajBGPYka) @dklesev Ohh, I didn't knew that I had to do so. Please,can you tell me where to find this cli container?

dklesev (Sat, 03 Jun 2017 12:37:29 GMT):
@rama_rahul please follow the getting started for fabric

dklesev (Sat, 03 Jun 2017 12:37:29 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html

rrader (Sat, 03 Jun 2017 13:29:49 GMT):
What if don't have folders "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" in my $GOPATH/src when I deploy with path "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" ? From where it will deploy chaincode?

rrader (Sat, 03 Jun 2017 13:29:49 GMT):
What if don't have folders "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" in my $GOPATH/src when I deploy with path "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" ? From where it is deploying chaincode?

rama_rahul (Sun, 04 Jun 2017 07:00:35 GMT):

Message Attachments

dklesev (Sun, 04 Jun 2017 12:51:59 GMT):
@rama_rahul please, read the getting started carefully! if you run `docker ps -a` you should see a *cli* container listed. when it's not running (but listed), you didn't set the timeout right

SRK (Mon, 05 Jun 2017 05:54:29 GMT):
@dklesev : by following guide : https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html There are few container are running. Org1( peer0, peer1), Org2 ( peer0, peer1), order peer & cli For deploy chaincode I have to exec cli. Suppose I have to deploy chaincode from peer0 of Org1. Is that possible.?

guruce (Mon, 05 Jun 2017 07:29:20 GMT):
Has joined the channel.

ansonlau3 (Mon, 05 Jun 2017 08:23:27 GMT):
does anyone know why using GetTxTimestamp() would return ?

dirainbow (Mon, 05 Jun 2017 09:48:56 GMT):
Has joined the channel.

dklesev (Mon, 05 Jun 2017 09:50:24 GMT):
@SRK yes, it's the same executable but preconfigured (Org1) in the container

SRK (Mon, 05 Jun 2017 10:12:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8oqd4M3Tc5nYnyTyP) @dklesev : CLI container is network specific. as every network have one CLI. we just have to configure peer after we can execute transactions from configured peer. .?

dklesev (Mon, 05 Jun 2017 13:15:26 GMT):
@SRK you set env-vars before using the peer exe in cli container.

hendry19901990 (Mon, 05 Jun 2017 19:00:47 GMT):
I need help

hendry19901990 (Mon, 05 Jun 2017 19:01:04 GMT):
I test the example of chaincode and i got the error

hendry19901990 (Mon, 05 Jun 2017 19:01:06 GMT):
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com CORE_PEER_ADDRESS=peer0.org1.example.com:7051 CORE_PEER_LOCALMSPID="Org0MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/cacerts/org1.example.com-cert.pem peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}' panic: Fatal error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com: err Could not load a valid signer certificate from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/signcerts, err stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/signcerts: no such file or directory goroutine 1 [running]: panic(0xc25580, 0xc4201ff940) /opt/go/src/runtime/panic.go:500 +0x1a1 main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:114 +0x69b

GemstoneZheng (Tue, 06 Jun 2017 02:33:51 GMT):
Has joined the channel.

PushpalathaHiremath (Tue, 06 Jun 2017 03:24:37 GMT):
Hi All, I have a question. In real scenario we expect the smart contract update. So, when we update the smart contract , 1. Do we have any option to continue with the same previous ledger? Instead of creating a new genesis block, can we continue appending new blocks from where we left with the previous chain code?

PushpalathaHiremath (Tue, 06 Jun 2017 03:28:55 GMT):
Hi All, I have a question. In real scenario we expect the smart contract update. So, when we update the smart contract , 1. Do we have any option to continue with the same previous ledger? Instead of creating a new genesis block, can we continue appending new blocks from where we left with the previous chain code? 2. Or is there any way to copy all the data from previous ledger to this chain code's ledger? 3. Or do we need to store the chain code id's of the previous smart contract to access the previous data stored? 4. Or Do we need to have two smart contract, one for the storage and retrieval of data to and from the ledger ( which is more stable ) And other smart contract which will have the business logic, which can get changed. Which is the best option. Any help / suggestion really appreciated. Thank you

PushpalathaHiremath (Tue, 06 Jun 2017 03:28:55 GMT):
Hi All, I have a question. In real scenario we expect the smart contract update. So, when we update the smart contract , 1. Do we have any option to continue with the same previous ledger? Instead of creating a new genesis block, can we continue appending new blocks from where we left with the previous chain code? 2. Or is there any way to copy all the data from previous ledger to this chain code's ledger? 3. Or do we need to store the chain code id's of the previous smart contract to access the previous data stored? 4. Or Do we need to have two smart contract, one for the storage and retrieval of data to and from the ledger ( which is more stable ) And other smart contract which will have the business logic, which can get changed. Which is the best option. Any help / suggestion really appreciated. Thank you

wstorm (Tue, 06 Jun 2017 07:53:53 GMT):
Has joined the channel.

kletkeman (Tue, 06 Jun 2017 14:04:10 GMT):
@PushpalathaHiremath 1. The chaincode is installed onto a peer and instantiated on each channel on which you want to run the chaincode. And that is theoretically all you have to do to upgrade, although I would imagine that you would primarily need to upversion the chaincode under the same moniker. If my understanding of the solution to the "take over the database" problem that I reported several times on v0.6 is correct, the world state partition is organized by channel/chaincode moniker, and the chaincode respects the versioning. 2. Should not be needed, and would not work on any but the most trivial databases -- I have a v0.6 Bluemix fabric that has 4.8M blocks and an estimated 20M+ transactions, and there is no way that all peers could be paused while they deal with the upgrade time under such a scenario. Under v0.6, we pondered such things, but v1 has obsoleted the need. 3. No. V1 versions chaincode and the ID is set when it is installed / instantiated (one of those two), so the ID does not change. 4. This is something I have pondered, but it really is not necessary any more. Chaincode to chaincode calls are also container to container gRPC calls in user space, and so the performance hit would not be pleasant. The best option is to read the v1 docs on chaincode and note the ID and version that you assign. Then make a backwards compatible change and redeploy. You should be able to carry on.

selvaraman (Tue, 06 Jun 2017 15:01:10 GMT):
Has joined the channel.

nickmelis (Tue, 06 Jun 2017 16:17:11 GMT):
has anyone ever seen the following error when trying to instantiate chaincode? `Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to deserialize creator identity, err MSP DEFAULT is unknown `

nickmelis (Tue, 06 Jun 2017 16:17:11 GMT):
has anyone ever seen the following error when trying to instantiate chaincode? ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to deserialize creator identity, err MSP DEFAULT is unknown ```

JimPosner (Wed, 07 Jun 2017 04:59:28 GMT):
Has joined the channel.

samdeir (Wed, 07 Jun 2017 12:33:58 GMT):
GetQueryResult

SRK (Wed, 07 Jun 2017 13:24:16 GMT):
How can we implement wallet concept .?

nickmelis (Wed, 07 Jun 2017 16:47:55 GMT):
can anyone explain how to run chaincode in dev mode please?

kletkeman (Wed, 07 Jun 2017 20:24:18 GMT):
@nickmelis https://github.com/hyperledger/fabric/blob/master/docs/source/Setup/Chaincode-setup.rst

aaronzheng (Thu, 08 Jun 2017 03:04:33 GMT):
Has joined the channel.

aaronzheng (Thu, 08 Jun 2017 03:05:35 GMT):
hi everyone. i am thinking about how to implements a random method in chaincode. do you have any idea for it? i am worried different peer will generate a different number, how can they perform the same random number together.

PushpalathaHiremath (Thu, 08 Jun 2017 05:05:10 GMT):
@kletkeman : Thank you so much for the suggestions. Let me go through and see the feasible one. Will come back to you again if needed.

nickmelis (Thu, 08 Jun 2017 06:53:14 GMT):
@kletkeman that document still talks about REST API...is it still valid for v1?

prashiyn (Thu, 08 Jun 2017 11:52:49 GMT):
I have to include external libraries in my chaincode. Can someone explain how? I get the following error `cannot find package "gopkg.in/oleiade/reflections.v1" in any of: /opt/go/src/gopkg.in/oleiade/reflections.v1 (from $GOROOT) /chaincode/input/src/gopkg.in/oleiade/reflections.v1 (from $GOPATH) /opt/gopath/src/gopkg.in/oleiade/reflections.v1`

kletkeman (Thu, 08 Jun 2017 12:21:41 GMT):
@nickmelis You are right that, for testing of the chaincode and single peer in debug mode, the REST API is no longer an option. The doc also mentions the CLI if I recall correctly, and that is the way testing is done in v1. The CLI is now in a container, and there is a complex relationship between the container and your own chaincode, which causes difficulties for deployment. There are many examples of how this can be done our there, but none are all that satisfying. The one that looks really promising is the CLI example for the Go SDK. I will be testing it fairly soon and will try to add something to that doc or create an adjunct doc. Time permitting of course ...

lprao (Thu, 08 Jun 2017 14:54:04 GMT):
Has joined the channel.

lprao (Thu, 08 Jun 2017 14:59:20 GMT):
Hi, I am using fabric(1.0.0-alpha) in "dev" mode on a classic TwoOrg topology with 4 peers, 2 CAs, 1 SDK(fabric-sdk-go). When i initiate a transaction(chaincode_example02) to peer1(in Org1), peer1 is able to execute the chaincode but peer2(also in Org1) sees a "No such channel" error - [36m2017-06-06 00:58:01.312 UTC [gossip/gossip#23.0.0.12:7056] handleMessage -> DEBU 228 Entering, [156 43 33 171 114 249 57 151 235 35 197 207 85 206 60 90 178 209 11 90 101 229 107 30 108 214 245 107 90 240 230 193] sent us GossipMessage: channel:"testchannel" tag:CHAN_OR_ORG state_info_pull_req:<> , Envelope: 18 bytes, Signature: 0 bytes [36m2017-06-06 00:58:01.313 UTC [gossip/gossip#23.0.0.12:7056] handleMessage -> DEBU 229 No such channel [116 101 115 116 99 104 97 110 110 101 108] discarding message GossipMessage: channel:"testchannel" tag:CHAN_OR_ORG state_info_pull_req:<> , Envelope: 18 bytes, Signature: 0 bytes [36m2017-06-06 00:58:01.313 UTC [gossip/gossip#23.0.0.12:7056] handleMessage -> DEBU 22a Exiting [36m2017-06-06 00:58:01.320 UTC [gossip/gossip#23.0.0.12:7056] handleMessage -> DEBU 22b Entering, [156 43 33 171 114 249 57 151 235 35 197 207 85 206 60 90 178 209 11 90 101 229 107 30 108 214 245 107 90 240 230 193] sent us GossipMessage: channel:"testchannel" tag:CHAN_OR_ORG state_info: pki_id:"\234+!\253r\3719\227\353#\305\317U\316 , Envelope: 84 bytes, Signature: 71 bytes [36m2017-06-06 00:58:01.322 UTC [gossip/gossip#23.0.0.12:7056] handleMessage -> DEBU 22c No such channel [116 101 115 116 99 104 97 110 110 101 108] discarding message GossipMessage: channel:"testchannel" tag:CHAN_OR_ORG state_info: pki_id:"\234+!\253r\3719\227\353#\305\317U\316 , Envelope: 84 bytes, Signature: 71 bytes Would someone please tell me how to go about fixing this?

sidrmsh (Thu, 08 Jun 2017 20:24:18 GMT):
Has joined the channel.

sidrmsh (Thu, 08 Jun 2017 20:24:50 GMT):
Hello! Do I have to install chaincode on one peer or all peers?

Calvin_Heo (Fri, 09 Jun 2017 08:59:50 GMT):
Has joined the channel.

selvaraman (Fri, 09 Jun 2017 09:30:28 GMT):
It is possible to store array and nested json like the following, // Init resets all the things func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { if len(args) != 1 { return nil, errors.New("Incorrect number of arguments. Expecting 1") } //err := stub.PutState("hello_world", []byte(args[0])) err := stub.PutState("users-list", args)) err := stub.PutState("subjects", map[string]int{"Physics":50, "Chemistry":50, "Math":50})) if err != nil { return nil, err } return nil, nil }

selvaraman (Fri, 09 Jun 2017 09:30:28 GMT):
It is possible to store array and nested json like the following, // Init resets all the things func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { if len(args) != 1 { return nil, errors.New("Incorrect number of arguments. Expecting 1") } //err := stub.PutState("hello_world", []byte(args[0])) stub.PutState("users-list", args)) stub.PutState("subjects", map[string]int{"Physics":50, "Chemistry":50, "Math":50})) if err != nil { return nil, err } return nil, nil }

selvaraman (Fri, 09 Jun 2017 09:30:28 GMT):
Is it possible to store array and nested json like the following, // Init resets all the things func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { if len(args) != 1 { return nil, errors.New("Incorrect number of arguments. Expecting 1") } //err := stub.PutState("hello_world", []byte(args[0])) stub.PutState("users-list", args)) stub.PutState("subjects", map[string]int{"Physics":50, "Chemistry":50, "Math":50})) if err != nil { return nil, err } return nil, nil }

selvaraman (Fri, 09 Jun 2017 09:30:28 GMT):
Is it possible to store array and nested json like the following? // Init resets all the things func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { if len(args) != 1 { return nil, errors.New("Incorrect number of arguments. Expecting 1") } //err := stub.PutState("hello_world", []byte(args[0])) stub.PutState("users-list", args)) stub.PutState("subjects", map[string]int{"Physics":50, "Chemistry":50, "Math":50})) if err != nil { return nil, err } return nil, nil }

selvaraman (Fri, 09 Jun 2017 09:30:28 GMT):
.

selvaraman (Fri, 09 Jun 2017 09:31:11 GMT):
Like, stub.PutState("users-list", args)) stub.PutState("subjects", map[string]int{"Physics":50, "Chemistry":50, "Math":50}))

selvaraman (Fri, 09 Jun 2017 09:31:11 GMT):
.

vjuge (Fri, 09 Jun 2017 14:36:58 GMT):
hi all, do I undestand that java chaincode won't be available until v1.1 ?

vjuge (Fri, 09 Jun 2017 14:38:34 GMT):
cf https://jira.hyperledger.org/browse/FAB-4072

tom.appleyard (Fri, 09 Jun 2017 17:14:37 GMT):
`panic: runtime error: index out of range` when installing chaincode - what does this mean?

durantto (Fri, 09 Jun 2017 20:46:48 GMT):
Has joined the channel.

durantto (Fri, 09 Jun 2017 20:49:03 GMT):
two questions: (1) can you install chaincode directly from a git repo, or do you have to download the go file locally and point to it? If yes; how do you point to git repo? (2) I know this is a silly question, but does the term 'artifact/artifacts' have any contextual meaning behind it that might help me understand what they are?

kletkeman (Fri, 09 Jun 2017 20:50:58 GMT):
@durantto Are you asking about fabric v1, or fabric v0.6?

durantto (Fri, 09 Jun 2017 20:51:07 GMT):
sorry v1 beta

durantto (Fri, 09 Jun 2017 21:00:40 GMT):
@kletkeman sorry, v1 beta

kletkeman (Fri, 09 Jun 2017 21:16:23 GMT):
@durantto http://hyperledger-fabric.readthedocs.io/en/latest/install_instantiate.html?highlight=install%20chaincode I have found that the CLI does not have visibility of chaincode outside of the fabric name space, but I think it should be fairly easy to hack in that visibility (as in expose your own chaincode working directory)

kletkeman (Fri, 09 Jun 2017 21:19:07 GMT):
I don't know if the CLI can pull it from github itself, but I'd bet not

durantto (Sat, 10 Jun 2017 10:56:57 GMT):
@kletkeman thanks very much for the information!

eliranbi (Sat, 10 Jun 2017 14:03:27 GMT):
Has joined the channel.

eliranbi (Sat, 10 Jun 2017 14:07:49 GMT):
@bkvellanki - Hi did you figure out how to get the user attributes? can you please share ?

MohammadObaid (Sat, 10 Jun 2017 18:39:38 GMT):
@here Hey all . I have asked this question previously but couldn't get any answer. I am developing my custom chaincode by following marble chaincode example. What I do want in my custom chaincode is to store merkel hash and previous block hash when transactions are invoked so that when I read block it also shows merkel hash and previous block just like in bitcoin.Is there a way I can achieve this or any alternative ?

MohammadObaid (Sat, 10 Jun 2017 18:39:38 GMT):
@here Hey all . I have asked this question previously but couldn't get any answer. I am developing my custom chaincode by following marble chaincode example. What I do want in my custom chaincode is to store merkel hash and previous block hash when transactions are invoked so that when I read block it also shows merkel hash and previous block just like in bitcoin . Is there a way I can achieve this or any alternative ?

MohammadObaid (Sun, 11 Jun 2017 15:01:45 GMT):
??

jrezwan (Sun, 11 Jun 2017 16:14:47 GMT):
Has joined the channel.

kletkeman (Sun, 11 Jun 2017 17:45:52 GMT):
@MohammadObaid Can you explain what you are trying to accomplish? That might help to understand how you are trying to go about it.

MohammadObaid (Sun, 11 Jun 2017 17:59:24 GMT):
@kletkeman When I query about any marble stored in a blockchain by calling this function `getHistoryForMarble` the result returned contain transaction id , timestamp and other data. I also want to see merkel hash, previous block number alongside with transaction id and other data. Is there anyway I can get these two extra values?

kletkeman (Sun, 11 Jun 2017 18:02:20 GMT):
@MohammadObaid You can get those value in an application using the SDK, not in the chaincode. Applications can look at the chain itself, which is all of the blocks, or at the world state. The chaincode sees only the transaction that it is processing and any world state that it chooses to read and/or write. The chain itself is not in scope as it is a permanent record of the transactions and their results, stored as full read / write sets. A new peer can be brought up by replaying the chain (which in fabric v1 might actually be many channels).

kletkeman (Sun, 11 Jun 2017 18:04:05 GMT):
There are articles around I believe that go into some depth around how Hyperledger Fabric might be used to implement a crypto-currency. You may be able to find some of that using Google.

MohammadObaid (Sun, 11 Jun 2017 18:10:22 GMT):
@kletkeman Thanks . I will take a look at node sdk. Just one more question. I have done everything using fabric cli like adding peers, deploying custom chaincode etc. Can I connect sdk with cli? or do I need to do everything from scratch using sdk?

kletkeman (Sun, 11 Jun 2017 18:12:22 GMT):
The cli has a lot of power, but it is not built on the SDK. The node SDK models the fabric with js objects and gives you access to pretty much everything the fabric can do. The very latest fabric builds also have a working balance-transfer application I am told, and it shows how most of the key operations can be done in js.

MohammadObaid (Sun, 11 Jun 2017 18:15:17 GMT):
Ok thanks :) I will work on node-sdk

snorlaxative (Mon, 12 Jun 2017 03:51:59 GMT):
Has joined the channel.

CarlXK (Mon, 12 Jun 2017 03:59:49 GMT):
@here invoke GetStateByRange method , got the error : _*runtime error: invalid memory address or nil pointer dereference*_ Case: invoke PutState() use keys: ACCOUNT~00001302 ACCOUNT~00001309 ACCOUNT~00001310 ACCOUNT~00001322 GetStateByRange(startKey, endKey) startKey: ACCOUNT~00000000 endKey: ACCOUNT~99999999

snorlaxative (Mon, 12 Jun 2017 04:05:00 GMT):
Hello all! I was trying to write a chaincode that would add ledgers uploaded by other members of the blockchain though couldnt find much information on how the hyperledger stores data. Also when the data is stored in the central ledger, how can i look for a particular string across a column ? I am new to hyperledger, so help would be deeply appreciated!

Mnorberto (Mon, 12 Jun 2017 04:16:02 GMT):
Has joined the channel.

prashiyn (Mon, 12 Jun 2017 10:01:44 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ZWqqMTpB4dCRP9GDK) @nickmelis I used to get this error if I create a channel and do not join / send the genesis block to all the peers in the channel. So the MSP map in fabric would be empty and when you run any other chaincode commands like instantiate a chaincode, i would get this error.

nhrishi (Mon, 12 Jun 2017 11:25:48 GMT):
Hi, Let's say there are 2 peers each belongs to 2 different organizations. I see we need to install the chaincode on all the 4 peers. DO we also need to instantiate explicitly on 4 peers? or we should just instantiate on Anchor peers?

yacovm (Mon, 12 Jun 2017 11:36:38 GMT):
only on some peer

yacovm (Mon, 12 Jun 2017 11:36:43 GMT):
not necessarily on anchor

nhrishi (Mon, 12 Jun 2017 11:37:55 GMT):
so do we have to instantiate on one peer of Org1 and one peer of Org2 in order to satisfy endorsement policy?

nhrishi (Mon, 12 Jun 2017 11:39:10 GMT):
And what are factors to be considered ..just for example.

Anshulmittal (Mon, 12 Jun 2017 12:16:55 GMT):
Has joined the channel.

muralisr (Mon, 12 Jun 2017 14:07:52 GMT):
@CarlXK https://chat.hyperledger.org/channel/chaincode-dev?msg=WJzMJgJfbHLDPyeau

muralisr (Mon, 12 Jun 2017 14:08:06 GMT):
do you have a stack trace for that ?

CarlXK (Tue, 13 Jun 2017 03:49:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=5Cm9s9nt4zniCdCrp) @muralisr First character of the key [account00000000] contains a null character which is not allowed Got the error because I PutState use the stub.CreateCompositeKey("ACCOUNT~", []string{"00001302"}) and GetStateByRange use stub.CreateCompositeKey(indexName, []string{"00000000"}) stub.CreateCompositeKey(indexName, []string{"99999999"})

CarlXK (Tue, 13 Jun 2017 03:49:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=5Cm9s9nt4zniCdCrp) @muralisr I use CreateCompositeKey to PutState, use GetStateByRange report error, changed to use GetStateByPartialCompositeKey is ok now.

CarlXK (Tue, 13 Jun 2017 03:49:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=5Cm9s9nt4zniCdCrp) @muralisr I PutState use CreateCompositeKey, query by GetStateByRange report error, changed to use GetStateByPartialCompositeKey is ok now.

Anshulmittal (Tue, 13 Jun 2017 11:54:47 GMT):
I am trying to deploy chaincode using the guide http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup.html#vagrant with Docker for mac option. I have followed all the steps. I do not get "Received REGISTERED, ready for invocations " message after following command CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02 Rather I receive 2017-06-13 16:29:33.494 IST [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2017-06-13 16:29:33.495 IST [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... When I proceed further using rest API, I get deploy and invoke success messages. The request and response are as follows: POST: localhost:7050/registrar { "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" } Response: { "OK": "Login successful for user 'jim'." } POST: localhost:7050/chaincode { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02", "name":"mycc" }, "ctorMsg": { "args":["init", "a", "100","b","200"] }, "secureContext": "jim" }, "id": 1 } Response: { "jsonrpc": "2.0", "result": { "status": "OK", "message": "mycc" }, "id": 1 } POST: localhost:7050/chaincode { "jsonrpc": "2.0", "method": "invoke", "params": { "type": 1, "chaincodeID":{ "name":"mycc" }, "ctorMsg": { "args":["invoke","a", "b", "10"] }, "secureContext": "jim" }, "id": 3 } Response: { "jsonrpc": "2.0", "result": { "status": "OK", "message": "733b0959-5e68-4447-a0bf-c4e0ffc04749" }, "id": 3 } POST: localhost:7050/chaincode { "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID":{ "name":"mycc" }, "ctorMsg": { "args":["query", "a"] }, "secureContext": "jim" }, "id": 5 } Response: { "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found)" }, "id": 5 } Any help would be much appreciated as I am stuck at this for quite many days

mvaz (Tue, 13 Jun 2017 11:57:54 GMT):
Has joined the channel.

muralisr (Tue, 13 Jun 2017 12:25:45 GMT):
@Anshulmittal will look into that doc to make sure its correct... can you follow this doc `docs/source/peer-chaincode-devmode.rst` instead please

gen_el (Tue, 13 Jun 2017 13:56:05 GMT):
Has joined the channel.

bmalavan (Tue, 13 Jun 2017 15:27:26 GMT):
HI, Please share me a reference where i can look for generating 'events' while state change happen in chaincode in GO?

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

Amjadnz (Wed, 14 Jun 2017 08:24:51 GMT):
@here - can somebody provide me more info on the below item?

Amjadnz (Wed, 14 Jun 2017 08:24:56 GMT):
The way we do installation in the production systems for peers is we share the source code with the partners and ask them to deploy it on their nodes. Once installed and instantiated - then all is fine. However if some crook client - changes the source could does the install and instantiate - he can put wrong transactions too - right? Does the chaincode deployment check for the "hash" of the code base too?

yacovm (Wed, 14 Jun 2017 08:25:23 GMT):
good question

yacovm (Wed, 14 Jun 2017 08:25:32 GMT):
the hash of the chaincode is saved on the channel

Amjadnz (Wed, 14 Jun 2017 08:26:22 GMT):
Aha - so if somebody tries to change the code then this would mismatch and would reject at the "install" stage itself. Right?

yacovm (Wed, 14 Jun 2017 08:27:14 GMT):
no. the install would work.

yacovm (Wed, 14 Jun 2017 08:27:22 GMT):
but when the container would launch

yacovm (Wed, 14 Jun 2017 08:27:27 GMT):
it will check the hash of the chaincode

yacovm (Wed, 14 Jun 2017 08:27:30 GMT):
and the hash of the channel

yacovm (Wed, 14 Jun 2017 08:27:34 GMT):
and then would fail to launch

Amjadnz (Wed, 14 Jun 2017 08:28:22 GMT):
Ok - makes perfect sense. thanks @yacovm

bmalavan (Wed, 14 Jun 2017 08:37:38 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ojShG7ZWiFBQSccGo) @bmalavan @here Any pointers for me to look at to implement events for state change?

nhrishi (Wed, 14 Jun 2017 10:41:46 GMT):
Hi, I've created 2 channels and 2 different chaincodes are deployed on each of the channels. I'm able to invoke chaincode 1 but invoke for chaincode 2 failing with "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.

narayanprusty (Wed, 14 Jun 2017 12:38:34 GMT):
Is it possible to achieve property level privacy in Fabric 1.0. For example: If I have a chaincode representing a tenancy contract. I want only tenant & lessor to see all the details, banks to see only payment terms and actual owner to see everything except payment terms. How can I achieve this in Fabric 1.0. If I use channels then I will need to deploy two different contracts and the total number of channels I can create is limited to the network performance. Channels are not meant to be used to achieve property level privacy. I don't want to do it off-chain and also don't want to do on-chain encryption as I cannot apply smart operations on it. What is the best solution for achieve this?

mmmmmcclxxvii (Thu, 15 Jun 2017 02:21:44 GMT):
Has joined the channel.

bmkor (Thu, 15 Jun 2017 03:49:10 GMT):
Has joined the channel.

Vwan (Thu, 15 Jun 2017 06:01:51 GMT):
Has joined the channel.

nickgaski (Thu, 15 Jun 2017 18:48:54 GMT):
anyone succeeded in running the peer and orderer binaries natively on mac? If I simply run a `make native` I receive a killed 9 or command not found response. If I run `GO_TAGS=nopkcs11 make native` I get a little further, but then a go panic stating `panic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied`

jmcnevin (Thu, 15 Jun 2017 20:36:29 GMT):
Has joined the channel.

mastersingh24 (Thu, 15 Jun 2017 22:33:22 GMT):
@nickgaski - ``` sudo mkdir /var/hyperledger ```

mastersingh24 (Thu, 15 Jun 2017 22:33:24 GMT):
;)

mastersingh24 (Thu, 15 Jun 2017 22:34:50 GMT):
Or set `CORE_PEER_FILESYSTEMPATH` to a writable directory

luckydogchina (Fri, 16 Jun 2017 06:10:31 GMT):
Has joined the channel.

luckydogchina (Fri, 16 Jun 2017 06:15:24 GMT):
I want to build the local chaincode environment ,but It is wrong when i run 'peer node start ----peer-defaultchain=false' 2017-06-16 13:51:53.202 CST [gossip/comm#-1] Accept -> WARN 04e Accept() called but comm module is stopping, returning empty channel 2017-06-16 13:51:53.202 CST [gossip/comm#-1] Stop -> DEBU 050 Shut down connection store, connection count: 0 2017-06-16 13:51:53.203 CST [gossip/gossip#0.0.0.0:7051] start -> INFO 052 Gossip instance 0.0.0.0:7051 started 2017-06-16 13:51:53.203 CST [gossip/comm#-1] Stop -> DEBU 054 Shut down publisher 2017-06-16 13:51:53.203 CST [gossip/gossip#0.0.0.0:7051] handlePresumedDead -> DEBU 053 Exiting 2017-06-16 13:51:53.203 CST [gossip/comm#-1] Stop -> DEBU 056 Closed subscriptions, waiting for goroutines to stop... 2017-06-16 13:51:53.203 CST [gossip/gossip#0.0.0.0:7051] acceptMessages -> DEBU 055 Exiting 2017-06-16 13:51:53.203 CST [gossip/comm#-1] Stop -> INFO 057 Stopped panic: ---empty version---(chain=,chaincode=cscc,version=,txid=e671252f-8bc3-4ff7-8d20-13ec727376d1,syscc=true,proposal=0x0 goroutine 1 [running]: panic(0xb3f820, 0xc421bb0e60) /usr/local/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/common/ccprovider.NewCCContext(0x0, 0x0, 0xc6596d, 0x4, 0x0, 0x0, 0xc421b48f60, 0x24, 0xc4202b4d01, 0x0, ...) /home/whty0/go/src/github.com/hyperledger/fabric/core/common/ccprovider/ccprovider.go:202 +0xa55 github.com/hyperledger/fabric/core/chaincode.(*ccProviderImpl).GetCCContext(0xc421bb0e00, 0x0, 0x0, 0xc6596d, 0x4, 0x0, 0x0, 0xc421b48f60, 0x24, 0x1275501, ...) /home/whty0/go/src/github.com/hyperledger/fabric/core/chaincode/ccproviderimpl.go:71 +0xce github.com/hyperledger/fabric/core/scc.deploySysCC(0x0, 0x0, 0x12246e0, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/core/scc/sysccapi.go:121 +0x7af github.com/hyperledger/fabric/core/scc.DeploySysCCs(0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/core/scc/importsysccs.go:79 +0xae github.com/hyperledger/fabric/peer/node.initSysCCs() /home/whty0/go/src/github.com/hyperledger/fabric/peer/node/start.go:89 +0x33 github.com/hyperledger/fabric/peer/node.serve(0xc42025e570, 0x0, 0x3, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/peer/node/start.go:166 +0xef2 github.com/hyperledger/fabric/peer/node.glob..func1(0x12274a0, 0xc42025e570, 0x0, 0x3, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/peer/node/start.go:82 +0x51 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x12274a0, 0xc420236cc0, 0x3, 0x4, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x6eb github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1227d20, 0x12274a0, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x5c7 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1227d20, 0x0, 0x0) /home/whty0/go/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x3d main.main() /home/whty0/go/src/github.com/hyperledger/fabric/peer/main.go:111 +0x52f

luckydogchina (Fri, 16 Jun 2017 06:16:35 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DTjjvLfrTKeAKHh4e) @luckydogchina what is wrong? @here

mastersingh24 (Fri, 16 Jun 2017 11:39:58 GMT):
@luckydogchina - Do you just want to use Fabric or do you want to actually contribute to the core Fabric itself? It looks like you are trying to build Fabric from source and then run it?

mastersingh24 (Fri, 16 Jun 2017 11:40:43 GMT):
It also looks like you likely tried to run `go build` for the peer package which is likely causing the problem

mastersingh24 (Fri, 16 Jun 2017 11:41:04 GMT):
If you want to build the peer binary, you should run `make peer`

muralisr (Sat, 17 Jun 2017 00:19:16 GMT):
@mastersingh24 @luckydogchina running `go build` instead of `make peer` or `make native` would cause the crash

muralisr (Sat, 17 Jun 2017 00:23:25 GMT):
`chaincode=cscc,version=` - the system chaincode code cscc needs fabric version that's built by make peer

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState("noevents", []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState("noevents", []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState(\"noevents\", []byte(\"aaa\")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState("noevents", []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState("noevents", []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState(|>noevents|>, []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

bmalavan (Mon, 19 Jun 2017 03:41:15 GMT):
I have a chaincode as mentioned below: ```stub.PutState("noevents", []byte("aaa")) val,err := stub.GetState("noevents") if err != nil {fmt.Println("Fee Error: " + err.Error())} fmt.Println("val Initialized with : " + string(val))``` I am doing this in Init() method, so that I want a value to be initialized during chaincode instantiation. However, I always get empty value printed and there is no error captured. Can anyone point out where I am doing wrong?

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

gauravgiri (Mon, 19 Jun 2017 08:17:19 GMT):
Has joined the channel.

gauravgiri (Mon, 19 Jun 2017 08:18:25 GMT):
Any guideline/best practice, if we wish to encrypt the chaincode data at storage (leveldb/couchdb) ? Is there any out of box support for this in v1.0 fabric chaincode ?

mastersingh24 (Mon, 19 Jun 2017 10:56:11 GMT):
@gauravgiri - unless you plan on trying to implement some very custom record-level encryption (which would basically be done at the application / chaincode layer), the easiest thing is to simply encrypt the file system

ashahn (Mon, 19 Jun 2017 13:58:38 GMT):
Has joined the channel.

mariogemoll (Mon, 19 Jun 2017 15:56:04 GMT):
I'm trying to use an example I found earlier in this chat ( https://chat.hyperledger.org/channel/chaincode-dev?msg=82mGnA2zjM7zBtAaY ). It uses an external library github.com/golang/protobuf/proto which seems to be missing when I try to instantiate the chaincode. Can I include external dependencies/libraries and how do I do that?

mariogemoll (Mon, 19 Jun 2017 15:57:11 GMT):
I'm trying to use an example I found earlier in this chat ( https://chat.hyperledger.org/channel/chaincode-dev?msg=w479r2pSPq2vkMzEL ). It uses an external library github.com/golang/protobuf/proto which seems to be missing when I try to instantiate the chaincode. Can I include external dependencies/libraries and how do I do that?

msoumeit (Mon, 19 Jun 2017 16:57:29 GMT):
Query: Is it possible to connect to external sources( URL/DB) from chaincode? How can I achieve this function and whether this needs to be deterministic? Thanks.

praveennagpal (Mon, 19 Jun 2017 17:11:28 GMT):
@msoumeit: I think there is no constraint to access external resources from chaincode as its not inside any sandboxed secure VMs unlike EVM (Ethereum Virtual Machines) but the onus of keeping it deterministic then is on yourself.

msoumeit (Mon, 19 Jun 2017 17:21:09 GMT):
Thanks, @praveennagpal .I am working on a situation where I need to capture a trade in the blockchain, but the price would depend on market price which changes within milliseconds. That could result in a different hash for the same trade across peers. How can I handle that?

praveennagpal (Mon, 19 Jun 2017 17:23:53 GMT):
I guess, you would need to built your own set of oracle service which all peers can trust. This service can keep a record of all the market prices based on the agreed frequency of polling from the external source. Asking all peers to fetch data individually will lead to mismatch.

msoumeit (Mon, 19 Jun 2017 17:29:41 GMT):
thank you @praveennagpal

Raje (Mon, 19 Jun 2017 18:20:06 GMT):
Has joined the channel.

vladyslavmunin (Tue, 20 Jun 2017 05:47:52 GMT):
Has joined the channel.

mariogemoll (Tue, 20 Jun 2017 07:44:47 GMT):
It would be great if someone could give an answer to this question: What do I have to do to be able to use external libraries in chaincode? Thanks

gauravgiri (Tue, 20 Jun 2017 11:25:21 GMT):
@mariogemoll @praveennagpal @msoumeit : Another option is that the market price is computed/inferred by the client web application by invoking the external service, then later this client web application can supply the market price as one of the chaincode function arguments.

mgk (Tue, 20 Jun 2017 11:55:37 GMT):
Has joined the channel.

mastersingh24 (Tue, 20 Jun 2017 14:54:26 GMT):
[ How are you packaging and installing your chaincode?](https://chat.hyperledger.org/channel/chaincode-dev?msg=jr8Kqv3kqBp6j382n) @mariogemoll

DoubleMalt (Tue, 20 Jun 2017 16:15:56 GMT):
Has joined the channel.

mariogemoll (Tue, 20 Jun 2017 16:59:12 GMT):
@mastersingh24 using the peer CLI util. I tried both peer chaincode install and peer chaincode package (and then install).

mariogemoll (Tue, 20 Jun 2017 16:59:12 GMT):
@mastersingh24 using the `peer CLI util. I tried both `peer chaincode install` and `peer chaincode package` (and then install).

mariogemoll (Tue, 20 Jun 2017 16:59:12 GMT):
@mastersingh24 using the peer CLI util. I tried both `peer chaincode install` and `peer chaincode package` (and then install).

mastersingh24 (Tue, 20 Jun 2017 16:59:50 GMT):
I assume you were using the beta?

mariogemoll (Tue, 20 Jun 2017 17:00:00 GMT):
yes

mariogemoll (Tue, 20 Jun 2017 17:00:07 GMT):
It works locally in dev-mode btw

mastersingh24 (Tue, 20 Jun 2017 17:00:31 GMT):
https://gerrit.hyperledger.org/r/#/c/10539/

mastersingh24 (Tue, 20 Jun 2017 17:00:59 GMT):
There was a bug in the package functionality of the peer CLI

mastersingh24 (Tue, 20 Jun 2017 17:01:29 GMT):
It's fixed now and we should hopefully be pushing out new release candidate images later this week

mariogemoll (Tue, 20 Jun 2017 17:02:42 GMT):
ah ok

mariogemoll (Tue, 20 Jun 2017 17:03:09 GMT):
so should it work when I build the docker images from master?

mastersingh24 (Tue, 20 Jun 2017 17:11:43 GMT):
yep

mariogemoll (Tue, 20 Jun 2017 17:15:13 GMT):
OK I'll try that. Thanks! BTW it seemed strange to me that this functionality (finding out the identity of the sender of an invoke message) is not "baked in". Coming from Ethereum that's a fundamental piece of functionality (for all sorts of permissioning). Or maybe I'm missing something and I should not do that in general because of conceptual reasons?

mastersingh24 (Tue, 20 Jun 2017 18:03:46 GMT):
So I agree that we should actually add some better utilities to extract the "creator / sender" of the message

mastersingh24 (Tue, 20 Jun 2017 18:04:12 GMT):
The tricky part is that the system is built to support other types of identity beyond X509 certificates

mastersingh24 (Tue, 20 Jun 2017 18:04:31 GMT):
BUT - we should add some helper functions to parse things out for the common cases

mastersingh24 (Tue, 20 Jun 2017 18:04:49 GMT):
Feel free to open a JIRA and classify as an improvement

mastersingh24 (Tue, 20 Jun 2017 18:04:55 GMT):
I'm all for it

durantto (Tue, 20 Jun 2017 19:30:35 GMT):
Has left the channel.

mariogemoll (Tue, 20 Jun 2017 20:40:51 GMT):
OK. Thanks again. I can assume the certificate is already validated by the system, and I only need to look at the Common Name, right?

tinywell (Wed, 21 Jun 2017 02:02:32 GMT):
Has joined the channel.

SanthoshKumarMK (Wed, 21 Jun 2017 11:16:14 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.

pmontagn (Wed, 21 Jun 2017 12:57:13 GMT):
Has joined the channel.

ianco (Wed, 21 Jun 2017 13:59:02 GMT):
Has joined the channel.

comeonliuqd (Thu, 22 Jun 2017 02:40:07 GMT):
Has joined the channel.

mastersingh24 (Thu, 22 Jun 2017 11:58:56 GMT):
@SanthoshKumarMK - nope

SanthoshKumarMK (Thu, 22 Jun 2017 12:00:07 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=2ckYFgGLgE4iiZHqJ) @mastersingh24 :disappointed:

mastersingh24 (Thu, 22 Jun 2017 12:00:52 GMT):
it creates a lot of complexity and it actually not secure

mastersingh24 (Thu, 22 Jun 2017 12:01:08 GMT):
given that Go does not do a very good job of handling versions

mastersingh24 (Thu, 22 Jun 2017 12:01:41 GMT):
But it's pretty simple to package and install chaincode locally and you can always keep your local git clone up to date

SanthoshKumarMK (Thu, 22 Jun 2017 12:03:02 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jGtJhT5xm5WepFNiQ) @mastersingh24 thanks a lot :)

durantto (Thu, 22 Jun 2017 13:55:58 GMT):
Has joined the channel.

durantto (Thu, 22 Jun 2017 13:58:02 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=WMWEJQCM6qM9W92Q3) @kletkeman just posting this as an FYI to anyone else who might ask the same question. https://jira.hyperledger.org/browse/FAB-3172

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ```

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ```

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode docker ps shows: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3d8c59eba5c hyperledger/fabric-peer "sh -c 'sleep 5; p..." About an hour ago Up About an hour 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp chaincodedevenv_vp0_1 ea16601570d0 hyperledger/fabric-membersrvc "membersrvc" About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp chaincodedevenv_membersrvc_1 ``` I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ```

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode docker ps shows: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3d8c59eba5c hyperledger/fabric-peer "sh -c 'sleep 5; p..." About an hour ago Up About an hour 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp chaincodedevenv_vp0_1 ea16601570d0 hyperledger/fabric-membersrvc "membersrvc" About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp chaincodedevenv_membersrvc_1 ``` I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ``` Seems like it is related to: https://jira.hyperledger.org/browse/FAB-2854 I have libtool installed but not libltdl-dev and I am not sure how to install it or if it will fix the problem

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode docker ps shows: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3d8c59eba5c hyperledger/fabric-peer "sh -c 'sleep 5; p..." About an hour ago Up About an hour 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp chaincodedevenv_vp0_1 ea16601570d0 hyperledger/fabric-membersrvc "membersrvc" About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp chaincodedevenv_membersrvc_1 ``` I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ``` Seems like it is related to: https://jira.hyperledger.org/browse/FAB-2854 I have libtool installed but not libltdl-dev and I am not sure how to install it or if it will fix the problem `centos-release-7-3.1611.el7.centos.x86_64`

durantto (Thu, 22 Jun 2017 15:09:31 GMT):
Working through this development environment http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode docker ps shows: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3d8c59eba5c hyperledger/fabric-peer "sh -c 'sleep 5; p..." About an hour ago Up About an hour 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp chaincodedevenv_vp0_1 ea16601570d0 hyperledger/fabric-membersrvc "membersrvc" About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp chaincodedevenv_membersrvc_1 ``` I get to here: ``` cd $GOPATH/src/github.com/chaincode_example02 go build ``` And I get: ``` # github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 ../hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory #include ^ compilation terminated. ``` Seems like it is related to: https://jira.hyperledger.org/browse/FAB-2854 I have libtool installed but not libltdl-dev and I am not sure how to install it or if it will fix the problem my VM is `centos-release-7-3.1611.el7.centos.x86_64`

sativ (Fri, 23 Jun 2017 09:55:14 GMT):
Has joined the channel.

jrosmith (Fri, 23 Jun 2017 14:39:31 GMT):
Has joined the channel.

jrosmith (Fri, 23 Jun 2017 14:40:47 GMT):
hey all, does anyone know of any resources for best practices developing chaincode for 1.0?

jmcnevin (Fri, 23 Jun 2017 17:09:31 GMT):
I'm a little unclear as to what `peer chaincode signpackage` is for. Is there some way to enforce that a chaincode package has been signed before it can be installed?

akashmar (Fri, 23 Jun 2017 19:12:50 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=QcA6wRYtSBXzTabAd) @durantto you need to install libtool-ltdl-devel for centos

akashmar (Fri, 23 Jun 2017 19:18:05 GMT):
@mastersingh24 does chaincode support authorization on transactions? for example, if the chaincode receives a transaction changing a property of Org1's in the ledger, is there a way to verify within chaincode if the issuer of the transaction actually belongs to Org1?

kletkeman (Sat, 24 Jun 2017 01:01:04 GMT):
@akashmar The following stub function gets you the identity of the transaction creator: // GetCreator returns `SignatureHeader.Creator` (e.g. an identity) // of the `SignedProposal`. This is the identity of the agent (or user) // submitting the transaction. GetCreator() ([]byte, error) The creator is defined thus: // Creator of the message, specified as a certificate chain Which I believe means that you would look inside the certificate (always an ecert on fabric v1) to find the ORG and use for your RBAC implementation. You would return false + "unauthorized" if the ORGs don't match.

ThePleasurable (Sat, 24 Jun 2017 12:23:55 GMT):
Has joined the channel.

kevinsong (Sat, 24 Jun 2017 14:18:45 GMT):
Has joined the channel.

mastersingh24 (Sat, 24 Jun 2017 20:52:05 GMT):
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() // } ```

mastersingh24 (Sat, 24 Jun 2017 20:52:05 GMT):
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() } ```

snorlaxative (Sun, 25 Jun 2017 10:59:36 GMT):
I am struggling writing the chaincode which saves input arguments into the structures. Could someone point me to a chaincode that implements structures?

zuowang (Mon, 26 Jun 2017 07:49:42 GMT):
Has joined the channel.

smfaizalkhan (Mon, 26 Jun 2017 09:04:22 GMT):
Has joined the channel.

smfaizalkhan (Mon, 26 Jun 2017 09:08:42 GMT):
Hello All I'm done with initialSet-up and about to write a smart Contract.While running chaincode command i get the issue .\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.g‌​o:29:18: fatal error:ltdl.h: No such file or directory compilation terminated Can anyone let me know how to proceed further ?

arner (Mon, 26 Jun 2017 09:44:53 GMT):
ls

yacovm (Mon, 26 Jun 2017 10:04:36 GMT):
yes

yacovm (Mon, 26 Jun 2017 10:05:21 GMT):
sudo apt install libtool libltdl-dev

yacovm (Mon, 26 Jun 2017 10:05:25 GMT):
@smfaizalkhan

smfaizalkhan (Mon, 26 Jun 2017 10:07:16 GMT):
Yes i did that,But when i check the contents of the libltdl which is in /usr/include/libltdl I dont find the ltdl.h file

smfaizalkhan (Mon, 26 Jun 2017 10:07:28 GMT):
@yacovm Yes i did that,But when i check the contents of the libltdl which is in /usr/include/libltdl I dont find the ltdl.h file

smfaizalkhan (Mon, 26 Jun 2017 11:20:24 GMT):
Thanx @yacovm ..I removed it and installed it..It worked

tbltzk (Mon, 26 Jun 2017 12:35:03 GMT):
Has joined the channel.

vladyslavmunin (Mon, 26 Jun 2017 12:38:13 GMT):
Hi,can I use already buildable go file for installing on peer? now it looks like I must write path to folder with go files. Thanks

durantto (Mon, 26 Jun 2017 13:09:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zdjJ2SSRNqXmZKZuF) @akashmar Thank you very much for the response. That got me past that step. I am now working on this step: `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02`

durantto (Mon, 26 Jun 2017 13:09:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zdjJ2SSRNqXmZKZuF) @akashmar Thank you very much for the response. That got me past that step. I am now working on this step: `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02` When I run the chaincode with the command above

durantto (Mon, 26 Jun 2017 13:09:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zdjJ2SSRNqXmZKZuF) @akashmar Thank you very much for the response. That got me past that step. I am now working on this step: `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02` When I run the chaincode with the command above, I get: ``` vp0_1 | 2017-06-26 13:10:35.003 UTC [chaincode] HandleChaincodeStream -> DEBU 1b1 Current context deadline = 0001-01-01 00:00:00 +0000 UTC, ok = false vp0_1 | 2017-06-26 13:10:35.003 UTC [chaincode] processStream -> DEBU 1b2 []Received message REGISTER from shim vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] HandleMessage -> DEBU 1b3 []Fabric side Handling ChaincodeMessage of type: REGISTER in state created vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] beforeRegisterEvent -> DEBU 1b4 Received REGISTER in state created vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] registerHandler -> DEBU 1b5 registered handler complete for chaincode mycc vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] beforeRegisterEvent -> DEBU 1b6 Got REGISTER for chaincodeID = name:"mycc" , sending back REGISTERED vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notifyDuringStartup -> DEBU 1b7 nothing to notify (dev mode ?) vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notifyDuringStartup -> DEBU 1b8 sending READY vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] processStream -> DEBU 1b9 []Move state message READY vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] HandleMessage -> DEBU 1ba []Fabric side Handling ChaincodeMessage of type: READY in state established vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] enterReadyState -> DEBU 1bb []Entered state ready vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notify -> DEBU 1bc notifier Txid: does not exist vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] processStream -> DEBU 1bd []sending state message READY ```

durantto (Mon, 26 Jun 2017 13:09:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zdjJ2SSRNqXmZKZuF) @akashmar Thank you very much for the response. That got me past that step. I am now working on this step: `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02` When I run the chaincode with the command above, I get: ``` vp0_1 | 2017-06-26 13:10:35.003 UTC [chaincode] HandleChaincodeStream -> DEBU 1b1 Current context deadline = 0001-01-01 00:00:00 +0000 UTC, ok = false vp0_1 | 2017-06-26 13:10:35.003 UTC [chaincode] processStream -> DEBU 1b2 []Received message REGISTER from shim vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] HandleMessage -> DEBU 1b3 []Fabric side Handling ChaincodeMessage of type: REGISTER in state created vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] beforeRegisterEvent -> DEBU 1b4 Received REGISTER in state created vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] registerHandler -> DEBU 1b5 registered handler complete for chaincode mycc vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] beforeRegisterEvent -> DEBU 1b6 Got REGISTER for chaincodeID = name:"mycc" , sending back REGISTERED vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notifyDuringStartup -> DEBU 1b7 nothing to notify (dev mode ?) vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notifyDuringStartup -> DEBU 1b8 sending READY vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] processStream -> DEBU 1b9 []Move state message READY vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] HandleMessage -> DEBU 1ba []Fabric side Handling ChaincodeMessage of type: READY in state established vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] enterReadyState -> DEBU 1bb []Entered state ready vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] notify -> DEBU 1bc notifier Txid: does not exist vp0_1 | 2017-06-26 13:10:35.004 UTC [chaincode] processStream -> DEBU 1bd []sending state message READY ``` But the docs say I should see something like: `Received REGISTERED, ready for invocations`

akashmar (Mon, 26 Jun 2017 13:17:14 GMT):
@durantto so what's the problem? I don't see any errors

muralisr (Mon, 26 Jun 2017 13:18:21 GMT):
@durantto not sure if this helps `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02` should be `CORE_CHAINCODE_ID_NAME=mycc: CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02`

muralisr (Mon, 26 Jun 2017 13:18:39 GMT):
where is the -v param in install and instantiate

muralisr (Mon, 26 Jun 2017 13:19:02 GMT):
oh, are you on 0.6 perhaps ?

durantto (Mon, 26 Jun 2017 13:19:16 GMT):
@akashmar hey sorry, didn't get a chance to finish. When I make a rest request i get 502 from fiddler and connection refused from postman

durantto (Mon, 26 Jun 2017 13:20:25 GMT):
@akashmar and @muralisr so I wasn't sure if because I wasn't seeing `Received REGISTERED, ready for invocations` : that meant something was off. I am

muralisr (Mon, 26 Jun 2017 13:20:46 GMT):
ok .... never mind my previous comment then plase

muralisr (Mon, 26 Jun 2017 13:20:46 GMT):
ok .... never mind my previous comment then please

durantto (Mon, 26 Jun 2017 13:21:47 GMT):
@muralisr its ok; I am running 1.0.0-beta and following the development environment walkthrough here: http://fabricrepo.readthedocs.io/en/master/Setup/Chaincode-setup/#running-the-chaincode

muralisr (Mon, 26 Jun 2017 13:22:24 GMT):
from your peer side logs, I'd guess the registration did complete

muralisr (Mon, 26 Jun 2017 13:23:06 GMT):
when I run in devmode, on 1.0, I see the following

muralisr (Mon, 26 Jun 2017 13:23:11 GMT):
```root@1895c148d073:/opt/gopath/src/chaincode/chaincode_example02# CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02 2017-06-25 15:26:33.321 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2017-06-25 15:26:33.321 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...```

durantto (Mon, 26 Jun 2017 13:23:23 GMT):
yep, me too

durantto (Mon, 26 Jun 2017 13:23:46 GMT):
``` CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02 2017-06-26 09:10:35.002 EDT [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2017-06-26 09:10:35.002 EDT [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... ```

muralisr (Mon, 26 Jun 2017 13:23:48 GMT):
that may be ok then

durantto (Mon, 26 Jun 2017 13:26:18 GMT):
so once that is running, are you able to interact with chaincode_example02?

muralisr (Mon, 26 Jun 2017 13:52:46 GMT):
yes

muralisr (Mon, 26 Jun 2017 13:54:03 GMT):
given where you are, sounds like you should be too @durantto

muralisr (Mon, 26 Jun 2017 13:56:07 GMT):
you do have to create a channel/join etc

muralisr (Mon, 26 Jun 2017 13:56:07 GMT):
you do have to create a channel/join

muralisr (Mon, 26 Jun 2017 13:56:39 GMT):
ie, even though you are in "dev" mode you do have to do that

akashmar (Mon, 26 Jun 2017 14:01:33 GMT):
@kletkeman @mastersingh24 I'm currently using Java chaincode (I know it's not supported fully yet) and the GetCreator method is not implemented there yet. I'll just have to make the changes myself but good to know there's way to implement that functionality within the chaincode. Thanks!

kletkeman (Mon, 26 Jun 2017 15:31:49 GMT):
@akashmar Go is the native language used in the fabric and I consider it a good personal investment to learn that language and use it for development. The Go SDK will likely be very good as well once it catches up to the node SDK (if it hasn't already). I have executed tens of millions of Go based transactions on v0.6 in a 5 million block chain and the performance and stability are superb. The other viable alternative is is to use Hyperledger Composer and take advantage of their native ACL language.

kletkeman (Mon, 26 Jun 2017 15:31:49 GMT):
@akashmar Go is the native language used in the fabric and I consider it a good personal investment to learn that language and use it for development. The Go SDK will likely be very good as well once it catches up to the node SDK (if it hasn't already). I have executed tens of millions of Go based transactions on v0.6 in a 5 million block chain and the performance and stability are superb. The other viable alternative would be to use Hyperledger Composer and take advantage of their native ACL language.

akashmar (Mon, 26 Jun 2017 16:09:33 GMT):
@kletkeman I started working on the chaincode before Java was disabled in beta. I'd have to go back and rewrite what I have in Go. I don't really have the time. Besides, that feature I was asking about would just be "nice-to-have" for the prototype I'm building.

kletkeman (Mon, 26 Jun 2017 16:28:39 GMT):
@akashmar Fair enough. My guess is that you will have enough trouble and limitations with Java based chaincode that the time saved by staying with Java chaincode will be lost elsewhere. Anyway, best of luck.

livespotty (Mon, 26 Jun 2017 17:01:58 GMT):
Has joined the channel.

dangnguy (Mon, 26 Jun 2017 22:04:17 GMT):
Has joined the channel.

dangnguy (Mon, 26 Jun 2017 22:05:39 GMT):
Hello! I've tried to execute the Writing Your First Application sample. When I run "node query.js", I got the following error. Can someone please help me on what I am missing here? Thanks so much. Create a client and set the wallet location Set wallet path, and associate user PeerAdmin with application error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: TypeError: this is not a typed array. at Function.from (native) at importKey (/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) at fromString (/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) at /home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: TypeError: this is not a typed array. at Function.from (native) at importKey (/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) at fromString (/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) at /home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 Caught Error [TypeError: this is not a typed array.]

aaronzheng (Tue, 27 Jun 2017 02:22:23 GMT):
hi all, i wrote my chaincode to store a struct, but when i get the struct, i got nothing. any one has idea for it? 1. type SimpleChaincode struct 2. var center SimpleChaincode 3. binary.Write(&buf, binary.LittleEndian, center) stub.PutState("center", buf.Bytes()) 4. result, _ := stub.GetState("center") return shim.Success(result) 5. the payload is empty

JonathanTan (Tue, 27 Jun 2017 07:46:05 GMT):
@dangnguy looks like your wallet/keys might be missing?

JonathanTan (Tue, 27 Jun 2017 07:46:32 GMT):
@aaronzheng are you coding an invoke or query function? could you share your full function?

alfa (Tue, 27 Jun 2017 08:02:20 GMT):
@JonathanTan Could you help me for for this "I am building sample applications, where user must have to register for login. So for this registration form contain username & password as well, so I have to store this basic details in chain code OR into database ( mongodb, mysql etc). "? which is best ways.?

JonathanTan (Tue, 27 Jun 2017 08:15:47 GMT):
Hi @alfa , there's actually two concepts for user management, 1) To use the fabric enrollment ids and secrets to identity users or 2) abstract the user model to to chaincode by creating a user datastore in the blockchain datastore

JonathanTan (Tue, 27 Jun 2017 08:17:24 GMT):
1) has limitations that the users can only access the network via that client/peer ; could be a more secure model/design

JonathanTan (Tue, 27 Jun 2017 08:17:38 GMT):
2) is how Fabric composer is handling users

alfa (Tue, 27 Jun 2017 08:30:26 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=2iHfEdLhu4XZ2LNby) @JonathanTan : so here enrollmentids and secrets works as username and password.? Could you share any ref. links or example to understand this better

DeutscheBahn-BlockchainDev (Tue, 27 Jun 2017 08:37:48 GMT):
Has joined the channel.

smfaizalkhan (Tue, 27 Jun 2017 09:03:46 GMT):
Hello All, Im trying to write a sample chaindoed using GO in sulime text editor I'm able to run a Go pragram using go run xxx.go command When i try to do the same for chaincode n sublime using the command go run Simplechaincode.go,it says "Error starting Simple chaincode:Error chaincode id not provided". Help me out

SRK (Tue, 27 Jun 2017 09:21:08 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=bsNXAWyGgCYsPtThS) @rocket.cat k

rocket.cat (Tue, 27 Jun 2017 09:21:08 GMT):
Has joined the channel.

SRK (Tue, 27 Jun 2017 09:21:54 GMT):
did chaincode have unique address.?( like ethereum smart contract have )

smfaizalkhan (Tue, 27 Jun 2017 09:25:39 GMT):
@SRK Is the question addressed to me ?

SRK (Tue, 27 Jun 2017 09:26:35 GMT):
to all

alfa (Tue, 27 Jun 2017 13:29:37 GMT):
@SRK : no chaincode don't have any public address same as ethereum smart contract.

alfa (Tue, 27 Jun 2017 13:42:16 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ctaQtJv4YBLqN9pT8) @alfa : thx

dangnguy (Tue, 27 Jun 2017 15:36:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=wmdGjinj9dSCawPQw) @JonathanTan I'm not sure what the issue is. I basically just followed the instructions top down. I'll look at the wallet/keys per your suggestion. Thanks.

smanolache (Tue, 27 Jun 2017 16:00:34 GMT):
Has joined the channel.

smanolache (Tue, 27 Jun 2017 16:01:17 GMT):
hello

smanolache (Tue, 27 Jun 2017 16:02:18 GMT):
I'm getting this error when instantiating the chaincode: vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:13: missing function body for "gettimeofday"

smanolache (Tue, 27 Jun 2017 16:03:56 GMT):
I've seen the same error posted by lbonniot on this channel

smanolache (Tue, 27 Jun 2017 16:04:07 GMT):
do you have any idea how to fix it?

smanolache (Tue, 27 Jun 2017 16:04:09 GMT):
thank you

jtsiros (Tue, 27 Jun 2017 16:42:54 GMT):
Has joined the channel.

jtsiros (Tue, 27 Jun 2017 16:43:26 GMT):
Hey folks, When writing chaincode apps, where do we place our dependencies so the chaincode can properly be installed and instantiated on a peer node? For example, I have a library that I'd like my chaincode to use and I'm getting the following error when installing the chaincode: ``` Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for ***.com/rp/cclib: go list: failed with error: "exit status 1" can't load package: package ***.com/rp/cclib: cannot find package "***.com/rp/cclib" in any of: /opt/go/src/***.com/rp/cclib (from $GOROOT) /opt/gopath/src/***.com/rp/cclib (from $GOPATH)

ShermanHLee (Tue, 27 Jun 2017 18:29:37 GMT):
Has joined the channel.

jtsiros (Tue, 27 Jun 2017 18:39:06 GMT):
Hey guys, I'm having an issue instantiating my chaincode that I've vendored with dependencies. I'm able to successfully install it using the install chaincode command: ```2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 186 Sign: plaintext: 0A9E070A5C08031A0C08C3CACACA0510...7F7FFF1D0000FFFF2AA1EAAB007A3200 2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 187 Sign: digest: E3B4BDF2162B6FB118A92A698DAEBF1DB02EA9402B8858957F63ACCAA63E3F95 2017-06-27 18:34:43.648 UTC [chaincodeCmd] install -> DEBU 188 Installed remotely response:``` but instantiating the chaincode complains about not finding the vendor dependencies: ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/***/rp/user-chaincode/user.go:7:2: cannot find package "***/rp/cclib" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/***/rp/cclib (vendor tree) /opt/go/src/***/rp/cclib (from $GOROOT) /chaincode/input/src/***/rp/cclib (from $GOPATH) /opt/gopath/src/***/rp/cclib chaincode/input/src/***/rp/user-chaincode/user.go:9:2: cannot find package "github.com/google/uuid" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/github.com/google/uuid (vendor tree) /opt/go/src/github.com/google/uuid (from $GOROOT) /chaincode/input/src/github.com/google/uuid (from $GOPATH) /opt/gopath/src/github.com/google/uuid " Usage: peer chaincode instantiate [flags]```

jtsiros (Tue, 27 Jun 2017 18:39:06 GMT):
Hey guys, I'm having an issue instantiating my chaincode that I've vendored with dependencies. I'm able to successfully install it using the install chaincode command: ```2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 186 Sign: plaintext: 0A9E070A5C08031A0C08C3CACACA0510...7F7FFF1D0000FFFF2AA1EAAB007A3200 2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 187 Sign: digest: E3B4BDF2162B6FB118A92A698DAEBF1DB02EA9402B8858957F63ACCAA63E3F95 2017-06-27 18:34:43.648 UTC [chaincodeCmd] install -> DEBU 188 Installed remotely response:``` but instantiating the chaincode complains about not finding the vendor dependencies: ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/***/rp/user-chaincode/user.go:7:2: cannot find package "***/rp/cclib" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/***/rp/cclib (vendor tree) /opt/go/src/***/rp/cclib (from $GOROOT) /chaincode/input/src/***/rp/cclib (from $GOPATH) /opt/gopath/src/***/rp/cclib chaincode/input/src/***/rp/user-chaincode/user.go:9:2: cannot find package "github.com/google/uuid" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/github.com/google/uuid (vendor tree) /opt/go/src/github.com/google/uuid (from $GOROOT) /chaincode/input/src/github.com/google/uuid (from $GOPATH) /opt/gopath/src/github.com/google/uuid " Usage: peer chaincode instantiate [flags]```

jtsiros (Tue, 27 Jun 2017 18:39:06 GMT):
Hey guys, I'm having an issue instantiating my chaincode that I've vendored with dependencies. I'm able to successfully install it using the install chaincode command: ```2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 186 Sign: plaintext: 0A9E070A5C08031A0C08C3CACACA0510...7F7FFF1D0000FFFF2AA1EAAB007A3200 2017-06-27 18:34:43.601 UTC [msp/identity] Sign -> DEBU 187 Sign: digest: E3B4BDF2162B6FB118A92A698DAEBF1DB02EA9402B8858957F63ACCAA63E3F95 2017-06-27 18:34:43.648 UTC [chaincodeCmd] install -> DEBU 188 Installed remotely response:``` but instantiating the chaincode complains about not finding the vendor dependencies: ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/***/rp/user-chaincode/user.go:7:2: cannot find package "***/rp/cclib" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/***/rp/cclib (vendor tree) /opt/go/src/***/rp/cclib (from $GOROOT) /chaincode/input/src/***/rp/cclib (from $GOPATH) /opt/gopath/src/***/rp/cclib chaincode/input/src/***/rp/user-chaincode/user.go:9:2: cannot find package "github.com/google/uuid" in any of: /chaincode/input/src/***/rp/user-chaincode/vendor/github.com/google/uuid (vendor tree) /opt/go/src/github.com/google/uuid (from $GOROOT) /chaincode/input/src/github.com/google/uuid (from $GOPATH) /opt/gopath/src/github.com/google/uuid " Usage: peer chaincode instantiate [flags] ``` @nickgaski suggested I post here for help

jtsiros (Tue, 27 Jun 2017 18:44:22 GMT):
I'm instantiating the chaincode using the following command: ```peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n cc -v 1.0```

webdaford (Tue, 27 Jun 2017 18:47:16 GMT):
Has joined the channel.

muralisr (Tue, 27 Jun 2017 19:58:39 GMT):
@jtsiros (1) what level of fabric are you using and (2) are you doing install & instantiate from a docker container or from your fabric/ download env

jtsiros (Tue, 27 Jun 2017 20:11:28 GMT):
@muralisr I'm using 1.0.0-beta and I'm doing the install & instantiate from the CLI docker container

jtsiros (Tue, 27 Jun 2017 20:14:05 GMT):
@muralisr I'm also using the fabcar fabric example network to load a this sample chaincode on

muralisr (Tue, 27 Jun 2017 20:16:54 GMT):
is "github.com/google/uuid" is not vendored in `/chaincode/input/src/***/rp/user-chaincode/vendor/` ?

muralisr (Tue, 27 Jun 2017 20:16:54 GMT):
is "github.com/google/uuid" is vendored in `/chaincode/input/src/***/rp/user-chaincode/vendor/` ?

jtsiros (Tue, 27 Jun 2017 20:17:17 GMT):
yes

jtsiros (Tue, 27 Jun 2017 20:17:21 GMT):
i've confirmed it

jtsiros (Tue, 27 Jun 2017 20:18:06 GMT):
```github.com/google/uuid ls master :: 20h :: ⬡ CONTRIBUTING.md LICENSE dce.go hash.go node.go time.go uuid.go version4.go CONTRIBUTORS README.md doc.go marshal.go sql.go util.go version1.go```

muralisr (Tue, 27 Jun 2017 20:18:28 GMT):
this is in the CLI container ?

jtsiros (Tue, 27 Jun 2017 20:18:37 GMT):
yeah

muralisr (Tue, 27 Jun 2017 20:18:54 GMT):
and `pwd` please

muralisr (Tue, 27 Jun 2017 20:19:26 GMT):
and `echo $GOPATH` too please

jtsiros (Tue, 27 Jun 2017 20:20:00 GMT):
pwd -> `/Users/jtsiros/dev/go/src/***/rp/user-chaincode/vendor/github.com/google/uuid`

jtsiros (Tue, 27 Jun 2017 20:20:25 GMT):
GOPATH -> `/Users/jtsiros/dev/go`

muralisr (Tue, 27 Jun 2017 20:20:50 GMT):
both above issued in the CLI container ?

jtsiros (Tue, 27 Jun 2017 20:22:30 GMT):
oh sorry, whoops. Here are those values in the container: GOPATH -> `/opt/gopath` and ```

jtsiros (Tue, 27 Jun 2017 20:22:30 GMT):
oh sorry, whoops. Here are those values in the container: GOPATH -> `/opt/gopath` and ``` root@3d0ab2edb9f1:/opt/gopath/src/github.com/google/uuid# ls CONTRIBUTING.md LICENSE dce.go hash.go marshal.go seq_test.go sql_test.go util.go uuid_test.go version4.go CONTRIBUTORS README.md doc.go json_test.go node.go sql.go time.go uuid.go version1.go root@3d0ab2edb9f1:/opt/gopath/src/github.com/google/uuid# pwd /opt/gopath/src/github.com/google/uuid ```

jtsiros (Tue, 27 Jun 2017 20:23:50 GMT):
same exists in vendor folder

jtsiros (Tue, 27 Jun 2017 20:24:13 GMT):
```root@3d0ab2edb9f1:/opt/gopath/src/***/rp/user-chaincode/vendor/github.com/google/uuid# ls CONTRIBUTING.md LICENSE dce.go hash.go node.go time.go uuid.go version4.go CONTRIBUTORS README.md doc.go marshal.go sql.go util.go version1.go```

muralisr (Tue, 27 Jun 2017 20:24:14 GMT):
and I;m guessing the chaincode dir is `/opt/gopath/src/***/rp/user-chaincode`

muralisr (Tue, 27 Jun 2017 20:24:19 GMT):
ok

muralisr (Tue, 27 Jun 2017 20:25:34 GMT):
there was a bug that was fixed recently in this area - I'm trying if it was fixed in beta... almost sure it wasn't. Would you mind trying the latest rc1 builds ?

jtsiros (Tue, 27 Jun 2017 20:26:07 GMT):
sure I'll try that

jtsiros (Tue, 27 Jun 2017 20:27:09 GMT):
ok, i've pulled commit id `d58af569b76df644bd931c846d946435eaafa784` on fabric-examples. That OK?

jtsiros (Tue, 27 Jun 2017 20:27:35 GMT):
that's the latest on the master branch

muralisr (Tue, 27 Jun 2017 20:27:50 GMT):
you need the right fabric/ repo too

jtsiros (Tue, 27 Jun 2017 20:28:42 GMT):
right now the fabric repo only has 1.0.0-beta tagged under the releases section

jtsiros (Tue, 27 Jun 2017 20:29:18 GMT):
ok, i'll check out RC1

muralisr (Tue, 27 Jun 2017 20:29:35 GMT):
yes please

jtsiros (Tue, 27 Jun 2017 21:04:47 GMT):
@muralisr upgrading to fabric 1.0.0-rc1 and commit id `d58af569b76df644bd931c846d946435eaafa784` for fabric-examples seemed to fix the instantiation errors I was getting

muralisr (Tue, 27 Jun 2017 21:05:06 GMT):
very good.. thanks for checking it out !

jrosmith (Wed, 28 Jun 2017 14:48:00 GMT):
hey all, i know we can use `stub.GetCreator()` to get the identity of the user interacting with the chaincode, but how would we go about accessing the attributes they were registered with?

yacovm (Wed, 28 Jun 2017 14:58:15 GMT):
what do you mean attributes?

jrosmith (Wed, 28 Jun 2017 15:01:13 GMT):
@yacovm so when we register users via the ca we have the option to pass attrs, so the registered user looks something like: ``` { enrollmentID: 'User1', role: 'client', attrs: [ { name:'region', value:'US'}, { name:'email', value:'user1@email.com'} ] } ``` if I understand `stub.GetCreator()` properly it means we can identify that the user is `User1`, but can we access those attrs?

yacovm (Wed, 28 Jun 2017 15:02:09 GMT):
do you have a certificate you got from fabric-CA?

yacovm (Wed, 28 Jun 2017 15:02:17 GMT):
if you do then open it with `openssl`

yacovm (Wed, 28 Jun 2017 15:02:29 GMT):
and all you can get from `stub.GetCreator()` is what is in there

jrosmith (Wed, 28 Jun 2017 15:04:09 GMT):
awesome, thank you

andrew.grande (Wed, 28 Jun 2017 18:49:01 GMT):
Has joined the channel.

andrew.grande (Wed, 28 Jun 2017 18:49:54 GMT):
hi gang, i had some basic questions about building/bundling the chaincode project, is this the right place?

JonathanTan (Thu, 29 Jun 2017 09:44:15 GMT):
@andrew.grande building Go files?

smanolache (Thu, 29 Jun 2017 10:21:40 GMT):
hello

lakherapradha (Thu, 29 Jun 2017 11:34:04 GMT):
Has joined the channel.

toddinpal (Thu, 29 Jun 2017 17:52:21 GMT):
Has joined the channel.

toddinpal (Thu, 29 Jun 2017 17:53:52 GMT):
How do you install Go chaincode that requires packages not included in the build container? Do all the packages needed to be included in the source directory?

toddinpal (Thu, 29 Jun 2017 17:58:28 GMT):
For example, let's say my chaincode needs to use mgo

wlahti (Thu, 29 Jun 2017 18:53:25 GMT):
@toddinpal Just make sure you can build the chaincode locally and you should be good to go.

wlahti (Thu, 29 Jun 2017 18:57:56 GMT):
At least that's true for installing via CLI.

wlahti (Thu, 29 Jun 2017 18:57:56 GMT):
At least that's true for installing via CLI. Auto-vendoring of external packages hasn't been implemented yet in the SDKs.

toddinpal (Thu, 29 Jun 2017 21:29:16 GMT):
@wlahti auto-vendoring? Not sure how building locally helps since installing the chaincode causes it to be built in the ccenv container, at least as far as I know

wlahti (Thu, 29 Jun 2017 22:03:43 GMT):
The fabric platform logic (at least for Go) will automatically vendor any external packages it needs, as long as they are available on the system that is performing the install. Have you tried it out locally and seen a problem or are you just wondering if this scenario has been considered?

wlahti (Thu, 29 Jun 2017 22:03:43 GMT):
The fabric platform logic (at least for Go) will automatically vendor any external packages it needs, as long as they are available on the system that is performing the install. Refer to https://jira.hyperledger.org/browse/FAB-2493. Have you tried it out locally and seen a problem or are you just wondering if this scenario has been considered?

toddinpal (Fri, 30 Jun 2017 00:23:09 GMT):
@wlahti Just wondering... haven't tried it yet.

andrew.grande (Fri, 30 Jun 2017 13:24:51 GMT):
@JonathanTan java chaincode. fabric examples basically assemble a zip with the gradle script. is that the official method?

SethiSaab (Fri, 30 Jun 2017 14:39:04 GMT):
Has joined the channel.

SethiSaab (Fri, 30 Jun 2017 14:39:27 GMT):
hi team I am new here May you please help me i am new to development and i have a query . is there any way that we can connect Ledger to Active directory or Database

rfrabasile (Fri, 30 Jun 2017 17:10:34 GMT):
Has joined the channel.

rfrabasile (Fri, 30 Jun 2017 18:56:28 GMT):
Hi. How do I import another deployed chaincode? just import "chaincodename" or I requires a path?

muralisr (Fri, 30 Jun 2017 19:39:14 GMT):
@SethiSaab the ledger in fabric cannot be connected to active directory or database (also you may find more help on the "fabric-ledger" channel for ledger specific questions)

muralisr (Fri, 30 Jun 2017 19:41:56 GMT):
@rfrabasile not sure what you mean by "deployed chaincode" ...there is "install" and "instantiate" in fabric 1.0

rfrabasile (Fri, 30 Jun 2017 19:42:15 GMT):
@muralisr i meant install

muralisr (Fri, 30 Jun 2017 19:43:14 GMT):
o

muralisr (Fri, 30 Jun 2017 19:43:14 GMT):
ok... where you want to import that installed chaincode ?

rfrabasile (Fri, 30 Jun 2017 19:44:09 GMT):
in another installed chaincode

rfrabasile (Fri, 30 Jun 2017 19:47:00 GMT):
in order not to repeat code

muralisr (Fri, 30 Jun 2017 19:48:04 GMT):
ok. So for code reuse.... there's no way to refer to an installed chaincode from another

muralisr (Fri, 30 Jun 2017 19:49:10 GMT):
you can 'call" a chaincode from another chaincode after instantiation but doing that just for code reuse would not be recommended

muralisr (Fri, 30 Jun 2017 19:50:41 GMT):
i'd think of the code as a more development artefact where you can have two chaincodes using common packages

muralisr (Fri, 30 Jun 2017 19:51:51 GMT):
install will package them separately for two chaincodes but there will be shared code in the development space

rfrabasile (Fri, 30 Jun 2017 19:59:30 GMT):
will do, thanks

rfrabasile (Fri, 30 Jun 2017 20:04:25 GMT):
i have another question regarding how to create indexes and use them for rich queries

rfrabasile (Fri, 30 Jun 2017 20:05:21 GMT):
#Insert the object in the DB stub.PutState("name", ObjectInBytes) #etc #for the index indexName := "field1~field2" dataNameIndexKey, err := stub.CreateCompositeKey(indexName, []string{dataFromField1, dataFromField2}) value := []byte{0x00} stub.PutState(dataNameIndexKey, value) I took this from the marbles example, what it does is create another entry in the couchDB that has the name of the fields but does it help in the rich queries or I'm just duplicating data.

rfrabasile (Fri, 30 Jun 2017 20:05:57 GMT):
not duplicating but creating another useless entry

akashmar (Fri, 30 Jun 2017 20:08:39 GMT):
Can anyone help with this error I'm seeing: ``` 2017-06-30 19:51:41.726 UTC [chaincode] processStream -> ERRO 035 Got error: No installed provider supports this key: (null) ```

akashmar (Fri, 30 Jun 2017 20:08:39 GMT):
Can anyone help with this error I'm seeing: ``` 2017-06-30 19:51:41.726 UTC [chaincode] processStream -> ERRO 035 Got error: No installed provider supports this key: (null) 2017-06-30 19:51:41.726 UTC [chaincode] ExecuteChaincode -> ERRO 036 Error executing chaincode: Transaction returned with failure: No installed provider supports this key: (null) 2017-06-30 19:51:41.726 UTC [endorser] simulateProposal -> ERRO 037 failed to invoke chaincode name:"broker" on transaction 0a8b864ba8ccfe65cd30c257db865c23b85114510393912525c48d28e3745fac, error: Error executing chaincode: Transaction returned with failure: No installed provider supports this key: (null) ```

rfrabasile (Fri, 30 Jun 2017 20:12:22 GMT):
maybe you have some stub.PutState(A, B) and passing A as null?

akashmar (Fri, 30 Jun 2017 20:19:04 GMT):
the log comes from the peer, not the chaincode, it never makes it to the chaincode

akashmar (Fri, 30 Jun 2017 20:19:45 GMT):
wait .. never mind there is an error in the chaincode. thanks for making me take another look

rfrabasile (Fri, 30 Jun 2017 20:44:10 GMT):
:thumbsup:

hendry19901990 (Fri, 30 Jun 2017 21:07:47 GMT):
3

ShermanHLee (Fri, 30 Jun 2017 21:20:01 GMT):
Hi I have been trying unit test particular chaincode functions which require me to create a new instance of a struct that belongs to another chaincode using something like ccEx2 := new(ex02.SimpleChaincode) and importing ex02 "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" as shown in the example of chaincode_example05_test.go But when I try to execute the test the error becomes chaincode_example05_test.go:23:2: import "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" is a program, not an importable package Can anyone share some pointers as to where the problem may be?

mastersingh24 (Sat, 01 Jul 2017 12:02:40 GMT):
@ShermanHLee - you can't import a package with a main function into a program. You can only import it into a test program

k0hl1 (Mon, 03 Jul 2017 09:59:45 GMT):
Has joined the channel.

k0hl1 (Mon, 03 Jul 2017 10:04:23 GMT):
Can anyone explain what this commands does "go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim"

k0hl1 (Mon, 03 Jul 2017 10:07:52 GMT):
It gets stuck for me ... any advice ?

k0hl1 (Mon, 03 Jul 2017 10:34:25 GMT):
Apologies, it was not stuck.. it just took a lot of time and did not give any output.

k0hl1 (Mon, 03 Jul 2017 10:46:10 GMT):
While running the command "docker-compose -f docker-compose-simple.yaml up" in chaincode-docker-devmode network , I get the error"

k0hl1 (Mon, 03 Jul 2017 10:46:16 GMT):
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

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

ShermanHLee (Mon, 03 Jul 2017 16:30:49 GMT):
@mastersingh24 I think I see where the problem is Instead of importing main, I import another package that can be shared among all the programs

ShermanHLee (Mon, 03 Jul 2017 16:30:49 GMT):
@mastersingh24 I think I see where the problem is Instead of importing main, I import another package that can be shared among all the programs Thank you!

snorlaxative (Tue, 04 Jul 2017 05:55:50 GMT):
I am unable to understand what composite keys are (like used in the marbles example at line 208){https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/marbles02/marbles_chaincode.go}

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

PushpalathaHiremath (Tue, 04 Jul 2017 07:48:28 GMT):
Hi All, Can anyone suggest me when do we need more than one smart contract? What is the recommended way to architect the smart contracts? We can include all the business logic under only one smart contract. When and why we want to split the logic into more than one smart contract? Can anyone help me understand?

rerngrit (Tue, 04 Jul 2017 10:43:25 GMT):
Has joined the channel.

VamsiKrishnak (Tue, 04 Jul 2017 12:26:04 GMT):
Has joined the channel.

mrobinson (Tue, 04 Jul 2017 12:37:39 GMT):
Has joined the channel.

VamsiKrishnak (Tue, 04 Jul 2017 12:38:23 GMT):
@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

VamsiKrishnak (Tue, 04 Jul 2017 12:38:23 GMT):
@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

arner (Tue, 04 Jul 2017 15:18:04 GMT):
Hi @VamsiKrishnak, what is the command you're running? It seems like you're setting a `-p` while it should be `-P` for the policy?

VamsiKrishnak (Tue, 04 Jul 2017 15:20:47 GMT):
@arner when iam trying with -P its showing,another error stating:

arner (Tue, 04 Jul 2017 15:24:04 GMT):
I have another interesting challenge; compiled chaincode is not the same on one of my peers. It actually compiles to a different binary with a different size and hash... Any input is appreciated. https://stackoverflow.com/questions/44909489/chaincode-fingerprint-does-not-match-when-querying-from-other-peer

VamsiKrishnak (Tue, 04 Jul 2017 15:24:56 GMT):
@arner thank you ,but i tried with -P and im getting error: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 20:53:36.483 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 20:53:36.484 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 20:53:36.509 IST [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-04 20:53:36.510 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

arner (Tue, 04 Jul 2017 15:28:41 GMT):
@VamsiKrishnak oh sorry, for the chaincode path you need the lowercase p indeed. Is this the beta version?

VamsiKrishnak (Tue, 04 Jul 2017 15:32:40 GMT):
@arner yes iam using beta version

arner (Tue, 04 Jul 2017 15:34:40 GMT):
@VamsiKrishnak interesting, I get this: ``` peer: Version: 1.0.0-beta Go version: go1.7.5 OS/Arch: linux/amd64 Chaincode: Base Image Version: 0.3.1 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namepace: hyperledger root@55754fdd3b31:/fabric# peer chaincode instantiate [...] Usage: peer chaincode instantiate [flags] Flags: -h, --help help for instantiate Global Flags: --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint -C, --chainID string The chain 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") --logging-level string Default logging level and overrides, see core.yaml for full syntax -n, --name string Name of the chaincode -o, --orderer string Ordering service endpoint -p, --path string Path to chaincode -P, --policy string The endorsement policy associated to this chaincode --test.coverprofile string Done (default "coverage.cov") -t, --tid string Name of a custom ID generation algorithm (hashing and decoding) e.g. sha256base64 --tls Use TLS when communicating with the orderer endpoint -u, --username string Username for chaincode operations when security is enabled -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 ``` Note the -p...

rmohta (Tue, 04 Jul 2017 16:47:34 GMT):
So, if I'd like to limit the use of a chaincode function only for certain MSP's - how can I achieve that? Should I split the chaincode into multiple parts, even though they are working on the same asset? Or should I use identity data available in stub and validate the user before I let it perform that operation? (NOTE: I cannot use fabric-composer now)

nhrishi (Tue, 04 Jul 2017 18:16:26 GMT):
Hi, Quick question. If I install and instantiate a chaincode on 4 peers (2 for Org A and 2 for Org B), 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?

mastersingh24 (Tue, 04 Jul 2017 19:56:30 GMT):
[You can't split the chaincode into multiple chaincodes since as each chaincode has its own namespace so the best option would be to extract identity info within your chaincode function(s). You can get the identity of the client who submitted the transaction using the GetCreator() method on the stub](https://chat.hyperledger.org/channel/chaincode-dev?msg=4EutJppLGyTTTTJ68) @rmohta

mastersingh24 (Tue, 04 Jul 2017 19:56:30 GMT):
You can't split the chaincode into multiple chaincodes since as each chaincode has its own namespace so the best option would be to extract identity info within your chaincode function(s). You can get the identity of the client who submitted the transaction using the GetCreator() method on the stub (https://chat.hyperledger.org/channel/chaincode-dev?msg=4EutJppLGyTTTTJ68) @rmohta

muralisr (Tue, 04 Jul 2017 23:14:30 GMT):
@nhrishi given OrgA and OrgB are in the channel (a hidden assumption in the question) all peers in the channel will get updated on successful proposal followed by a successful commit on the peers. Which orgs you send the proposal too depends on the endorsement policy applied at commit time

muralisr (Tue, 04 Jul 2017 23:14:30 GMT):
@nhrishi given both OrgA and OrgB are in the channel (a hidden assumption in the question) all peers in the channel will get updated on successful proposal followed by a successful commit on the peers. Which orgs you send the proposal too depends on the endorsement policy applied at commit time

nhrishi (Wed, 05 Jul 2017 02:41:13 GMT):
@muralisr Thanks much! makes sense.

snorlaxative (Wed, 05 Jul 2017 04:52:03 GMT):
Hi! The GetHistoryForKey function outputs in the HistoryQueryIteratorInterface. What format is that? I was unable to find any documentation on this.

snorlaxative (Wed, 05 Jul 2017 04:52:03 GMT):
Hi! The GetHistoryForKey function outputs in the HistoryQueryIteratorInterface. What format is this? I was unable to find any documentation on this.

jaswanth (Wed, 05 Jul 2017 05:35:44 GMT):
Hi All, we pass [ ]strings as args to the chaincode . can we pass a image or a blob object to the chaincode ? . I wanted to store an image into my couchdb database ,can anyone suggest a best way for that

snorlaxative (Wed, 05 Jul 2017 06:40:24 GMT):
@jaswanth , you might find this article helpful https://belltane.wordpress.com/2017/03/27/storing-images-in-hyperledger-fabric-blockchain/

moulali308 (Wed, 05 Jul 2017 09:24:54 GMT):
Has joined the channel.

rajasekharpippalla (Wed, 05 Jul 2017 09:50:13 GMT):
Has joined the channel.

rajasekharpippalla (Wed, 05 Jul 2017 09:57:57 GMT):
I have done local block chain setup with single peer and run sample chain code by using the guidelines which are provided by IBM bluemix hyperledger fabric... now I want to create 4 peers and do some transactions between 4 peers and observe how distributed ledger is maintaining b/w peers. Can any one please help me ,how i can do this

moulali308 (Wed, 05 Jul 2017 10:00:07 GMT):
Hi rajasekharpippalla, I too have the same doubt

mavericklam (Wed, 05 Jul 2017 10:07:21 GMT):
Has joined the channel.

mastersingh24 (Wed, 05 Jul 2017 10:11:35 GMT):
@mavericklam - the issue is that you don't give an absolute path to the chaincode with the *-p* option (https://chat.hyperledger.org/channel/general?msg=sBMPy76SP7HkzNM76)

mastersingh24 (Wed, 05 Jul 2017 10:11:35 GMT):
@mavericklam - The issue is that you don't give an absolute path to the chaincode with the *-p* option. With *-p* you are actually specifying the Go package name and the package should be under $GOPATH/src (https://chat.hyperledger.org/channel/general?msg=sBMPy76SP7HkzNM76)

mastersingh24 (Wed, 05 Jul 2017 10:11:35 GMT):
@mavericklam - The issue is that you don't give an absolute path to the chaincode with the *-p* option. With *-p* you are actually specifying the Go package name and the package should be under $GOPATH/src. So in your case, you want: `-p github.com/hyperledger/fabric/peer/chaincode123/chaincode_example02` (https://chat.hyperledger.org/channel/general?msg=sBMPy76SP7HkzNM76)

mastersingh24 (Wed, 05 Jul 2017 10:11:35 GMT):
@mavericklam - The issue is that the *-p* option is not for an absolute path. With *-p* you are actually specifying the Go package name and the package should be under $GOPATH/src. So in your case, you want: `-p github.com/hyperledger/fabric/peer/chaincode123/chaincode_example02` (https://chat.hyperledger.org/channel/general?msg=sBMPy76SP7HkzNM76)

mavericklam (Wed, 05 Jul 2017 10:13:31 GMT):
@mastersingh24 thanks. But seems like when I have the absolute path it still failed. "peer chaincode install -n 123 -p $PWD/chaincode123/chaincode_example02" -v 0.1

mastersingh24 (Wed, 05 Jul 2017 10:14:35 GMT):
Edited my answer

mavericklam (Wed, 05 Jul 2017 10:14:36 GMT):
where my pwd is /opt/gopath/src/github.com/hyperledger/fabric/peer/

mastersingh24 (Wed, 05 Jul 2017 10:14:48 GMT):
You want `-p github.com/hyperledger/fabric/peer/chaincode123/chaincode_example02`

mastersingh24 (Wed, 05 Jul 2017 10:15:13 GMT):
Assuming that your chaincode is actually under `$GOPATH/src/github.com/hyperledger/fabric/peer/chaincode123/chaincode_example02`

mastersingh24 (Wed, 05 Jul 2017 10:15:37 GMT):
`-p` is used to specify the Go package not the absolute file path

mavericklam (Wed, 05 Jul 2017 10:16:27 GMT):
Oic, very thanks @mastersingh24

snorlaxative (Wed, 05 Jul 2017 10:24:04 GMT):
@mastersingh24 Hi! The GetHistoryForKey function outputs in the HistoryQueryIteratorInterface. What format is this? I was unable to find any documentation on this.

mastersingh24 (Wed, 05 Jul 2017 10:46:21 GMT):
@snorlaxative - https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#HistoryQueryIteratorInterface https://godoc.org/github.com/hyperledger/fabric/protos/ledger/queryresult#KeyModification So you can do something like this: ``` queryResults, err := stub.GetHistoryForKey("mykey") for queryResults.HasNext() { queryResult, err := queryResults.Next() value := queryResult.GetValue() } ``` (of course you'd add code to handle err)

snorlaxative (Wed, 05 Jul 2017 10:48:34 GMT):
@mastersingh24 Thank you so much, looking in the documentation right now. The implementation in marbles.go really confused me considering I am new to programming.

mastersingh24 (Wed, 05 Jul 2017 10:49:33 GMT):
No worries - it's not obvious

mastersingh24 (Wed, 05 Jul 2017 10:50:21 GMT):
The good news is once you get the hang of it, it's not too bad. And Go is actually a pretty easy language to get started with

snorlaxative (Wed, 05 Jul 2017 10:52:14 GMT):
@mastersingh24 ...yeah, it feels better and easier to use(go) as u understand it part by part...i guess will have to continue in baby steps...thanks again

mastersingh24 (Wed, 05 Jul 2017 10:58:00 GMT):
any time

paul.sitoh (Wed, 05 Jul 2017 12:58:38 GMT):
Has joined the channel.

snorlaxative (Wed, 05 Jul 2017 13:18:33 GMT):
Please correct me if I am wrong. If PutState writes a key with its value (in JSON format, made from a structure), then when using GetState, the output would also be in json format and we would need to unmarshal it and to access the attributes saved in the structure, we would use Struct_name.Attribute_name.

durantto (Thu, 06 Jul 2017 00:12:36 GMT):
Doing this: http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html Can someone explain what this `(t *SimpleAsset)` is? I am new to Go, and what is more, is the concept of pointers is new to me. I think that `(t *SimpleAsset)` is a pointer receiver to this: ``` // SimpleAsset implements a simple chaincode to manage an asset type SimpleAsset struct { } ```

mavericklam (Thu, 06 Jul 2017 08:59:51 GMT):
hey all, I have an error and dont know how to solve it when I instantiate the chaincode with this "Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid" Could someone help me on this ?

mavericklam (Thu, 06 Jul 2017 09:29:16 GMT):
"peer0.test.xxx.com | 2017-07-06 09:19:49.983 UTC [couchdb] handleRequest -> DEBU 5e1 Entering handleRequest() method=GET url=http://couchdb0.test.xxx.com:5984/channel1/lscc%00id1?attachments=true peer0.test.xxx.com | 2017-07-06 09:19:49.984 UTC [couchdb] handleRequest -> DEBU 5e2 HTTP Request: GET /channel1/lscc%00id1?attachments=true HTTP/1.1 | Host: couchdb0.test.xxx.com:5984 | User-Agent: Go-http-client/1.1 | Accept: multipart/related | Accept-Encoding: gzip | | "

mavericklam (Thu, 06 Jul 2017 09:29:25 GMT):
more info about the error

mavericklam (Thu, 06 Jul 2017 09:29:53 GMT):
peer0.test.xxx.com | 2017-07-06 09:19:49.985 UTC [couchdb] handleRequest -> DEBU 5e3 Couch DB Error:not_found, Status Code:404, Reason:missing

mavericklam (Thu, 06 Jul 2017 09:32:01 GMT):
seems like it is related to couchDB, I got this response from the http client with link http://couchdb0.test.xxx.com:5984/channel1/lscc%00id1?attachments=true {"error":"not_found","reason":"missing"}

nhrishi (Thu, 06 Jul 2017 09:37:47 GMT):
@mavericklam which version are you on? I'm also getting error while instantiating the chaincode but error is "- [endorser] ProcessProposal -> ERRO 678 simulateProposal() resulted in chaincode response status 500 for txid:"

mavericklam (Thu, 06 Jul 2017 09:44:46 GMT):
@nhrishi you mean fabric? v1.0

nhrishi (Thu, 06 Jul 2017 09:45:14 GMT):
yes

nhrishi (Thu, 06 Jul 2017 09:45:30 GMT):
are you using v1.0 beta or rc1?

mavericklam (Thu, 06 Jul 2017 09:46:04 GMT):
beta

mavericklam (Thu, 06 Jul 2017 09:46:41 GMT):
is there any hint :joy:[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=gA6G6W4DB7iu7brPM) @mavericklam

mavericklam (Thu, 06 Jul 2017 09:57:13 GMT):
2017-07-06 09:36:17.138 UTC [couchdb] handleRequest -> WARN 017 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb0.test.xxx.com:5984/: dial tcp: lookup ccouchdb0.test.xxx.com:5984 on 127.0.0.11:53: no such host

nhrishi (Thu, 06 Jul 2017 10:12:12 GMT):
Did you check your config/peer names are correct in docker-compose-couchdb.yaml

mavericklam (Thu, 06 Jul 2017 10:22:34 GMT):
yes, it is I think[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=vCELHe8vMmguFiLuP) @nhrishi

VamsiKrishnak (Thu, 06 Jul 2017 13:28:41 GMT):
I am using http://hyperledger-fabric-doc.readthedocs.io/en/latest/getting_started.html for Hyperledger Fabric setup in Ubuntu VM. Asper tutorial two organisation with two peers have been created. I wanted to add new organization or new peer in already existing Organisation dynamically. Kindly help me know the steps to add dynamically

FollowingGhosts (Thu, 06 Jul 2017 13:42:53 GMT):
Has joined the channel.

FollowingGhosts (Thu, 06 Jul 2017 14:14:03 GMT):
can chaincode invoke a method on another chaincode?

mavericklam (Thu, 06 Jul 2017 14:19:17 GMT):
2017-07-06 14:14:03.575 UTC [dockercontroller] createContainer -> DEBU 4e2 Create container: dev-peer0.test.xxx.com-mycc-0.1 2017-07-06 14:14:03.577 UTC [dockercontroller] Start -> DEBU 4e3 start-could not find image ...attempt to recreate image no such image 2017-07-06 14:14:03.579 UTC [chaincode-platform] generateDockerfile -> DEBU 4e4 FROM hyperledger/fabric-baseos:x86_64-0.3.1 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="mycc" \ org.hyperledger.fabric.chaincode.id.version="0.1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.0-beta" \ org.hyperledger.fabric.base.version="0.3.1" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.0-beta ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt COPY peer.crt /etc/hyperledger/fabric/peer.crt 2017-07-06 14:14:03.581 UTC [chaincode-platform] func1 -> ERRO 4e5 Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid 2017-07-06 14:14:03.583 UTC [dockercontroller] deployImage -> ERRO 4e6 Error building images: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid 2017-07-06 14:14:03.583 UTC [dockercontroller] deployImage -> ERRO 4e7 Image Output: ******************** ******************** 2017-07-06 14:14:03.583 UTC [container] unlockContainer -> DEBU 4e8 container lock deleted(dev-peer0.test.xxx.com-mycc-0.1) 2017-07-06 14:14:03.583 UTC [chaincode] Launch -> ERRO 4e9 launchAndWaitForRegister failed Error starting container: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid 2017-07-06 14:14:03.583 UTC [endorser] callChaincode -> DEBU 4ea Exit 2017-07-06 14:14:03.583 UTC [endorser] simulateProposal -> ERRO 4eb failed to invoke chaincode name:"lscc" on transaction 301709e8ef58c5084304f3bd40314c38d733066a4723c9e0630444d604521c57, error: Error starting container: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid

mavericklam (Thu, 06 Jul 2017 14:19:54 GMT):
this is the eeror I got when instantiate the chaincode, I have no idea what's going wrong. Someone has any idea?

jrosmith (Thu, 06 Jul 2017 14:47:33 GMT):
@mavericklam the path the chaincode is wrong ```2017-07-06 14:14:03.583 UTC [dockercontroller] deployImage -> ERRO 4e6 Error building images: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid```

jrosmith (Thu, 06 Jul 2017 14:47:33 GMT):
@mavericklam the path to the chaincode is wrong ```2017-07-06 14:14:03.583 UTC [dockercontroller] deployImage -> ERRO 4e6 Error building images: Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid```

mavericklam (Thu, 06 Jul 2017 14:50:29 GMT):
thx! but I have all the chaincode installed without error [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DfeBkGW7eQ8Q5gMsn) @jrosmith

Asara (Thu, 06 Jul 2017 14:52:32 GMT):
Has joined the channel.

ssaddem (Thu, 06 Jul 2017 14:55:30 GMT):
in chaincode can i retrive the role of user from certificate (if he can invoke this request or not by his role ?)

jrosmith (Thu, 06 Jul 2017 18:22:14 GMT):
+1 for @ssaddem, we can access the the name of the user by parsing the certificate from `GetCreator`, but how do we access the roles the user was registered with?

swangbj (Fri, 07 Jul 2017 08:16:13 GMT):
Anybody have tried peer chaincode package ?

mastersingh24 (Fri, 07 Jul 2017 08:28:52 GMT):
@swangbj - Are you having an issue? It has been used by many folks - although more often people use `peer chaincode install -p ...` which does the packaging under the covers as well

swangbj (Fri, 07 Jul 2017 08:35:36 GMT):
yeah , I just don't know how to install a chaincode after packaged

swangbj (Fri, 07 Jul 2017 08:48:29 GMT):
@mastersingh24

mastersingh24 (Fri, 07 Jul 2017 08:50:22 GMT):
Hi @swangbj - `peer chaincode install -n mycc -v 1.0 ccpack.out`

mastersingh24 (Fri, 07 Jul 2017 08:50:42 GMT):
You can of course replace mycc and 1.0 with your own name and version

swangbj (Fri, 07 Jul 2017 08:52:27 GMT):
@mastersingh24 thx , I have tried that ,but got error msg

swangbj (Fri, 07 Jul 2017 08:52:43 GMT):

Message Attachments

mastersingh24 (Fri, 07 Jul 2017 08:53:17 GMT):
You may also need to set the following environment variables as well: CORE_PEER_ADDRESS CORE_PEER_LOCALMSPID CORE_PEER_MSPCONFIGPATH similar to https://github.com/hyperledger/fabric-samples/blob/master/first-network/scripts/script.sh#L34

mastersingh24 (Fri, 07 Jul 2017 08:55:39 GMT):
The other option is to just do everything via the install command and skip the package command

swangbj (Fri, 07 Jul 2017 08:55:56 GMT):

Message Attachments

swangbj (Fri, 07 Jul 2017 08:56:28 GMT):

Message Attachments

swangbj (Fri, 07 Jul 2017 08:57:55 GMT):
@mastersingh24 Hi, I have set some envs .

mastersingh24 (Fri, 07 Jul 2017 08:59:40 GMT):
OK - gimme a few minutes - let me try to run locally

swangbj (Fri, 07 Jul 2017 09:00:16 GMT):
THX! I am using e2e to set up my network

mastersingh24 (Fri, 07 Jul 2017 09:01:14 GMT):
Are you using the e2e in the fabric repo or are you using https://github.com/hyperledger/fabric-samples/tree/master/first-network ?

mastersingh24 (Fri, 07 Jul 2017 09:01:28 GMT):
I'd recommend the second option, but I don't think that's the issue

swangbj (Fri, 07 Jul 2017 09:01:54 GMT):
No , I am using e2e in fabric repo

swangbj (Fri, 07 Jul 2017 09:05:22 GMT):
@mastersingh24 using docker-compose-cli.yaml

paul.sitoh (Fri, 07 Jul 2017 09:10:14 GMT):
Anyone know if there is a Peer or chaincode mocking Docker image exist?

paul.sitoh (Fri, 07 Jul 2017 09:10:14 GMT):
Anyone know if there is a mock Peer or chaincode Docker image?

paul.sitoh (Fri, 07 Jul 2017 09:10:14 GMT):
Anyone know if there is a mock Peer or chaincode Docker image? Or A docker image with mocking shim that we can run chaincode in mocking mode?

swangbj (Fri, 07 Jul 2017 09:19:32 GMT):
hi @mastersingh24 I have tried in fabric-samples/first-network , but got the same error

swangbj (Fri, 07 Jul 2017 09:20:23 GMT):
CORE_PEER_ADDRESS=peer0.org1.example.com:7051 peer chaincode package -n myccpolicy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 1.0 -s -S -i "AND('Org1MSP.admin')" ccpack.out

swangbj (Fri, 07 Jul 2017 09:20:48 GMT):
CORE_PEER_LOCALMSPID="Org1MSP" 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 CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp CORE_PEER_ADDRESS=peer0.org1.example.com:7051 peer chaincode install -n myccpolicy -v 1.0 ccpack.out

swangbj (Fri, 07 Jul 2017 09:21:09 GMT):
my commands to install myccpolicy chaincode

swangbj (Mon, 10 Jul 2017 06:23:58 GMT):
Hi @mastersingh24 ! Have you figured out how to do this ?

swangbj (Mon, 10 Jul 2017 06:24:17 GMT):
About peer chaincode package

luckydogchina (Mon, 10 Jul 2017 07:52:24 GMT):

Message Attachments

luckydogchina (Mon, 10 Jul 2017 07:52:24 GMT):

Message Attachments

sajeevkhan (Mon, 10 Jul 2017 10:57:44 GMT):
Has joined the channel.

sajeevkhan (Mon, 10 Jul 2017 10:58:43 GMT):
Hi, I am trying to install a chaincode on a peer using the following command: peer chaincode install -n mycc_sacc -v 1.0 -p chaincode/go/sacc

sajeevkhan (Mon, 10 Jul 2017 10:59:20 GMT):
On doing so, I get the following error : Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: Error installing chaincode code mycc_sacc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc_sacc.1.0 exists))

sajeevkhan (Mon, 10 Jul 2017 10:59:45 GMT):
Please can you let me know what exactly is the rpc error

swangbj (Mon, 10 Jul 2017 11:32:50 GMT):
@sajeevkhan This error means you have installed mycc_sacc before

swangbj (Mon, 10 Jul 2017 11:33:05 GMT):
try another chaincode name

yury (Mon, 10 Jul 2017 12:48:20 GMT):
I have the problem >> [orderer/common/broadcast] Handle -> WARN 009 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

yury (Mon, 10 Jul 2017 12:48:50 GMT):
Can somebody help me?

camillemarini (Mon, 10 Jul 2017 13:39:37 GMT):
Has joined the channel.

Asara (Mon, 10 Jul 2017 14:04:31 GMT):
Has left the channel.

jmcnevin (Mon, 10 Jul 2017 16:43:25 GMT):
It's a little unclear from the documentation, but can you provide a SCDS package to the `peer install` command?

jmcnevin (Mon, 10 Jul 2017 16:51:28 GMT):
also, it it possible to see who has signed off on a SCDS with the peer CLI?

kustrun (Mon, 10 Jul 2017 19:00:52 GMT):
Has joined the channel.

nhrishi (Mon, 10 Jul 2017 20:08:50 GMT):
Hi, I'm getting below error while installing chaincode - can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH)

nhrishi (Mon, 10 Jul 2017 20:09:23 GMT):
Can I get a quick help on this

Tigermisu (Mon, 10 Jul 2017 21:07:31 GMT):
Has joined the channel.

Tigermisu (Mon, 10 Jul 2017 21:08:30 GMT):
Simple question: Can I access any sort of ID of the peer running a chaincode within the chaincode? something like `myPeer := peer.name`?

SanthoshKumarMK (Tue, 11 Jul 2017 06:52:39 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.

mavericklam (Tue, 11 Jul 2017 08:04:56 GMT):
hi all, may I know if I try to query the state db which is using couchDB in my case, when I run a stub.getQueryResult(query), always showing 1 result, is there any hint?

ssaddem (Tue, 11 Jul 2017 08:17:22 GMT):
hi all, any one know how to get attribute user in certificate from chaincode

VamsiKrishnak (Tue, 11 Jul 2017 10:20:15 GMT):
hello, As I am following this link "http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html" for chaincode and at last it mentioned that we can test our own chaincode by adding that to chaincode sub directory, could any one help me how to add new chaincode to that chaincode directory which can be accessible from chaincode container.

VamsiKrishnak (Tue, 11 Jul 2017 10:20:15 GMT):
@swangbj hello, As I am following this link "http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html" for chaincode and at last it mentioned that we can test our own chaincode by adding that to chaincode sub directory, could any one help me how to add new chaincode to that chaincode directory which can be accessible from chaincode container.

simoneromani (Tue, 11 Jul 2017 11:46:15 GMT):
Has joined the channel.

ssaddem (Tue, 11 Jul 2017 13:54:56 GMT):
hi all, any one know how to get attribute user in certificate from chaincode

jrosmith (Tue, 11 Jul 2017 14:57:47 GMT):
+1 for @ssaddem again. In 0.6.5 we could do `stub.ReadCertAttribute("role")` and get the roles the registered was registered with. In 1.0.0 we can do `stub.GetCreator()` but that cert only includes the name of the person, not the roles. Do we have a way of achieving the same functionality of `stub.ReadCertAttribute` in 1.0.0?

ssaddem (Tue, 11 Jul 2017 16:03:11 GMT):
That's what i looking for and i don't know i just read your question above and we have the same need [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8wAC7afhotSRwZfzG) @jrosmith

ssaddem (Tue, 11 Jul 2017 16:03:11 GMT):
That's what i looking for and i don't know how made it. I just read your question above and we have the same need [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8wAC7afhotSRwZfzG) @jrosmith

nhrishi (Tue, 11 Jul 2017 20:14:57 GMT):
Did anyone try invoking one chaincode from another chaincode recently.

luckydogchina (Wed, 12 Jul 2017 01:39:08 GMT):
Hi everyone! Can we import third party libraries into application chaincodes, for example `protobuf`? if it is ok, how to import the third libraries ?

luckydogchina (Wed, 12 Jul 2017 01:39:08 GMT):
Hi everyone! Can we import third party libraries into application chaincodes, for example `protobuf`? if it is ok, how to import the third libraries ? I import the `github.com\golang\protobuf\proto` into my chaincode, but the error is exported that `can not find the package in any path`

luckydogchina (Wed, 12 Jul 2017 01:39:08 GMT):
Hi everyone! Can we import third party libraries into application chaincodes, for example `protobuf`? if it is ok, how to import the third libraries ? I import the `github.com\golang\protobuf\proto` into my chaincode, but the error is exported that `can not find the package in any path` , when I instantiating the chaincode

luckydogchina (Wed, 12 Jul 2017 01:39:08 GMT):
Hi everyone! Can we import third party libraries into application chaincodes, for example `protobuf`? if it is ok, how to import the third libraries ? I import the `github.com\golang\protobuf\proto` into my chaincode, but the error is exported that `can not find the package in any path` , when I instantiat the chaincode

luckydogchina (Wed, 12 Jul 2017 01:39:08 GMT):
Hi everyone! Can we import third party libraries into application chaincodes, for example `protobuf`? if it is ok, how to import the third libraries ? I import the `github.com\golang\protobuf\proto` into my chaincode, but the error is exported that `can not find the package in any path` , when I instantiate the chaincode

JarvisJang (Wed, 12 Jul 2017 02:27:43 GMT):
Has joined the channel.

JarvisJang (Wed, 12 Jul 2017 02:28:01 GMT):
hello, can I call the 'Init' function one more times?

luckydogchina (Wed, 12 Jul 2017 03:19:30 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=d7SrPT9vtLPJ6t4tS) @JarvisJang the `init` function is used during instantiating chaincode, so I think that it can not be called one more times.

JarvisJang (Wed, 12 Jul 2017 04:10:14 GMT):
@luckydogchina Thank you!!

nhrishi (Wed, 12 Jul 2017 05:03:21 GMT):
Hi, Can someone pls help on this error while installing the chaincode. `2017-07-12 04:54:25.492 UTC [golang-platform] func1 -> DEBU 00a Discarding GOROOT package errors 2017-07-12 04:54:25.492 UTC [golang-platform] func1 -> DEBU 00b Discarding GOROOT package fmt 2017-07-12 04:54:25.492 UTC [golang-platform] func1 -> DEBU 00c Accepting import: github.com/hyperledger/fabric/common/util 2017-07-12 04:54:25.492 UTC [golang-platform] func1 -> DEBU 00d Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-12 04:54:25.492 UTC [golang-platform] func1 -> DEBU 00e Discarding provided package github.com/hyperledger/fabric/protos/peer Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/common/util: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH) Usage: peer chaincode install [flags] `

ssaddem (Wed, 12 Jul 2017 07:59:56 GMT):
hi all, any one know how to get attribute user in certificate from chaincode

svasilyev (Wed, 12 Jul 2017 09:46:57 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tDwbus6kmGuf4SJs7) @luckydogchina [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DktivRomMHnZBQNEj) @nhrishi

svasilyev (Wed, 12 Jul 2017 09:46:57 GMT):
This may slightly depend on the Fabric version, but in general you should either make sure that all the dependencies are present on GOPATH of the machine calling install (if using CLI) or properly vendor all the depednecies (may be excluding shim), e.g. using govendor. [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tDwbus6kmGuf4SJs7) @luckydogchina [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DktivRomMHnZBQNEj) @nhrishi

svasilyev (Wed, 12 Jul 2017 09:46:57 GMT):
This may slightly depend on the Fabric version, but in general you should either make sure that all the dependencies are present on GOPATH of the machine calling install (if using CLI), or properly vendor all the depednecies (may be excluding shim), e.g. using govendor. [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tDwbus6kmGuf4SJs7) @luckydogchina [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=DktivRomMHnZBQNEj) @nhrishi

ssaddem (Wed, 12 Jul 2017 13:31:38 GMT):
hi all, any one know how to get attribute user in certificate from cha

Tigermisu (Wed, 12 Jul 2017 18:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=d7SrPT9vtLPJ6t4tS) @JarvisJang You could put it in the if-else chain of invoke() and call it if invoked

Tigermisu (Wed, 12 Jul 2017 18:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=d7SrPT9vtLPJ6t4tS) @JarvisJang You could put it in the if-else chain of invoke() and call it if invoked (Might have to do some magic with the parameters, or move the specific code you want to repeat to a separate function that is called from both init() and invoke()

Tigermisu (Wed, 12 Jul 2017 18:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=d7SrPT9vtLPJ6t4tS) @JarvisJang You could put it in the if-else chain of invoke() and call it if invoked (Might have to do some magic with the parameters, or move the specific code you want to repeat to a separate function that is called from both init() and invoke() )

nhrishi (Wed, 12 Jul 2017 19:24:20 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=MgraKxWxZWBBRuXs9) @svasilyev Thanks much. This is helpful. I assumed all dependencies would be taken care of. Will check this out.

durantto (Wed, 12 Jul 2017 19:33:30 GMT):
working with RC1 in an environment similar to what is described here. https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html Question: If I make a change to the code, what is the fastest way to re-deploy the chaincode to re-test? Do I have to bring down the network, start up the chaincode again, install, instantiate, and invoke? or is there a better way?

ssaddem (Thu, 13 Jul 2017 07:55:34 GMT):
hi all, any one know how to get attribute user in certificate from chaincode

yacovm (Thu, 13 Jul 2017 08:00:31 GMT):
@ssaddem what does attribute user mean?

ssaddem (Thu, 13 Jul 2017 08:05:05 GMT):
You have already asked this question and i can't find attributes in the certificate with x509 lib https://chat.hyperledger.org/channel/chaincode-dev?msg=y9ibyXEFyb757Mep6 https://chat.hyperledger.org/channel/chaincode-dev?msg=kj6k9xqPfnJ2aRNk2 https://chat.hyperledger.org/channel/chaincode-dev?msg=d3qsinzbQo4pRACjX https://chat.hyperledger.org/channel/chaincode-dev?msg=K9PWcBofujkM7H8Fs https://chat.hyperledger.org/channel/chaincode-dev?msg=aAq3KmTcdWu4HEWrF

ssaddem (Thu, 13 Jul 2017 08:05:05 GMT):
@yacovm You have already asked this question and i can't find attributes in the certificate with x509 lib https://chat.hyperledger.org/channel/chaincode-dev?msg=y9ibyXEFyb757Mep6 https://chat.hyperledger.org/channel/chaincode-dev?msg=kj6k9xqPfnJ2aRNk2 https://chat.hyperledger.org/channel/chaincode-dev?msg=d3qsinzbQo4pRACjX https://chat.hyperledger.org/channel/chaincode-dev?msg=K9PWcBofujkM7H8Fs https://chat.hyperledger.org/channel/chaincode-dev?msg=aAq3KmTcdWu4HEWrF

ssaddem (Thu, 13 Jul 2017 08:05:05 GMT):
@yacovm You have already asked this question and i can't find attributes in the certificate with x509 lib https://chat.hyperledger.org/channel/chaincode-dev?msg=y9ibyXEFyb757Mep6 https://chat.hyperledger.org/channel/chaincode-dev?msg=kj6k9xqPfnJ2aRNk2 https://chat.hyperledger.org/channel/chaincode-dev?msg=d3qsinzbQo4pRACjX https://chat.hyperledger.org/channel/chaincode-dev?msg=K9PWcBofujkM7H8Fs https://chat.hyperledger.org/channel/chaincode-dev?msg=J4ZzMgT5kZ22saJGi https://chat.hyperledger.org/channel/chaincode-dev?msg=aaE6W8bnbam4Knm3o https://chat.hyperledger.org/channel/chaincode-dev?msg=aAq3KmTcdWu4HEWrF

yacovm (Thu, 13 Jul 2017 08:10:46 GMT):
I see

ssaddem (Thu, 13 Jul 2017 08:14:39 GMT):
i suppose that fabric-ca doesn't include attributes like membersrvc in cert sent to the peers anymore

mariogemoll (Thu, 13 Jul 2017 14:00:13 GMT):
Hello, is there a way to include resource files (like a JSON textfile containing a JSON schema) in a chaincode (package)?

jrosmith (Thu, 13 Jul 2017 14:49:55 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8wAC7afhotSRwZfzG) @yacovm this is probably a better explanation of what we're looking for

ssaddem (Thu, 13 Jul 2017 15:38:42 GMT):
@jrosmith https://chat.hyperledger.org/channel/fabric-ca?msg=qoL5RNkZKSSgojxc7

jrosmith (Thu, 13 Jul 2017 15:39:16 GMT):
@ssaddem awesome to hear, thank you!

ssaddem (Thu, 13 Jul 2017 15:39:46 GMT):
welcome

ssaddem (Thu, 13 Jul 2017 15:56:47 GMT):
guys it's possible to use map reduce (view) with couchdb ?

ssaddem (Thu, 13 Jul 2017 15:56:47 GMT):
guys i have two question. 1 - is it possible to use map reduce (view) with couchdb ? 2 - can i encrypt data and restrict access to couchdb so that it's only possible to access it from my chaincode ?

ssaddem (Thu, 13 Jul 2017 15:56:47 GMT):
guys i have two question. 1 - is it possible to use MapReduce (view) with couchdb ? 2 - can i encrypt data and restrict access to couchdb so that it's only possible to access it from my chaincode ?

yacovm (Thu, 13 Jul 2017 16:56:16 GMT):
So you have the transient field in the proposal which isn't sent into the orderer

yacovm (Thu, 13 Jul 2017 16:56:26 GMT):
you can send in that transient field an encryption key

yacovm (Thu, 13 Jul 2017 16:56:32 GMT):
(for example)

kletkeman (Thu, 13 Jul 2017 20:48:54 GMT):
@mariogemoll My IoT Contract Platform uses a JSON Schema 4.0 schema for the payloads and includes it in the contract by processing it into a string in a golang file. You can do this by calling a processor from a "go generate" comment. See the main file in my container sample (note -- not yet formally ported to v1 fabrics) : https://github.com/ibm-watson-iot/blockchain-samples/tree/master/contracts/platform/iotcontractcontainersample

reoim (Fri, 14 Jul 2017 09:00:08 GMT):
Has joined the channel.

IvanPopkov (Fri, 14 Jul 2017 10:22:00 GMT):
Has joined the channel.

ssaddem (Fri, 14 Jul 2017 15:02:24 GMT):
@yacovm on what used transient and how can i set him ?

yacovm (Fri, 14 Jul 2017 15:02:37 GMT):
her

yacovm (Fri, 14 Jul 2017 15:03:06 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L177

yacovm (Fri, 14 Jul 2017 15:03:16 GMT):
this is where you get it from

yacovm (Fri, 14 Jul 2017 15:03:24 GMT):
regarding how to set - it's up to the SDK API

yacovm (Fri, 14 Jul 2017 15:03:26 GMT):
so not sure

mariogemoll (Fri, 14 Jul 2017 15:06:45 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=xdEWgJv9JA3ZRG4vq) @kletkeman Thank you! I read about this generator thing as well, what I did now is just put the text into a go file like this: ``` const Schema = `{ "title": "foo", "type": "object" }` ``` which I guess is also fine for now

ssaddem (Fri, 14 Jul 2017 15:09:17 GMT):
@yacovm thx

durantto (Sat, 15 Jul 2017 14:57:34 GMT):
is it possible to store the state of, for example, chaincode A in chaincode B?

yacovm (Sat, 15 Jul 2017 15:41:25 GMT):
Yes, as long as jt is in the same channek

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

imtiyazbhat (Sun, 16 Jul 2017 17:12:41 GMT):
Has joined the channel.

imtiyazbhat (Sun, 16 Jul 2017 17:19:57 GMT):
Hello ..... I am trying to run first example of hyperledger. I get this error "Error response from daemon: Container d876356fa571ee3a6e6a632dd9bfde568fc5933b0bf6d5718a4820534593d429 is not running" when I am running command "docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx"

cre8bidio (Mon, 17 Jul 2017 00:44:14 GMT):
Has joined the channel.

hiepnm (Mon, 17 Jul 2017 03:05:11 GMT):
Has joined the channel.

hiepnm (Mon, 17 Jul 2017 03:06:43 GMT):
where do I find the chaincode documentation like shim (getState, putState, CreateCompositeKey...)?

ranjan008 (Mon, 17 Jul 2017 07:04:25 GMT):
Can user authentication be done in 1.0 chaincode as was possible in 0.6?

ssaddem (Mon, 17 Jul 2017 10:30:51 GMT):
@hiepnm https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go

ssaddem (Mon, 17 Jul 2017 10:31:12 GMT):
@ranjan008 do you mean like rbac ?

hiepnm (Mon, 17 Jul 2017 10:31:22 GMT):
thank you @ssaddem

ssaddem (Mon, 17 Jul 2017 10:32:47 GMT):
@hiepnm welcome for feature you can refer to chaincode examples

ranjan008 (Mon, 17 Jul 2017 10:42:03 GMT):
@ssaddem yes like that.

ssaddem (Mon, 17 Jul 2017 11:11:23 GMT):
@ranjan008 it's not yet implemented https://chat.hyperledger.org/channel/chaincode-dev?msg=Bz9S3CyJedJ7P3CAu

ssaddem (Mon, 17 Jul 2017 11:11:23 GMT):
@ranjan008 it's not yet implemented read the following https://chat.hyperledger.org/channel/chaincode-dev?msg=Bz9S3CyJedJ7P3CAu

vineet.timble (Mon, 17 Jul 2017 11:42:52 GMT):
Has joined the channel.

ranjan008 (Mon, 17 Jul 2017 11:43:34 GMT):
Thanks @ssaddem is there any timeline by which this will get implemented?

ssaddem (Mon, 17 Jul 2017 13:12:12 GMT):
@ranjan008 there is no timeline you can follow the statut over https://jira.hyperledger.org/browse/FAB-3752

yizhang7210 (Tue, 18 Jul 2017 02:38:57 GMT):
Has joined the channel.

ssaddem (Tue, 18 Jul 2017 08:38:27 GMT):
hi all, what kind of information GetBinding have ?

akshay.lawange (Tue, 18 Jul 2017 11:28:09 GMT):
hi, i am working with rich queries, however i am able to query with 1 key-value pair but not with the multiple. can anyone help?

ssaddem (Tue, 18 Jul 2017 11:36:58 GMT):
@akshay.lawange you can try with https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L124

hiq (Tue, 18 Jul 2017 12:12:31 GMT):
Has joined the channel.

hiq (Tue, 18 Jul 2017 12:13:33 GMT):
Hi, is there some documentation about security risks when writing a chaincode contract, and best practices that should be followed to avoid them?

akshay.lawange (Tue, 18 Jul 2017 12:53:31 GMT):
@ssaddem does it cover rich queries? because if u see one of the rich query functions in marbles02 example, they are not using this function instead they are using GetQueryResult().

akshay.lawange (Tue, 18 Jul 2017 12:53:42 GMT):
marbles02 example https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/marbles02/marbles_chaincode.go

ssaddem (Tue, 18 Jul 2017 13:14:40 GMT):
@akshay.lawange you have to work with couchdb to query with GetQueryResult() with GetQueryResult() you can invoke a mongodb query (nosql) but i don't think that support map reduce

ssaddem (Tue, 18 Jul 2017 13:16:14 GMT):
add to your env var : - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984

akshay.lawange (Tue, 18 Jul 2017 13:25:10 GMT):
@ssaddem yes, i am using couchdb and those env variables are there in the env but still i can not query with multiple key-value pairs like they have mentioned in queryString.

ssaddem (Tue, 18 Jul 2017 13:27:09 GMT):
https://docs.mongodb.com/manual/reference/operator/query/and/ https://docs.mongodb.com/manual/reference/operator/query/or/

ssaddem (Tue, 18 Jul 2017 13:27:47 GMT):
you mean something like that ?

Kathyx (Tue, 18 Jul 2017 13:36:42 GMT):
Has joined the channel.

akshay.lawange (Tue, 18 Jul 2017 13:37:17 GMT):
yes..thanks i will try this. :slight_smile:

vladyslavmunin (Tue, 18 Jul 2017 13:37:41 GMT):
Hi all! how can I query by array filed in couchDB . {type : account ,id:1 ,roles : [ "user","admin"]} , e.g. I need only admins

ssaddem (Tue, 18 Jul 2017 13:41:44 GMT):
@vladyslavmunin it's like mongodb query https://stackoverflow.com/questions/5366687/how-to-check-if-an-array-field-contains-a-unique-value-or-another-array-in-mongo

jimthematrix (Tue, 18 Jul 2017 14:02:54 GMT):
@Honglei can you chime in on further discussions on javascript chaincode support in https://jira.hyperledger.org/browse/FAB-2331

akshay.lawange (Tue, 18 Jul 2017 14:19:21 GMT):
@ssaddem those operators won't work for "selector" it seems in couchdb. http://docs.couchdb.org/en/2.0.0/api/database/find.html#selector-syntax

ssaddem (Tue, 18 Jul 2017 14:30:47 GMT):
i have tried (and/or) in couchdb and it works also in chaincode

akshay.lawange (Tue, 18 Jul 2017 14:40:28 GMT):
with rich query?

ssaddem (Tue, 18 Jul 2017 14:51:01 GMT):
yes

akshay.lawange (Tue, 18 Jul 2017 15:03:17 GMT):
can you please tell me the syntax?

ssaddem (Tue, 18 Jul 2017 16:05:15 GMT):
@akshay.lawange {"Field": {"$and": [{"$ne":"A"},{"$ne":"B"},{"$ne":"C"}]}}

MikeZhang (Wed, 19 Jul 2017 01:21:22 GMT):
Has joined the channel.

chenxuan (Wed, 19 Jul 2017 03:20:29 GMT):
Has joined the channel.

chenxuan (Wed, 19 Jul 2017 03:22:36 GMT):
hello everyone

chenxuan (Wed, 19 Jul 2017 03:22:48 GMT):
i meet a question about the query for couchdb

chenxuan (Wed, 19 Jul 2017 03:22:57 GMT):
i put the json data to the couchdb

chenxuan (Wed, 19 Jul 2017 03:23:08 GMT):
but when i want to query the data

chenxuan (Wed, 19 Jul 2017 03:23:31 GMT):
i find the json data store in the couchdb like

chenxuan (Wed, 19 Jul 2017 03:23:52 GMT):
id"ccid-owner-dc-100040417enableqtest" { "_id": "cc\u0000\u0000id-owner-dc\u0000-100040417\u0000enableq\u0000test\u0000", "_rev": "1-65112a41a20a11d090a6a93ee7f7ffb8", "value": { "rev": "1-65112a41a20a11d090a6a93ee7f7ffb8" }, "key": "cc\u0000\u0000id-owner-dc\u0000-100040417\u0000enableq\u0000test\u0000", "doc": { "_id": "cc\u0000\u0000id-owner-dc\u0000-100040417\u0000enableq\u0000test\u0000", "_rev": "1-65112a41a20a11d090a6a93ee7f7ffb8", "chaincodeid": "cc", "data": { "owner": "enableq", "id": -100040417, "dc": "test" }, "version": "109:6" } }

chenxuan (Wed, 19 Jul 2017 03:24:15 GMT):
however the data field that i don't set

chenxuan (Wed, 19 Jul 2017 03:24:39 GMT):
i don't know how the data generate

chenxuan (Wed, 19 Jul 2017 03:24:42 GMT):
the fabric?

chenxuan (Wed, 19 Jul 2017 03:24:45 GMT):
or other

chenxuan (Wed, 19 Jul 2017 03:25:27 GMT):
another question about the is when i use the point the skip,limit field it doesn't work

chenxuan (Wed, 19 Jul 2017 03:25:27 GMT):
another question about the is when i use the point the skip,limit field it doesn't work @ssaddem

yuanyunliang (Wed, 19 Jul 2017 05:58:45 GMT):
Has joined the channel.

chaitanya (Wed, 19 Jul 2017 06:06:00 GMT):
Hi everyone, I'm getting an error on chaincode_example04 saying ```Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/common/util: go list: failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH) ```

chaitanya (Wed, 19 Jul 2017 06:06:08 GMT):
I'm using the beta release of Fabric for this. Any idea what I could be missing?

chenxuan (Wed, 19 Jul 2017 06:21:44 GMT):
can't find the class

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes via code? I try to better explain my answer I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only the cloned chaincodes are totally different from the template

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes by code? I try to better explain my answer I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only the cloned chaincodes are totally different from the template

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes by code? I try to better explain my question I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only the cloned chaincodes are totally different from the template

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes by code? I try to better explain my question. I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only the cloned chaincodes are totally different from the template

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes by code? I try to better explain my question. I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only. The cloned chaincodes are totally different from the template

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes by code? I try to better explain my question. I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only. The cloned chaincodes are totally different from the template ones.

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes in some way? I try to better explain my question. I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only. The cloned chaincodes are totally different from the template ones.i

ascatox (Wed, 19 Jul 2017 07:30:11 GMT):
Hi guys, is it possible to clone chaincodes in some way? I try to better explain my question. I'd like to have a service/layer to clone chaincodes, having in this way a kind of chaincode templates to be cloned only. The cloned chaincodes are totally different from the template ones.

ascatox (Wed, 19 Jul 2017 07:34:42 GMT):
Someone could help me!!!

dddong17 (Wed, 19 Jul 2017 09:14:26 GMT):
Has joined the channel.

s.narayanan (Wed, 19 Jul 2017 15:11:43 GMT):
Has joined the channel.

s.narayanan (Wed, 19 Jul 2017 15:12:52 GMT):
How do I set up timezone in chaincode Docker container? I tried setting up the TZ environment variable in docker-compose for fabric--ccenv image but this does not seem to work. The timezone is defaulting to UTC, while I want to set up a specific time zone (e.g. EDT)

Tigermisu (Wed, 19 Jul 2017 20:57:39 GMT):
Hello. Is there something like `ChaincodeStubInterface.GetCreator()` that can be used to identify the node instead of the user's identity? Something like `peer.getName()`?

koloisator (Thu, 20 Jul 2017 11:27:58 GMT):
Has joined the channel.

koloisator (Thu, 20 Jul 2017 11:28:24 GMT):
Hi everyone, i'm trying to figure out how to receive response from GetTxTimestamp(), but can't handle this after hours trying so.... This method returns a Timestamp, but i really do not understand what type should i use for it. Here is my struct definition: ``` type DemandeHistory struct { Transaction_id string `json:"transaction_id"` Timestamp timestamp.Timestamp `json:"timestamp"` User_id string `json:"user_id"` Days_sent int `json:"days_sent"` Validated bool `json:"validated"` } ``` I try to send it to this variable : timestamp, _ := APIstub.GetTxTimestamp(), but i always receive an error saying: "undefined: timestamp in timestamp.Timestamp" any ideas ?

koloisator (Thu, 20 Jul 2017 12:02:18 GMT):
Or, maybe someone could just simply explain clearly how to ose this function, as it is supposed to send 2 variables, a timestamp, and error .... I really do not understand how to store the rendered timestamp ....

koloisator (Thu, 20 Jul 2017 12:02:57 GMT):
the interface of the GetTxTimestamp is like so: GetTxTimestamp() (*timestamp.Timestamp, error)

ssaddem (Thu, 20 Jul 2017 14:13:24 GMT):
i have solved this problem with govendor

ssaddem (Thu, 20 Jul 2017 14:13:24 GMT):
@koloisator i have solved this problem with govendor

ssaddem (Thu, 20 Jul 2017 14:15:15 GMT):
govendor init govendor add +external and don't forgot to update import reference

koloisator (Thu, 20 Jul 2017 14:26:32 GMT):
thanks, i'll try this asap !

akashmar (Thu, 20 Jul 2017 18:26:53 GMT):
are there any known issues with GOPATH having multiple entries? I have my chaincode in one of those entries and I keep getting this error: ``` Error getting chaincode code chaincode: path to chaincode does not exist: dolphin-go ```

akashmar (Thu, 20 Jul 2017 18:26:53 GMT):
@here are there any known issues with GOPATH having multiple entries? I have my chaincode in one of those entries and I keep getting this error when I try installing: ``` Error getting chaincode code chaincode: path to chaincode does not exist: dolphin-go ``` I've also tried moving the code under github.com/hyperledger/fabric/examples/chaincode/go/ and I get this error instead when I try to install:

akashmar (Thu, 20 Jul 2017 18:26:53 GMT):
@here are there any known issues with GOPATH having multiple entries? I have my chaincode in one of those entries and I keep getting this error when I try installing: ``` Error getting chaincode code chaincode: path to chaincode does not exist: dolphin-go ``` I've also tried moving the code under github.com/hyperledger/fabric/examples/chaincode/go/ and I get this error instead when I try to install: ``` Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for : go list: failed with error: "exit status 1" can't load package: package .: no buildable Go source files in /Users/kashma1/Documents/repos/blockchain-dolphin ```

akashmar (Thu, 20 Jul 2017 22:35:24 GMT):
I found the root cause of the second issue by looking at the debug log. Somehow I end up with an empty import and I can't figure out why: ``` 2017-07-20 18:27:10.109 EDT [golang-platform] func1 -> DEBU 016 Accepting import: strconv 2017-07-20 18:27:10.109 EDT [golang-platform] func1 -> DEBU 017 Accepting import: time 2017-07-20 18:27:10.109 EDT [golang-platform] func1 -> DEBU 018 Accepting import: Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for : go list: failed with error: "exit status 1" can't load package: package .: no buildable Go source files in /Users/kashma1/Documents/repos/blockchain-dolphin ```

colinGrahms (Fri, 21 Jul 2017 07:06:46 GMT):
Has joined the channel.

paul.sitoh (Fri, 21 Jul 2017 08:06:57 GMT):
Polling: What is the advantage of developing in chaincode Go over other method?

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

mastersingh24 (Fri, 21 Jul 2017 13:00:53 GMT):
@paul.sitoh - What's the other method?

paul.sitoh (Fri, 21 Jul 2017 13:01:53 GMT):
Java, composer, etc

mastersingh24 (Fri, 21 Jul 2017 13:02:14 GMT):
Java versus Go is language preference ;)

akashmar (Fri, 21 Jul 2017 13:20:04 GMT):
@mastersingh24 @paul.sitoh Java is currently disabled n 1.0.0 as far as i know

mastersingh24 (Fri, 21 Jul 2017 15:17:41 GMT):
@akashmar - It is indeed. My answer was more of a philosophical response

Tigermisu (Fri, 21 Jul 2017 18:32:24 GMT):
Hello. Is there something like `ChaincodeStubInterface.GetCreator()` that can be used to identify the node instead of the user's identity? Something like `peer.getName()`?

matanyahu (Sat, 22 Jul 2017 12:46:53 GMT):
Hi, I am looking for some examples of working app samples with gui which are produced for Fabric 1.0 GA

matanyahu (Sat, 22 Jul 2017 12:47:25 GMT):
I am aware of Blocledger POE and Marbles, but both seem to have been tested against 1.0 Alpha. I tried to deploy both, without success

nhrishi (Sat, 22 Jul 2017 14:28:10 GMT):
Hi, I'm using Fabric rc1. Have3 chaincodes (A, B & C) instantiated on one channel. First, client invokes chaincode A. The Invoke function in Chaincode A queries some data from chaincode B & then C. And then Chaincode A invokes the chaincode B. But while chaincode B is processing the invoke function, the docker container of chaincode B is crashing with error -- ERROR : "panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4095b9]". Did anyone experience this issue before and any idea/help?

muralisr (Sat, 22 Jul 2017 15:12:32 GMT):
@nhrishi if you add env var CORE_VM_DOCKER_ATTACHSTDOUT=true and CORE_CHAINCODE_LOGGING_LEVEL=debug to `peer` containers, you might get more information on the crash (hoping for a stack trace from the chaincode)

nhrishi (Sat, 22 Jul 2017 16:08:27 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=KW8tKjAHBavzXdJZ6) @muralisr Thanks. Here is more info- `panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4095b9] goroutine 100 [running]: panic(0x9d9900, 0xc420016040) /opt/go/src/runtime/panic.go:500 +0x1a1 main.(*DealChaincode).newSubUpdate(0xf88698, 0xf4fb20, 0xc420079800, 0xc4202efa00, 0x11, 0xc420324ef0, 0x6, 0xc420324ef6, 0x6, 0xc420324f00, ...) /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/DealCC/deal.go:396 +0x409 main.(*DealChaincode).invoke(0xf88698, 0xf4fb20, 0xc420079800, 0xc4202ef9c0, 0x16, 0xc4202fc810, 0x3, 0x3, 0x0, 0x0, ...) /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/DealCC/deal.go:529 +0x4dd main.(*DealChaincode).Invoke(0xf88698, 0xf4fb20, 0xc420079800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/DealCC/deal.go:499 +0x2b2 github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4201fe770, 0xc420328410) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:317 +0x483 created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:328 +0x49 panic: nil msg goroutine 11 [running]: panic(0x9a4ea0, 0xc420325270) /opt/go/src/runtime/panic.go:500 +0x1a1 github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer.func1(0xc42005baa0, 0xc4201fa9b0, 0x7fe5157352b0, 0xc4201fa880, 0xc42005bb00, 0xc4201fe770) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:302 +0xe61 created by github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:324 +0x500`

muralisr (Sat, 22 Jul 2017 18:38:42 GMT):
@nhrishi so the chaincode is crashing in `deal.go:396`

muralisr (Sat, 22 Jul 2017 18:38:50 GMT):
you'll have to debug that

muralisr (Sat, 22 Jul 2017 18:40:33 GMT):
another approach to debugging - for faster turn around - would be to run the chaincode in dev mode

nhrishi (Sat, 22 Jul 2017 18:53:19 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=rATKfMorZ6pzXpTPG) @muralisr Yes deal.go is crashing. Just want to confirm if this is not due to the way chaincodes are invoking/quering each other. Is this expected to work in a single invoke from a client app.

muralisr (Sat, 22 Jul 2017 18:56:55 GMT):
@nhrishi best to understand why its crashing in that code first.

nhrishi (Sat, 22 Jul 2017 18:58:12 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=FXSBZwo4GbHYPSg8e) @muralisr ok. THanks. Will try to check it out.

fred0071 (Sun, 23 Jul 2017 05:24:39 GMT):
Has joined the channel.

narayanprusty (Sun, 23 Jul 2017 11:05:48 GMT):
Is there a way to pass starting blocknumber to `eh.registerChaincodeEvent` function? I want this feature so that I don't miss events if my event listener service is down. I can restart it from a specific blocknumber

samuel.alencar (Mon, 24 Jul 2017 03:03:54 GMT):
Has joined the channel.

ZiaullhaqSavanur (Mon, 24 Jul 2017 07:45:15 GMT):
Has joined the channel.

wy (Tue, 25 Jul 2017 03:28:27 GMT):
Has joined the channel.

wy (Tue, 25 Jul 2017 03:29:39 GMT):
Hi guys, anyone can advise me on how i can create a queue system on the chaincode which stores all pending/failed transactions on the chain code?

JarvisJang (Tue, 25 Jul 2017 03:50:13 GMT):
Hi, actually hyperledger doesn't have currency function. Then how can I make payment system in chaincode?

cristianvanderweij (Tue, 25 Jul 2017 13:21:48 GMT):
Has joined the channel.

cristianvanderweij (Tue, 25 Jul 2017 13:23:43 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: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/ubuntu/go/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-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

akashmar (Tue, 25 Jul 2017 20:36:58 GMT):
@cristianvanderweij the actual instantiation is probably taking longer than 45 seconds. Mine takes about a minute to complete. You can try increasing the timeout and see if that helps

akashmar (Tue, 25 Jul 2017 20:38:50 GMT):
@JarvisJang the examples on github are very simple currency chaincodes. You're basically assigning a number value to a key (the person's name or id) and storing it in the ledger.

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

gbolo (Tue, 25 Jul 2017 20:48:27 GMT):
hey all

gbolo (Tue, 25 Jul 2017 20:49:14 GMT):
once i package the chaincode how do i deploy the actual package? (once packages using `peer chaincode package`)

neharprodduturi (Tue, 25 Jul 2017 23:50:20 GMT):
Has joined the channel.

muralisr (Wed, 26 Jul 2017 04:36:34 GMT):
@gbolo `peer chaincode install ` can be used to install a previously constructed package

muralisr (Wed, 26 Jul 2017 04:36:54 GMT):
its something not used a lot (yet)

muralisr (Wed, 26 Jul 2017 04:37:17 GMT):
https://chat.hyperledger.org/channel/chaincode-dev?msg=ScTWioSd6NdY3rs5Z

muralisr (Wed, 26 Jul 2017 04:37:48 GMT):
@cristianvanderweij can you try the question in fabric-sdk-node please ?

cristianvanderweij (Wed, 26 Jul 2017 09:52:09 GMT):
@akashmar thx for you reply! Yes I have put the timeout to 60000 still sometimes I get a timeout error. Maybe it has to do with the size of the smart contract and computer performance

cristianvanderweij (Wed, 26 Jul 2017 09:55:16 GMT):
@muralisr thx I put it at fabric-sdk-node

FollowingGhosts (Wed, 26 Jul 2017 10:29:04 GMT):
is there any documentation re: unit testing chaincode?

ssaddem (Wed, 26 Jul 2017 11:06:05 GMT):
@cristianvanderweij it's a time after a while you can verify your chaincode is up with docker ps so if you re-execute instantiate after it will works fine

ssaddem (Wed, 26 Jul 2017 11:10:48 GMT):
@FollowingGhosts i don't know but there is an example https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go if you are not familiar with golang you can search for golang unit test

ssaddem (Wed, 26 Jul 2017 11:10:48 GMT):
@FollowingGhosts i don't know but there is a severals examples in fabric e.g https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go if you are not familiar with golang you can search for golang unit test

ssaddem (Wed, 26 Jul 2017 11:10:48 GMT):
@FollowingGhosts i don't know but there are a several examples in fabric e.g https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go if you are not familiar with golang you can search for golang unit test

gbolo (Wed, 26 Jul 2017 14:24:54 GMT):
@muralisr This command seems to fail, are you sure it's still valid? ``` /usr/local/bin/peer chaincode install /data/channel-artifacts/ex02_v1.0.out 2017-07-26 14:21:42.045 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:21:42.045 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:21:42.046 UTC [msp/identity] Sign -> DEBU 003 Sign: plaintext: 0AC2070A5B08031A0B08F6CAE2CB0510...A8E9BDD2B84FA34A047DCD7EE3984ED5 2017-07-26 14:21:42.046 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: 2790AE93CB45671BD7FB8718F35F4C6EC627A2F1CC1D7D88335655AF6E844622 Error: Error endorsing chaincode: rpc error: code = Unknown desc = proto: bad wiretype for field peer.ChaincodeSpec.Type: got wiretype 2, want 0 Usage: peer chaincode install [flags] Flags: -c, --ctor string Constructor message for the chaincode in JSON format (default "{}") -l, --lang string Language the chaincode is written in (default "golang") -n, --name string Name of the chaincode -p, --path string Path to chaincode -v, --version string Version of the chaincode specified in install/instantiate/upgrade commands 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 ```

gbolo (Wed, 26 Jul 2017 14:26:38 GMT):
I noticed that this command you mention is part of documentation for 1.0-beta but has since been removed: http://hyperledger-fabric.readthedocs.io/en/v1.0.0-beta/cc-packaging-and-signing.html

muralisr (Wed, 26 Jul 2017 14:37:27 GMT):
@gbolo the "Usage" and "Flags" is misleading ... but the main error is `Error: Error endorsing chaincode: rpc error: code = Unknown desc = proto: bad wiretype for field peer.ChaincodeSpec.Type: got wiretype 2, want 0`

muralisr (Wed, 26 Jul 2017 14:37:54 GMT):
which makes me think /data/channel-artifacts/ex02_v1.0.out somehow not right

muralisr (Wed, 26 Jul 2017 14:38:01 GMT):
is there anything from the peer log ?

Juan.Arias (Wed, 26 Jul 2017 14:48:12 GMT):
Has joined the channel.

gbolo (Wed, 26 Jul 2017 14:51:09 GMT):
@muralisr This is the log of creating the package: ``` 2017-07-26 14:23:44.516 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:23:44.516 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-07-26 14:23:44.555 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv 2017-07-26 14:23:44.750 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A5A080112540A476769746875622E63...0A2D2D2D2D2D454E44202D2D2D2D2D0A 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: EBBF6F65F34A6A3328995BFAF71F9D81EB21667F05A20D3751AB4073FFA4BCE3 2017-07-26 14:23:44.751 UTC [chaincodeCmd] chaincodePackage -> DEBU 00d Packaged chaincode into deployment spec of size <3472>, with args = [ex02_v1.0.out] 2017-07-26 14:23:44.751 UTC [main] main -> INFO 00e Exiting..... ```

gbolo (Wed, 26 Jul 2017 14:51:09 GMT):
@muralisr This is the log of creating the package: ``` 2017-07-26 14:23:44.516 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:23:44.516 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-07-26 14:23:44.555 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv 2017-07-26 14:23:44.750 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A5A080112540A476769746875622E63...0A2D2D2D2D2D454E44202D2D2D2D2D0A 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: EBBF6F65F34A6A3328995BFAF71F9D81EB21667F05A20D3751AB4073FFA4BCE3 2017-07-26 14:23:44.751 UTC [chaincodeCmd] chaincodePackage -> DEBU 00d Packaged chaincode into deployment spec of size <3472>, with args = [ex02_v1.0.out] 2017-07-26 14:23:44.751 UTC [main] main -> INFO 00e Exiting..... ```

gbolo (Wed, 26 Jul 2017 14:51:09 GMT):
@muralisr This is the log of creating the package: ``` /usr/local/bin/peer chaincode package -n ex02 -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -s -S -i 'AND('\''Org1.admin'\'')' ex02_v1.0.out 2017-07-26 14:23:44.516 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:23:44.516 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-07-26 14:23:44.555 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv 2017-07-26 14:23:44.750 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A5A080112540A476769746875622E63...0A2D2D2D2D2D454E44202D2D2D2D2D0A 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: EBBF6F65F34A6A3328995BFAF71F9D81EB21667F05A20D3751AB4073FFA4BCE3 2017-07-26 14:23:44.751 UTC [chaincodeCmd] chaincodePackage -> DEBU 00d Packaged chaincode into deployment spec of size <3472>, with args = [ex02_v1.0.out] 2017-07-26 14:23:44.751 UTC [main] main -> INFO 00e Exiting..... ```

gbolo (Wed, 26 Jul 2017 14:51:09 GMT):
@muralisr This is the log of creating the package: ``` /usr/local/bin/peer chaincode package -n ex02 -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -s -S -i 'AND(''Org1.admin'')' ex02_v1.0.out 2017-07-26 14:23:44.516 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:23:44.516 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-07-26 14:23:44.555 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv 2017-07-26 14:23:44.750 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A5A080112540A476769746875622E63...0A2D2D2D2D2D454E44202D2D2D2D2D0A 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: EBBF6F65F34A6A3328995BFAF71F9D81EB21667F05A20D3751AB4073FFA4BCE3 2017-07-26 14:23:44.751 UTC [chaincodeCmd] chaincodePackage -> DEBU 00d Packaged chaincode into deployment spec of size <3472>, with args = [ex02_v1.0.out] 2017-07-26 14:23:44.751 UTC [main] main -> INFO 00e Exiting..... ```

gbolo (Wed, 26 Jul 2017 14:51:09 GMT):
@muralisr This is the log of creating the package: ``` /usr/local/bin/peer chaincode package -n ex02 -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -s -S -i "AND('Org1.admin')" ex02_v1.0.out 2017-07-26 14:23:44.516 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 14:23:44.516 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2017-07-26 14:23:44.516 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-07-26 14:23:44.555 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer 2017-07-26 14:23:44.750 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv 2017-07-26 14:23:44.750 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A5A080112540A476769746875622E63...0A2D2D2D2D2D454E44202D2D2D2D2D0A 2017-07-26 14:23:44.751 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: EBBF6F65F34A6A3328995BFAF71F9D81EB21667F05A20D3751AB4073FFA4BCE3 2017-07-26 14:23:44.751 UTC [chaincodeCmd] chaincodePackage -> DEBU 00d Packaged chaincode into deployment spec of size <3472>, with args = [ex02_v1.0.out] 2017-07-26 14:23:44.751 UTC [main] main -> INFO 00e Exiting..... ```

gbolo (Wed, 26 Jul 2017 14:57:47 GMT):
I would like this to work so I can test deployment of cc pkg with multiple signatures

gbolo (Wed, 26 Jul 2017 15:04:04 GMT):
@muralisr any thoughts?

muralisr (Wed, 26 Jul 2017 15:58:31 GMT):
@gbolo does the flow work if you are not using `-s -S` optons (ie, using an unsigned package format) ?

Tigermisu (Wed, 26 Jul 2017 16:00:12 GMT):
Hello. Is there something like `ChaincodeStubInterface.GetCreator()` that can be used to identify the node instead of the user's identity? Something like `peer.getName()`?

gbolo (Wed, 26 Jul 2017 16:10:34 GMT):
@muralisr thanks that worked. Is there a problem with my signatures?

gbolo (Wed, 26 Jul 2017 16:10:52 GMT):
or is it a problem with the codebase?

muralisr (Wed, 26 Jul 2017 16:11:53 GMT):
@gbolo I'm not sure.. the signed package is not currently in general (for instance SDKs use the standard mechanism).

gbolo (Wed, 26 Jul 2017 16:12:14 GMT):
I should note that I am using an org admin mso for signing

gbolo (Wed, 26 Jul 2017 16:12:14 GMT):
I should note that I am using an org admin msp for signing

gbolo (Wed, 26 Jul 2017 16:12:36 GMT):
ideally I was going to test having multiple signatures

muralisr (Wed, 26 Jul 2017 16:12:53 GMT):
does the peer side logs show anything

gbolo (Wed, 26 Jul 2017 16:15:05 GMT):
I can put it on debug. please hold

gbolo (Wed, 26 Jul 2017 16:15:52 GMT):
@muralisr if you would like to try, I have a docker-compose env set up for this on github

muralisr (Wed, 26 Jul 2017 16:16:51 GMT):
@gbolo cannot try right now, perhaps later

muralisr (Wed, 26 Jul 2017 16:17:42 GMT):
but can take a quick look at the peer side

muralisr (Wed, 26 Jul 2017 16:17:42 GMT):
but can take a quick look at the peer side logs

gbolo (Wed, 26 Jul 2017 16:20:08 GMT):
@muralisr thanks, almost done

gbolo (Wed, 26 Jul 2017 16:20:45 GMT):
just putting a sleep since debug messages are heavy especially when using pkcs11 (softhsm)

gbolo (Wed, 26 Jul 2017 16:22:00 GMT):
Here we go. Peer side logs: ``` 2017-07-26 16:21:08.164 UTC [endorser] ProcessProposal -> DEBU 350 Entry 2017-07-26 16:21:08.164 UTC [protoutils] ValidateProposalMessage -> DEBU 351 ValidateProposalMessage starts for signed proposal 0xc4216e8300 2017-07-26 16:21:08.164 UTC [protoutils] validateChannelHeader -> DEBU 352 validateChannelHeader info: header type 3 2017-07-26 16:21:08.164 UTC [protoutils] checkSignatureFromCreator -> DEBU 353 checkSignatureFromCreator starts 2017-07-26 16:21:08.165 UTC [protoutils] checkSignatureFromCreator -> DEBU 354 checkSignatureFromCreator info: creator is &{Org1MSP 4e948917f2532c52609618ab3a9bc5d9c4adb487d82be7e3d1f867e0e5e7a0ac} 2017-07-26 16:21:08.165 UTC [protoutils] checkSignatureFromCreator -> DEBU 355 checkSignatureFromCreator info: creator is valid 2017-07-26 16:21:08.165 UTC [protoutils] checkSignatureFromCreator -> DEBU 356 checkSignatureFromCreator exists successfully 2017-07-26 16:21:08.165 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 357 validateChaincodeProposalMessage starts for proposal 0xc42228e370, header 0xc4216e8330 2017-07-26 16:21:08.165 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 358 validateChaincodeProposalMessage info: header extension references chaincode name:"lscc" 2017-07-26 16:21:08.165 UTC [endorser] ProcessProposal -> DEBU 359 processing txid: 801beb7d7c3677dac75853d5d8748db0bfe8d0008e5103f49f6eaa6ee39e24f1 2017-07-26 16:21:08.165 UTC [endorser] simulateProposal -> DEBU 35a Entry - txid: 801beb7d7c3677dac75853d5d8748db0bfe8d0008e5103f49f6eaa6ee39e24f1 channel id: 2017-07-26 16:21:08.165 UTC [endorser] simulateProposal -> DEBU 35b Exit 2017-07-26 16:21:08.165 UTC [endorser] ProcessProposal -> DEBU 35c Exit 2017-07-26 16:21:08.365 UTC [bccsp_p11] getSession -> DEBU 35d Reusing existing pkcs11 session 1 on slot 16528713 ```

gbolo (Wed, 26 Jul 2017 16:22:49 GMT):
client side logs: ``` 2017-07-26 16:21:08.164 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-26 16:21:08.164 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-26 16:21:08.164 UTC [msp/identity] Sign -> DEBU 003 Sign: plaintext: 0AC2070A5B08031A0B08F482E3CB0510...D37B384550664B4D9BE4BB0DCBFE7213 2017-07-26 16:21:08.164 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: 9608B159D810FFC85B614C52C92A7A3F8B6FF3139BEA1A646B0F30649CDBB31A Error: Error endorsing chaincode: rpc error: code = Unknown desc = proto: bad wiretype for field peer.ChaincodeSpec.Type: got wiretype 2, want 0 ```

gbolo (Wed, 26 Jul 2017 16:25:09 GMT):
@muralisr is this enough information for a ticket? or is it possible I am doing something wrong?

muralisr (Wed, 26 Jul 2017 16:29:23 GMT):
@gbolo I don't see any error on the peer logs ... so not sure where the problem is. Do open a JIRA and we'll go from there. But again, the signed package is not yet by the system (it was meant to be used in future)

gbolo (Wed, 26 Jul 2017 16:36:18 GMT):
oh ok then in that case perhaps i should wait for v1.01

gbolo (Wed, 26 Jul 2017 16:36:24 GMT):
because non-signed works

gbolo (Wed, 26 Jul 2017 16:37:43 GMT):
I guess it's just odd that there is no error in the logs. But to be fair the docs dont describe how to deploy a signed package, only how to make one

gbolo (Wed, 26 Jul 2017 16:37:49 GMT):
so perhaps this is a known issue

gbolo (Wed, 26 Jul 2017 16:38:12 GMT):
thanks for your help @muralisr

gbolo (Wed, 26 Jul 2017 16:38:46 GMT):
if your interested you can run the wrapper script from here: https://github.com/gbolo/dockerfiles/tree/master/hyperledger-fabric/softhsm/compose

gbolo (Wed, 26 Jul 2017 16:38:59 GMT):
after you pull it. Feel free to message me anytime. Thanks again

gbolo (Wed, 26 Jul 2017 16:40:01 GMT):
you will have to uncomment this line: https://github.com/gbolo/dockerfiles/blob/master/hyperledger-fabric/softhsm/compose/files/bin/run_test.sh#L263

gbolo (Wed, 26 Jul 2017 16:40:07 GMT):
and comment out the line under it

muralisr (Wed, 26 Jul 2017 17:41:09 GMT):
distracted again @gbolo :-) .... I need to try this too when I get some time

noyonthe1 (Wed, 26 Jul 2017 18:20:42 GMT):
Has joined the channel.

ashahn (Wed, 26 Jul 2017 19:01:16 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?

jrosmith (Wed, 26 Jul 2017 20:20:56 GMT):
@ashahn in the balance transfer example there is example code that contains a helper function called `newRemotes`, this helps you set up eventhubs. once you connect your peers to them, you need to register a functions (for events and errors) for the block

ZiaullhaqSavanur (Thu, 27 Jul 2017 06:59:20 GMT):
Does any body know how to upload a document using Hyperledger Composer.

htyagi90 (Thu, 27 Jul 2017 12:27:19 GMT):
Has joined the channel.

akdj (Thu, 27 Jul 2017 12:58:57 GMT):
Has joined the channel.

akdj (Thu, 27 Jul 2017 13:00:19 GMT):
Hello, I need some help

akdj (Thu, 27 Jul 2017 13:00:32 GMT):
``` resultsIterator, err := stub.GetQueryResult(queryString) ```

akdj (Thu, 27 Jul 2017 13:00:57 GMT):
I am using this method `GetQueryResult`

akdj (Thu, 27 Jul 2017 13:02:04 GMT):
I read that it return a `KV` a key and value

akdj (Thu, 27 Jul 2017 13:02:06 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/vendor/github.com/hyperledger/fabric/core/chaincode/shim/interfaces.go#L211

akdj (Thu, 27 Jul 2017 13:03:24 GMT):
https://godoc.org/github.com/hyperledger/fabric/protos/ledger/queryresult the key is a string, and valut a []byte, what I want is to know how to get Json object of value

jrosmith (Thu, 27 Jul 2017 13:11:25 GMT):
@akdj you'll need to use the `encoding/json` package and use `json.Unmarshal` ```` var jsonVal JsonStruct jsonVal, err = json.Unmarshal(payload) ````

jrosmith (Thu, 27 Jul 2017 13:11:25 GMT):
@akdj you'll need to use the `encoding/json` package and use `json.Unmarshal` ``` var err Error var jsonVal JsonStruct err = json.Unmarshal(payload, &jsonVal) ```

jrosmith (Thu, 27 Jul 2017 13:11:25 GMT):
@akdj you'll need to use the `encoding/json` package and use `json.Unmarshal` ``` var err Error var jsonVal JsonStruct err = json.Unmarshal(response.Payload, &jsonVal) ```

akdj (Thu, 27 Jul 2017 13:16:06 GMT):
@jrosmith thank you, I will try now

nickmelis (Thu, 27 Jul 2017 14:41:17 GMT):
does anyone know if/when GetHistoryForKey is going to be implemented in shim.MockStub? Is there any other way to unit test it?

nickmelis (Thu, 27 Jul 2017 19:39:49 GMT):
re: above. I've raised https://jira.hyperledger.org/browse/FAB-5507

amolpednekar (Fri, 28 Jul 2017 05:45:16 GMT):
Has joined the channel.

CBTheis (Fri, 28 Jul 2017 20:33:36 GMT):
Has joined the channel.

BhavishaDawda (Fri, 28 Jul 2017 21:10:39 GMT):
Has joined the channel.

Markusb3i (Sat, 29 Jul 2017 11:17:51 GMT):
Has joined the channel.

bzeyben (Sat, 29 Jul 2017 11:48:31 GMT):
Has joined the channel.

vigneswaran.r (Mon, 31 Jul 2017 08:50:40 GMT):
Has left the channel.

SandeepKhore (Mon, 31 Jul 2017 10:13:45 GMT):
Has joined the channel.

akdj (Mon, 31 Jul 2017 11:35:42 GMT):
Hello, can I make Map reduce query with couchdb in the chaincode?

akdj (Mon, 31 Jul 2017 11:35:42 GMT):
Hello, can I make Map/reduce query with couchdb in the chaincode?

akdj (Mon, 31 Jul 2017 11:35:42 GMT):
Hello, can I make map/reduce query with couchdb in the chaincode?

akdj (Mon, 31 Jul 2017 11:42:25 GMT):
@here

dave.enyeart (Mon, 31 Jul 2017 11:51:47 GMT):
@akdj Not in 1.0.0, however map/reduce queries via couchdb views is intended for the future, please see https://jira.hyperledger.org/browse/FAB-5528

dave.enyeart (Mon, 31 Jul 2017 11:52:33 GMT):
if you could add your use case as a comment to that Jira, and vote for the Jira item, that would help

akdj (Mon, 31 Jul 2017 12:03:01 GMT):
@dave.enyeart ok thanks

FollowingGhosts (Mon, 31 Jul 2017 13:05:19 GMT):
Is it possible to store nested JSON that can be searched by couchdb?

FollowingGhosts (Mon, 31 Jul 2017 13:06:02 GMT):
e.g ``` { "name": "example" subobject: { name: "innerobject" }

FollowingGhosts (Mon, 31 Jul 2017 13:06:10 GMT):
formatting is a bit off

wangxinalex (Mon, 31 Jul 2017 16:14:36 GMT):
Has joined the channel.

toddinpal (Mon, 31 Jul 2017 19:09:26 GMT):
The Hyperledger Fabric Model (http://hyperledger-fabric.readthedocs.io/en/latest/fabric_model.html#privacy-through-channels) describes privacy via channels and goes on to suggest that values can be encrypted by the chaincode. How is this done in practice? Where would the encryption key come from?

toddinpal (Mon, 31 Jul 2017 19:09:26 GMT):
The Hyperledger Fabric Model (http://hyperledger-fabric.readthedocs.io/en/latest/fabric_model.html#privacy-through-channels) describes privacy via channels and goes on to suggest that values can be encrypted by the chaincode. How is this done in practice? Where would the encryption key come from?

wy (Tue, 01 Aug 2017 02:21:13 GMT):
Hi, is it possible to create a queue structure on the chain code which persists even after the invoke function is done, so that the next invoke can make use of the queue

wy (Tue, 01 Aug 2017 02:21:34 GMT):
@here

greg.haskins (Tue, 01 Aug 2017 02:55:12 GMT):
@wy: each chaincode instance has its own isolated persistence layer...you can put whatever you want inside, including a queue structure

greg.haskins (Tue, 01 Aug 2017 02:56:20 GMT):
the one thing to keep in mind is that chaincode acts like an implicit transaction...any mutations you make within an invoke will be either all committed or all rolled back...the one main rub is that the transaction _may_ abort out from under you if consensus is not reached

greg.haskins (Tue, 01 Aug 2017 02:56:20 GMT):
the one thing to keep in mind is that chaincode invokes act like an implicit transaction...any mutations you make within an invoke will be either all committed or all rolled back...the one main rub is that the transaction _may_ abort out from under you if consensus is not reached

wy (Tue, 01 Aug 2017 02:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ke6Wyu593aWj82BLg) @greg.haskins In that case, where should the queue be defined? within the invoke function itself? Will other peers with access to the channel be able to see the same queue?

greg.haskins (Tue, 01 Aug 2017 03:00:43 GMT):
so, say you have a chaincode X, and you create an instance Y on channel Z

greg.haskins (Tue, 01 Aug 2017 03:00:54 GMT):
each peer that is part of channel Z will be running a copy of Y

greg.haskins (Tue, 01 Aug 2017 03:01:03 GMT):
(generally speaking)

greg.haskins (Tue, 01 Aug 2017 03:01:51 GMT):
each copy of Y presumably has the same local state, and an invoke targetting instance Y is executed by each of the replicas

greg.haskins (Tue, 01 Aug 2017 03:02:19 GMT):
so, depending on how you define "peers with access to the channel", yes or no

greg.haskins (Tue, 01 Aug 2017 03:02:37 GMT):
the right way to frame it is: all instances of Y have access to the queue, yes

greg.haskins (Tue, 01 Aug 2017 03:03:18 GMT):
but other chaincode instances, even those in the same channel Z, do not have access to it

greg.haskins (Tue, 01 Aug 2017 03:03:21 GMT):
it is private to Y

greg.haskins (Tue, 01 Aug 2017 03:03:44 GMT):
and Y has N replicas that operate concurrently

greg.haskins (Tue, 01 Aug 2017 03:03:48 GMT):
does this make sense?

wy (Tue, 01 Aug 2017 03:04:29 GMT):
im confused on what you mean by a 'chaincode instance'

greg.haskins (Tue, 01 Aug 2017 03:04:43 GMT):
ok, step back from chaincode for a second

greg.haskins (Tue, 01 Aug 2017 03:05:01 GMT):
I write hello-world in C, and compile it to a.out

wy (Tue, 01 Aug 2017 03:05:07 GMT):
how do i define which instance i am on or currently running? is it by the version number?

greg.haskins (Tue, 01 Aug 2017 03:05:10 GMT):
I then run a.out 1000 times

greg.haskins (Tue, 01 Aug 2017 03:05:18 GMT):
I have one code, and 1000 instances

greg.haskins (Tue, 01 Aug 2017 03:06:09 GMT):
likewise, I can have one chaincode deployment that is instantiated 1000 times

greg.haskins (Tue, 01 Aug 2017 03:06:29 GMT):
well, each instance has a unique address

greg.haskins (Tue, 01 Aug 2017 03:07:25 GMT):
versioning is about upgrading in lifecycle management

greg.haskins (Tue, 01 Aug 2017 03:07:39 GMT):
dont confuse versioning with instancing

greg.haskins (Tue, 01 Aug 2017 03:08:08 GMT):
I can take foo:v1 and deploy it as instance bar and baz

greg.haskins (Tue, 01 Aug 2017 03:08:24 GMT):
I can then write foo:v2 and upgrade instance baz

greg.haskins (Tue, 01 Aug 2017 03:08:38 GMT):
but I still only have two instances: bar and baz

greg.haskins (Tue, 01 Aug 2017 03:08:52 GMT):
make sense?

wy (Tue, 01 Aug 2017 03:08:56 GMT):
this is an example of how i invoke a chaincode (as per the first-network example)

wy (Tue, 01 Aug 2017 03:09:00 GMT):
```peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -c '{"Args":["transFund","a","b","10"]}'```

wy (Tue, 01 Aug 2017 03:09:14 GMT):
how can i specify which instance i am running it on?

greg.haskins (Tue, 01 Aug 2017 03:09:19 GMT):
right...so "mycc" is your context

greg.haskins (Tue, 01 Aug 2017 03:09:37 GMT):
that is essentially identifying the instance you are targeting your invoke at

wy (Tue, 01 Aug 2017 03:09:55 GMT):
ohh i see

greg.haskins (Tue, 01 Aug 2017 03:10:13 GMT):
v1.0 has a bit of a limiting namespace: its all flat

wy (Tue, 01 Aug 2017 03:10:21 GMT):
so you are saying that i can have multiple installations of the same chaincode with a different name, which creates different instances?

greg.haskins (Tue, 01 Aug 2017 03:10:23 GMT):
but its a namespace nonetheless

greg.haskins (Tue, 01 Aug 2017 03:10:28 GMT):
yes

wy (Tue, 01 Aug 2017 03:10:37 GMT):
that makes sense

greg.haskins (Tue, 01 Aug 2017 03:10:39 GMT):
the name is your instance identifier

wy (Tue, 01 Aug 2017 03:10:55 GMT):
cool

wy (Tue, 01 Aug 2017 03:11:23 GMT):
so a newbie question, where should i define the queue in terms of the code?

wy (Tue, 01 Aug 2017 03:12:16 GMT):
should it be within the invoke function?

wy (Tue, 01 Aug 2017 03:16:03 GMT):
another thing is, where is this instance the chaincode running? will it be affected if a peer drops? will a new peer who just joined the channel be able to see the queue? @greg.haskins

greg.haskins (Tue, 01 Aug 2017 03:17:04 GMT):
think of a chaincode instance as a long running process...it can respond to invoke() requests, and it can store state in its database

greg.haskins (Tue, 01 Aug 2017 03:17:38 GMT):
so, how you structure your state will be up to you, but normally its a combination of init() and invokes() that shape it

greg.haskins (Tue, 01 Aug 2017 03:18:17 GMT):
the instance is supposed to be running on any peer that is a designated endorser for your instance

greg.haskins (Tue, 01 Aug 2017 03:19:37 GMT):
as far as peer drops, etc, the entire point of blockchain is to present a byzantine resistant network, and handling drops/rejoins is part of the fundamental operation

wy (Tue, 01 Aug 2017 03:19:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=G87JCurtuq8zvaLtZ) @greg.haskins so do you mean that the queue should stored in the state? from what i understand the state is only made up of key value pairs

greg.haskins (Tue, 01 Aug 2017 03:20:10 GMT):
define "queue"

wy (Tue, 01 Aug 2017 03:21:48 GMT):
what i need is a priority queue which stores failed transactions ordered by different priorities

greg.haskins (Tue, 01 Aug 2017 03:22:16 GMT):
what I am getting at is: a queue is just a data structure

greg.haskins (Tue, 01 Aug 2017 03:22:40 GMT):
you can model a queue on a kv-store (as well as many other data structures)

wy (Tue, 01 Aug 2017 03:23:08 GMT):
alright so maybe i should clarify

wy (Tue, 01 Aug 2017 03:23:19 GMT):
is there a way to use built in data structures?

wy (Tue, 01 Aug 2017 03:23:21 GMT):
such as https://golang.org/pkg/container/heap/

greg.haskins (Tue, 01 Aug 2017 03:23:30 GMT):
you would have to serialize it

wy (Tue, 01 Aug 2017 03:24:15 GMT):
and having the contents of the data structure not destroyed between invoke calls

greg.haskins (Tue, 01 Aug 2017 03:24:20 GMT):
generally, it would probably be better to use something specifically created to work with fabric's kv-store than try to use an existing library though

greg.haskins (Tue, 01 Aug 2017 03:24:40 GMT):
the only legal persistence layer you can use is the kv-store

greg.haskins (Tue, 01 Aug 2017 03:25:04 GMT):
if you try to persist state in other ways, your code likely wont be deterministic

wy (Tue, 01 Aug 2017 03:25:10 GMT):
so do you have any suggestions as to how a priority queue can be implemented using the kv store?

greg.haskins (Tue, 01 Aug 2017 03:26:20 GMT):
typically its done by synthesizing a few different indices into the kv-namespace and using range queuries

greg.haskins (Tue, 01 Aug 2017 03:26:49 GMT):
with the introduction of couchdb in the latest release, there may be built-in ways to do this, but I havent written an app on top of couchdb yet to say for sure

wy (Tue, 01 Aug 2017 03:27:26 GMT):
are there any examples of this i can possibly take a look at?

greg.haskins (Tue, 01 Aug 2017 03:27:28 GMT):
but what I can say is: you def want to be thinking about your persistence layer solely in terms of the provided kv layer

greg.haskins (Tue, 01 Aug 2017 03:27:59 GMT):
otherwise your app may hold state that was aborted and that would be bad

greg.haskins (Tue, 01 Aug 2017 03:28:18 GMT):
not sure, quite possibly

wy (Tue, 01 Aug 2017 03:28:37 GMT):
i see

wy (Tue, 01 Aug 2017 03:29:00 GMT):
appreciate the advice :)

greg.haskins (Tue, 01 Aug 2017 03:29:10 GMT):
any time

PushpalathaHiremath (Tue, 01 Aug 2017 05:40:55 GMT):
Hi All, I observed that the usage of random number and current time in milliseconds in the chain code will result into mismatch of read write sets. Do we have any alternative to make use of same random number/ time on all the peers? Any clue / advice is appreciated. Thanks.

mastersingh24 (Tue, 01 Aug 2017 09:20:32 GMT):
@PushpalathaHiremath - What exactly are you trying to use the random number for? It would be possible to have your client generate the random number and include it in the transient field in your invoke proposal and then extract it in chaincode using https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetTransient

mastersingh24 (Tue, 01 Aug 2017 09:20:53 GMT):
This way all peers would get the same random value

bdufour (Tue, 01 Aug 2017 09:21:09 GMT):
Has joined the channel.

bdufour (Tue, 01 Aug 2017 09:45:15 GMT):

Message Attachments

bdufour (Tue, 01 Aug 2017 09:45:15 GMT):

Message Attachments

UDeshmukh (Tue, 01 Aug 2017 10:02:01 GMT):
Has joined the channel.

wy (Tue, 01 Aug 2017 10:05:54 GMT):
hi, are there any examples of how a composite key would look like?

chaitanya (Tue, 01 Aug 2017 10:07:21 GMT):
Hi, I am facing a problem on trying to instantiate chaincodes. The install goes through without any errors but when I try to instantiate, I get the following error, saying it couldn't find packages. ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/document_manager_chaincode.go:11:2: cannot find package "documenteventmanager" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/vendor/documenteventmanager (vendor tree) /opt/go/src/documenteventmanager (from $GOROOT) /chaincode/input/src/documenteventmanager (from $GOPATH) /opt/gopath/src/documenteventmanager chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/document_manager_chaincode.go:12:2: cannot find package "documentmanager" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/vendor/documentmanager (vendor tree) /opt/go/src/documentmanager (from $GOROOT) /chaincode/input/src/documentmanager (from $GOPATH) /opt/gopath/src/documentmanager " ```

chaitanya (Tue, 01 Aug 2017 10:08:36 GMT):
I'm using Fabric-v1.0.0- rc1 and this chaincode used to instantiate alright with alpha2 version. @jtsiros Hi, I think you've had a similar error. Could you please help me with this?

muralisr (Tue, 01 Aug 2017 11:27:14 GMT):
@chaitanya you may want to vendor "documenteventmanager", "documentmanager" and any other packages with the chaincodebefore you install

muralisr (Tue, 01 Aug 2017 11:27:14 GMT):
@chaitanya you may want to vendor "documenteventmanager", "documentmanager" and any other packages with the chaincodebefore you install ... https://www.youtube.com/watch?v=-mlUaJbFHcM should help

kletkeman (Tue, 01 Aug 2017 15:02:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=M2PkaQHKeWjRagbw6) @akashmar In the v0.6 time frame, the GOPATH was used by the vagrant environment and related scripts as part of a path. This was a mistake I think because the GOPATH should be able to contain multiple entries, which is mandatory if you choose to create platform for common code and then import it to your chaincode. I did that and found that things worked best if I brought up a new environment from scratch and then manually exported the updated GOPATH in my shells. Worked pretty well, but was a bit of a hassle. I have not done golang development on chaincode for v1 in months, and so I don't know if there are other bad assumptions for the GOPATH, but since it lasted for a year in that state my guess is that it is still like that in some way or other. If you need entries on GOPATH, you might try setting it inside the shells you are using. Just a thought ...

hcw (Tue, 01 Aug 2017 18:20:37 GMT):
Has joined the channel.

chaitanya (Wed, 02 Aug 2017 06:20:36 GMT):
@muralisr Thanks for the video link- that really helped. I am able to get the executable from `go build` inside the cli container and outside too. Yet, when I try to instantiate chaincode using the `peer chaincode instantiate ...` command, it fails, reporting the same errors.

chaitanya (Wed, 02 Aug 2017 06:20:36 GMT):
@muralisr Thanks for the video link- that really helped. I am able to get the executable after running `go build` inside the cli container and outside too. Yet, when I try to instantiate chaincode using the `peer chaincode instantiate ...` command, it fails, reporting the same errors.

chaitanya (Wed, 02 Aug 2017 06:22:37 GMT):
Also, I realize that it's trying to look for files in a path starting with `/chaincode/input/src/github.com/`, while what I have in the container is `/opt/gopath/src/github.com/` (And I don't even have a `/chaincode/input/...` path)..What am I missing here?

chaitanya (Wed, 02 Aug 2017 06:22:37 GMT):
Also, I realize that it's trying to look for files in a path starting with `/chaincode/input/src/github.com/`, while what I have in the container is `/opt/gopath/src/github.com/` (And I don't even have a `/chaincode/input/...` path)..What am I missing here? From within the cli container, ```echo $GOPATH /opt/gopath```

chaitanya (Wed, 02 Aug 2017 06:22:37 GMT):
Also, I realize that it's trying to look for files in a path starting with `/chaincode/input/src/github.com/`, while what I have in the container is `/opt/gopath/src/github.com/` (And I don't even have a `/chaincode/input/...` path)..What am I missing here? From within the cli container, ```# echo $GOPATH /opt/gopath```

gary_zhan (Wed, 02 Aug 2017 07:11:35 GMT):
Has joined the channel.

wy (Wed, 02 Aug 2017 09:59:16 GMT):
@muralisr Hi, i notice that after upgrading my code, the container for the previous version is still there, is this normal?

muralisr (Wed, 02 Aug 2017 11:49:56 GMT):
@chaitanya the paths refer to paths in chaincode container (which get created as part of the build) and not CLI or peer containers. With regards to the error, I wonder if its trying to build of the previous install... can you clean up your env (remove old installed files, remove previous chaincode images etc) and try ?

chaitanya (Wed, 02 Aug 2017 11:50:54 GMT):
@muralisr I had tried pulling the network down and up again. Could you suggest me what more I need to do, in order to cleanup files?

chaitanya (Wed, 02 Aug 2017 11:50:54 GMT):
@muralisr I had pulled the network down and up again. Could you suggest me what more I need to do, in order to cleanup files?

muralisr (Wed, 02 Aug 2017 11:53:13 GMT):
@wy yes, thats normal... the upgraded chaincode could be selectively applied on a subset of channels so the older CC could be serving others

muralisr (Wed, 02 Aug 2017 11:53:13 GMT):
@wy yes, thats normal... the upgraded chaincode could be selectively applied on a subset of channels so the older CC could be serving others.

muralisr (Wed, 02 Aug 2017 11:53:13 GMT):
@wy yes, thats normal... the upgraded chaincode could be selectively applied on a subset of channels so the older CC could be serving others. There's a JIRA for inactive chaincodes to be brought down after user specified "inactive" time period which will ensure unused chaincodes will go away. For now, you can just kill the older chaincode if its unused

muralisr (Wed, 02 Aug 2017 11:56:46 GMT):
@chaitanya that should do it. I'm not sure what you are running into. So you have completely vendored everything in the chaincode to be totally self contained and installed that CC ?

chaitanya (Wed, 02 Aug 2017 11:57:29 GMT):
Yes, following the video link you mentioned. I see all of my dependencies mentioned in the vendor.json file too.

chaitanya (Wed, 02 Aug 2017 11:58:56 GMT):
However, if you look at the output of $GOPATH in the container, it says `/opt/gopath/`. Is that expected, or should it be something like `/chaincode/input....`

chaitanya (Wed, 02 Aug 2017 11:58:56 GMT):
@muralisr However, if you look at the output of $GOPATH in the container, it says `/opt/gopath/`. Is that expected, or should it be something like `/chaincode/input....`?

wy (Wed, 02 Aug 2017 12:00:12 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=k47qpH2XXXYgyewEH) @muralisr will leaving the container on be of any security concern?

muralisr (Wed, 02 Aug 2017 12:03:05 GMT):
@wy more of a resource concern

muralisr (Wed, 02 Aug 2017 12:03:54 GMT):
@chaitanya which container are you refering to ... the CLI ?

chaitanya (Wed, 02 Aug 2017 12:04:11 GMT):
@muralisr Yes, the cli container

muralisr (Wed, 02 Aug 2017 12:05:30 GMT):
that should be /opt/gopath... note that the CLI container is not used to build the chaincode (ie, "go build" does not happen on the CLI container)

chaitanya (Wed, 02 Aug 2017 12:07:30 GMT):
So is there something wrong with my vendoring then? The external packages I'm using are simply in the following directory structure, `vendor/documentmanager/documentmanager.go`

muralisr (Wed, 02 Aug 2017 12:14:27 GMT):
what is the "import" for "documentmanager" in the CC ?

chaitanya (Wed, 02 Aug 2017 12:15:10 GMT):
`dm "documentmanager"`

muralisr (Wed, 02 Aug 2017 12:15:16 GMT):
ok

muralisr (Wed, 02 Aug 2017 12:16:44 GMT):
that looks right. are you sure the "path install -p ///

muralisr (Wed, 02 Aug 2017 12:16:44 GMT):
that looks right. are you sure the -p in "path install -p ..." is resolving to the right chaincode ?

chaitanya (Wed, 02 Aug 2017 12:18:23 GMT):
yes, I just checked that too.

muralisr (Wed, 02 Aug 2017 12:21:54 GMT):
if you copy the chaincode to a new folder outside of the current gopath (say /home/me/testcc/src/mycc) set GOPATH=/home/me/testcc , cd /home/me/testcc/src/mycc and do a `go build` there

muralisr (Wed, 02 Aug 2017 12:22:05 GMT):
does it build ?

muralisr (Wed, 02 Aug 2017 12:23:04 GMT):
if it does, it should just work when you install too

muralisr (Wed, 02 Aug 2017 12:23:04 GMT):
if it does, it should just work when you do it from CLI too assuming the correct chaincode is picked up from gopath

chaitanya (Wed, 02 Aug 2017 12:24:16 GMT):
It builds when it's pasted within my Fabric clone for sure. I'll need to try copying it outside of that clone and check.

muralisr (Wed, 02 Aug 2017 12:25:04 GMT):
right, isolating the CC and trying would be key

muralisr (Wed, 02 Aug 2017 12:25:50 GMT):
need to step away ... can check back later

chaitanya (Wed, 02 Aug 2017 12:28:52 GMT):
Sure, thanks!

chaitanya (Wed, 02 Aug 2017 12:51:14 GMT):
@muralisr Just tried `go build` outside of my Fabric clone and that worked well. Within the `cli` container it still throws the error though.

chaitanya (Wed, 02 Aug 2017 12:51:16 GMT):
```Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/document_manager_chaincode.go:11:2: cannot find package "documenteventmanager" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/vendor/documenteventmanager (vendor tree) /opt/go/src/documenteventmanager (from $GOROOT) /chaincode/input/src/documenteventmanager (from $GOPATH) /opt/gopath/src/documenteventmanager chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/document_manager_chaincode.go:12:2: cannot find package "documentmanager" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/vendor/documentmanager (vendor tree) /opt/go/src/documentmanager (from $GOROOT) /chaincode/input/src/documentmanager (from $GOPATH) /opt/gopath/src/documentmanager " ```

muralisr (Wed, 02 Aug 2017 13:29:04 GMT):
@chaitanya ` cannot find package "documenteventmanager" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/gtd/secure-doc-store-chaincode/src/document_manager/vendor/documenteventmanager `

muralisr (Wed, 02 Aug 2017 13:30:07 GMT):
it is trying to look in "vendor/documenteventmanager" but not finding it

muralisr (Wed, 02 Aug 2017 13:30:10 GMT):
wonder why

bdufour (Wed, 02 Aug 2017 13:39:01 GMT):
Hi all, is it possible to reset a StateQueryIteratorInterface, so I can loop a second time with the same iterator? In the interface I do not see this function...If it is not possible, should I do a get state again to get a new iterator or should I save all results in an array so I can loop over them again as many times I want? What do you suggest? Thanks a lot!

gbolo (Wed, 02 Aug 2017 15:29:45 GMT):
hey all, does anyone have a problem vendoring packages into chaincode when you want to init the cc? ``` 2017-08-02 15:26:27.825 UTC [dockercontroller] deployImage -> ERRO 045 Error building images: Failed to generate platform-specific docker build: Error returned from build: ... ... testcc/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go:15: missing function body for "cswap" ... ```

gbolo (Wed, 02 Aug 2017 15:32:55 GMT):
@muralisr any thoughts?

muralisr (Wed, 02 Aug 2017 15:33:57 GMT):
@gbolo does the package contain non-go files (say ".s", ".h" etc) ?

muralisr (Wed, 02 Aug 2017 15:33:57 GMT):
@gbolo does the package contain non-go files (say ".s")

gbolo (Wed, 02 Aug 2017 15:34:28 GMT):
let me check, its a an official golang package

muralisr (Wed, 02 Aug 2017 15:34:41 GMT):
ok

gbolo (Wed, 02 Aug 2017 15:35:09 GMT):
https://github.com/golang/crypto/blob/master/curve25519/mont25519_amd64.go

gbolo (Wed, 02 Aug 2017 15:36:13 GMT):
there is some of those: https://github.com/golang/crypto/tree/master/curve25519

gbolo (Wed, 02 Aug 2017 15:36:43 GMT):
hmm so how do deploy this properly then?

muralisr (Wed, 02 Aug 2017 15:36:51 GMT):
`These functions are implemented in the .s files` ... those files get filtered out (tagging @greg.haskins too )

gbolo (Wed, 02 Aug 2017 15:38:05 GMT):
strangely enough, this cc was able to be inited on alpha1

gbolo (Wed, 02 Aug 2017 15:38:15 GMT):
did some logic change for 1.0 GA?

gbolo (Wed, 02 Aug 2017 15:38:32 GMT):
perhaps in the intermediate conatiners like ccenv exc.

muralisr (Wed, 02 Aug 2017 15:43:21 GMT):
around early june I think

muralisr (Wed, 02 Aug 2017 15:43:41 GMT):
there was some discussion on adding ".s" files and such

muralisr (Wed, 02 Aug 2017 15:43:49 GMT):
let me see if there's a JIRA for that

muralisr (Wed, 02 Aug 2017 15:48:36 GMT):
can you create one ? ... or I can @gbolo

greg.haskins (Wed, 02 Aug 2017 15:49:05 GMT):
yeah, we need to add .s files

greg.haskins (Wed, 02 Aug 2017 15:49:17 GMT):
i swear I took a stab at this already in the v1.0 rush

greg.haskins (Wed, 02 Aug 2017 15:49:21 GMT):
might have been dropped

greg.haskins (Wed, 02 Aug 2017 15:49:38 GMT):
in my defense, I was on the beach at the time, heh

muralisr (Wed, 02 Aug 2017 15:50:32 GMT):
@greg.haskins not at all :-) ... slipped off my brain too

greg.haskins (Wed, 02 Aug 2017 15:52:30 GMT):
btw: that filtering wasnt introduced recently

greg.haskins (Wed, 02 Aug 2017 15:52:42 GMT):
it was a long time ago IIRC

greg.haskins (Wed, 02 Aug 2017 15:53:00 GMT):
im pretty sure all v1.0.0-xxx releases would have behaved the same way

greg.haskins (Wed, 02 Aug 2017 15:53:48 GMT):
so, this was part of the v1.0 rush that I am thinking of: https://gerrit.hyperledger.org/r/#/c/11445/

greg.haskins (Wed, 02 Aug 2017 15:53:53 GMT):
but that didnt change the filter spec

gbolo (Wed, 02 Aug 2017 16:04:54 GMT):
@muralisr @greg.haskins so you would like me to create a ticket for adding .s files?

greg.haskins (Wed, 02 Aug 2017 16:05:06 GMT):
@gbolo yes pls

gbolo (Wed, 02 Aug 2017 16:05:28 GMT):
ok, do i assign it to you?

greg.haskins (Wed, 02 Aug 2017 16:05:41 GMT):
sure, unless you would like to submit the fix

greg.haskins (Wed, 02 Aug 2017 16:06:04 GMT):
(not sure if you are an active contributor or would like to be one, but its a trivial fix and a good way to get introduced to the process)

gbolo (Wed, 02 Aug 2017 16:06:10 GMT):
Wish I knew how, unfortunately im not a dev

greg.haskins (Wed, 02 Aug 2017 16:06:12 GMT):
otherwise, i can fix quick

greg.haskins (Wed, 02 Aug 2017 16:06:18 GMT):
ok, assign to me then

gbolo (Wed, 02 Aug 2017 16:06:54 GMT):
Thanks @greg.haskins if this is a small change, i should be able to create a patch for it on 1.0.0 GA correct?

greg.haskins (Wed, 02 Aug 2017 16:07:20 GMT):
yes, its small

greg.haskins (Wed, 02 Aug 2017 16:07:21 GMT):
one liner

gbolo (Wed, 02 Aug 2017 16:07:26 GMT):
excellent

greg.haskins (Wed, 02 Aug 2017 16:07:35 GMT):
do you mean you wish to fork v1.0, patch, and build locally?

greg.haskins (Wed, 02 Aug 2017 16:07:48 GMT):
or did you mean you would like it in the next v1.0.x release?

gbolo (Wed, 02 Aug 2017 16:08:11 GMT):
I will create my own patch for local use, our devs are on 1.0 GA

greg.haskins (Wed, 02 Aug 2017 16:08:21 GMT):
ok, follow up

greg.haskins (Wed, 02 Aug 2017 16:08:39 GMT):
what do you use to create your deployment payload? (e.g. CLI, node-sdk, etc)

greg.haskins (Wed, 02 Aug 2017 16:08:55 GMT):
(it might need to be patched in both the client and server

gbolo (Wed, 02 Aug 2017 16:09:21 GMT):
for packaging and deploying cc i use the peer binary. so i guess your change will fix it for both server and client

greg.haskins (Wed, 02 Aug 2017 16:09:42 GMT):
correct

gbolo (Wed, 02 Aug 2017 16:09:57 GMT):
much appreciate btw. ill create the ticket shortly

greg.haskins (Wed, 02 Aug 2017 16:10:19 GMT):
if you want to patch locally, I _think_ you just need to modify this: https://github.com/hyperledger/fabric/blob/release/core/chaincode/platforms/golang/package.go#L32

greg.haskins (Wed, 02 Aug 2017 16:11:12 GMT):
I just looked at the server side, I think its more permissive

greg.haskins (Wed, 02 Aug 2017 16:11:23 GMT):
(so you only need the client side patched, which for you is the peer CLI)

greg.haskins (Wed, 02 Aug 2017 16:12:25 GMT):
i also think I misunderstood you when you said that you'll patch....i thought you meant you would write the patch, but I think now that you meant you will apply the patch I write

greg.haskins (Wed, 02 Aug 2017 16:12:27 GMT):
which is totally fine

greg.haskins (Wed, 02 Aug 2017 16:12:59 GMT):
actually it will help get the patch submitted if your team confirms it actually works

greg.haskins (Wed, 02 Aug 2017 16:13:12 GMT):
so, ill push the CR and you can test?

gbolo (Wed, 02 Aug 2017 16:13:54 GMT):
yes I will test it immediatly

gbolo (Wed, 02 Aug 2017 16:14:25 GMT):
creating ticket now...

gbolo (Wed, 02 Aug 2017 16:21:16 GMT):
@greg.haskins https://jira.hyperledger.org/browse/FAB-5586

gbolo (Wed, 02 Aug 2017 16:23:03 GMT):
I hope the description is OK. if not, let me know if it needs to be changed

toddinpal (Wed, 02 Aug 2017 16:34:56 GMT):
The Hyperledger Fabric Model (http://hyperledger-fabric.readthedocs.io/en/latest/fabric_model.html#privacy-through-channels) describes privacy via channels and goes on to suggest that values can be encrypted by the chaincode. How is this done in practice? Where would the encryption key come from?

gbolo (Wed, 02 Aug 2017 18:17:37 GMT):
@greg.haskins after patching on client side I get this: ``` 2017-08-02 18:15:50.679 UTC [chaincode] processStream -> ERRO 044 Got error: Failed extracting proposal fields. [Could not extract the channel header from the proposal: UnmarshalChannelHeader failed, err proto: bad wiretype for field common.ChannelHeader.Type: got wiretype 2, want 0] ```

gbolo (Wed, 02 Aug 2017 18:25:49 GMT):
hmm maybe not related...

gyanalakshmi (Wed, 02 Aug 2017 19:46:34 GMT):
Has joined the channel.

gyanalakshmi (Wed, 02 Aug 2017 19:47:14 GMT):
Hi, my cli container does not start up when I run the docker-compose-simple.yaml

gyanalakshmi (Wed, 02 Aug 2017 19:47:27 GMT):
Can someone help me out?

hamptonsmith (Thu, 03 Aug 2017 00:54:19 GMT):
Has joined the channel.

masonhensley (Thu, 03 Aug 2017 03:39:56 GMT):
Has joined the channel.

chaitanya (Thu, 03 Aug 2017 05:28:46 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=453zWERfTR9YKizJk) @muralisr This is more of a Golang question, but is it necessary for the package documenteventmanager to be of the form, `vendor/github.com/documenteventmanager/documentevent,anager.go`, or would `vendor/documenteventmanager/documenteventmanager.go` would work just as well?

chaitanya (Thu, 03 Aug 2017 05:28:46 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=453zWERfTR9YKizJk) @muralisr This is more of a Golang question, but is it necessary for the package documenteventmanager to be of the form, `vendor/github.com/documenteventmanager/documenteventmanager.go`, or would `vendor/documenteventmanager/documenteventmanager.go` work just as well?

Madhavi Elamandyam (Thu, 03 Aug 2017 07:06:03 GMT):
Has joined the channel.

ranjan008 (Thu, 03 Aug 2017 11:27:50 GMT):
I am trying to run my chaincode in dev mode but I am getting an rpc error which is below ERRO 003 Received error from server: rpc error: code = 13 desc = transport is closing, ending chaincode stream

muralisr (Thu, 03 Aug 2017 11:56:52 GMT):
@chaitanya `vendor/documenteventmanager/documenteventmanager.go` should work

VIVEKTIWARI (Thu, 03 Aug 2017 18:03:35 GMT):
Has joined the channel.

tprafull (Thu, 03 Aug 2017 18:20:48 GMT):
Has joined the channel.

yoyokeen (Fri, 04 Aug 2017 02:56:31 GMT):
Has joined the channel.

rajasekharpippalla (Fri, 04 Aug 2017 06:53:48 GMT):
i have done hyperledgerfabric-1.0 setup with chaincode_example02 go file and able to run everything... but i am unable to change that go file with my own file ... any body pls help me on this

plee (Fri, 04 Aug 2017 19:38:11 GMT):
Has joined the channel.

gbolo (Fri, 04 Aug 2017 20:09:50 GMT):
@greg.haskins @muralisr some +1's would be nice: https://gerrit.hyperledger.org/r/#/c/12153/

muralisr (Fri, 04 Aug 2017 21:48:29 GMT):
done @gbolo ...need one more +2 and merge

muralisr (Fri, 04 Aug 2017 21:48:29 GMT):
done @gbolo ...need one more +2 for merge

rohitrocket (Sun, 06 Aug 2017 07:05:56 GMT):
Has joined the channel.

FrankShikhaliev (Sun, 06 Aug 2017 11:21:49 GMT):
Has joined the channel.

rajasekharpippalla (Sun, 06 Aug 2017 12:22:16 GMT):
Anyone know how to show peer communication in Front End Using java

Eric.Bui (Sun, 06 Aug 2017 16:30:13 GMT):
Has joined the channel.

ymonk (Mon, 07 Aug 2017 02:16:49 GMT):
Has joined the channel.

dileban (Mon, 07 Aug 2017 02:29:40 GMT):
Has joined the channel.

Farit (Mon, 07 Aug 2017 08:34:08 GMT):
Has joined the channel.

ancythomas (Mon, 07 Aug 2017 12:34:12 GMT):
Has joined the channel.

samuel.alencar (Mon, 07 Aug 2017 15:52:48 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7NsajN6d6KuqFLo2T) @rajasekharpippalla i guess the correct channel is composer-dev.

samuel.alencar (Mon, 07 Aug 2017 16:23:45 GMT):
or fabric-java-chaincode...

Eric.Bui (Mon, 07 Aug 2017 16:55:32 GMT):
Hi can I write a chaincode by C++?

mavstronaut (Tue, 08 Aug 2017 04:03:02 GMT):
Has joined the channel.

DarshanBc (Tue, 08 Aug 2017 07:17:47 GMT):
Has joined the channel.

DarshanBc (Tue, 08 Aug 2017 07:18:51 GMT):
Hi In fabcar sample if I have to query car by owner name how do it

DarshanBc (Tue, 08 Aug 2017 07:18:51 GMT):
Hi Can I get state of the ledger by value instead of keys

DarshanBc (Tue, 08 Aug 2017 08:06:15 GMT):
how to enroll users

DarshanBc (Tue, 08 Aug 2017 10:19:20 GMT):
I have written a function which will be called when a query function is invoked I am getting error as undefined function name

DarshanBc (Tue, 08 Aug 2017 10:55:27 GMT):
Error: Error endorsing invoke: rpc error: code = Unknown desc = Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) -

DarshanBc (Tue, 08 Aug 2017 10:55:49 GMT):
I am getting this error while installing chaincode

xinlinw (Tue, 08 Aug 2017 21:26:55 GMT):
Has joined the channel.

lancelot186 (Wed, 09 Aug 2017 02:49:54 GMT):
Has joined the channel.

medhak19 (Wed, 09 Aug 2017 07:14:31 GMT):
Has joined the channel.

asadhayat (Wed, 09 Aug 2017 08:11:45 GMT):
I am following fabric documentation (Chaincode for developers, http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html)... When i issue `docker-compose -f docker-compose-simple.yaml up` i get the error below.. ``` ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60). ``` I have increased COMPOSE_HTTP_TIMEOUT value upto 500, but the error occurs continuously. Internet connection is fine...

DarshanBc (Wed, 09 Aug 2017 09:02:02 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) -

asadhayat (Wed, 09 Aug 2017 12:40:25 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jJzGcg6DiJeqW9BjG) I have found a way around above problem by disabling/commenting `tty : true` in `$GOPATH/src/github.com/fabric-samples/chaincode-docker-devmode/docker-compose-simple.yaml` But now when i run `docker exec -it chaincode bash` it gives error, `Error response from daemon: Container 20c5bba37c50d378ebf5b130471ea202dcaf2114fe580573bfd0f44e000f8a3d is not running` the logs of `docker-compose -f docker-compose-simple.yaml up` are as follow ``` Starting orderer Starting peer Starting cli Starting chaincode Attaching to orderer, peer, cli, chaincode orderer | 2017-08-09 12:23:05.818 UTC [orderer/main] main -> INFO 001 Starting orderer: orderer | Version: 1.0.0 orderer | Go version: go1.7.5 orderer | OS/Arch: linux/amd64 peer | 2017-08-09 12:23:08.616 UTC [nodeCmd] serve -> INFO 001 Starting peer: ...... ..... ..... orderer | 2017-08-09 12:23:10.480 UTC [orderer/configupdate] Process -> DEBU 1a1 Processing channel reconfiguration request for channel myc orderer | 2017-08-09 12:23:10.481 UTC [common/configtx] addToMap -> DEBU 1a2 Adding to config map: [Groups] /Channel cli | Error: Got unexpected status: BAD_REQUEST orderer | 2017-08-09 12:23:10.481 UTC [common/configtx] addToMap -> DEBU 1a3 Adding to config map: [Groups] /Channel/Application orderer | 2017-08-09 12:23:10.481 UTC [common/configtx] addToMap -> DEBU 1a4 Adding to config map: [Groups] /Channel/Application/SampleOrg orderer | 2017-08-09 12:23:10.481 UTC [common/configtx] addToMap -> DEBU 1a5 Adding to config map: [Values] /Channel/Consortium orderer | 2017-08-09 12:23:10.481 UTC [orderer/common/broadcast] Handle -> WARN 1a6 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 orderer | 2017-08-09 12:23:10.481 UTC [orderer/main] func1 -> DEBU 1a7 Closing Broadcast stream cli | Usage: cli | peer channel create [flags] cli | cli | Flags: cli | -c, --channelID string In case of a newChain command, the channel ID to create. cli | -f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer cli | -t, --timeout int Channel creation timeout (default 5) cli | cli | Global Flags: cli | --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint cli | --logging-level string Default logging level and overrides, see core.yaml for full syntax cli | -o, --orderer string Ordering service endpoint cli | --test.coverprofile string Done (default "coverage.cov") cli | --tls Use TLS when communicating with the orderer endpoint cli | -v, --version Display current version of fabric peer server cli | orderer | 2017-08-09 12:23:10.484 UTC [orderer/common/deliver] Handle -> WARN 1a8 Error reading from stream: rpc error: code = Canceled desc = context canceled orderer | 2017-08-09 12:23:10.484 UTC [orderer/main] func1 -> DEBU 1a9 Closing Deliver stream cli exited with code 1 ```

zhuxubin01 (Thu, 10 Aug 2017 03:34:47 GMT):
Has joined the channel.

zhuxubin01 (Thu, 10 Aug 2017 06:27:11 GMT):
somebody tested chaincode upgrade by cli ? I have 4 peers ,and upgrade peer0, and query peer0,it is no problem,but when I query in peer1,it occurs error

zhuxubin01 (Thu, 10 Aug 2017 06:27:34 GMT):

Message Attachments

zhuxubin01 (Thu, 10 Aug 2017 06:28:13 GMT):
anybody who can kindly help me

GongZhang (Thu, 10 Aug 2017 07:06:59 GMT):
Has joined the channel.

preetinair (Thu, 10 Aug 2017 08:47:34 GMT):
Has joined the channel.

preetinair (Thu, 10 Aug 2017 08:47:53 GMT):
I am getting this error while executing make dist-clean all command $ make dist-clean all 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 /usr/bin/cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file or directory make: *** [build/image/ccenv/payload] Error 1

preetinair (Thu, 10 Aug 2017 08:47:59 GMT):
can some one help me

preetinair (Thu, 10 Aug 2017 08:56:54 GMT):
previously i got this error

preetinair (Thu, 10 Aug 2017 08:56:55 GMT):
$ make dist-clean all Installing chaintool curl -fL https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/chaintool-1.0.0/hyperledger-fabric-chaintool-1.0.0.jar > build/bin/chaintool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 15.5M 100 15.5M 0 0 246k 0 0:01:04 0:01:04 --:--:-- 262k chmod +x build/bin/chaintool Creating build/goshim.tar.bz2 /bin/sh: /c/Program Files/Git/usr/bin/tar: Bad file number make: *** [build/goshim.tar.bz2] Error 126

CodeReaper (Thu, 10 Aug 2017 09:16:20 GMT):
Has joined the channel.

CodeReaper (Thu, 10 Aug 2017 09:17:29 GMT):
Hey can anyone give me good examples of using GetHistoryForKey, can I send the result back converting it in bytes?

CodeReaper (Thu, 10 Aug 2017 09:25:05 GMT):
and what does the result comprise off?

CodeReaper (Thu, 10 Aug 2017 09:25:05 GMT):
and what does the result comprise of?

arunselvam (Thu, 10 Aug 2017 10:41:47 GMT):
Has joined the channel.

shanemontague (Thu, 10 Aug 2017 10:55:14 GMT):
Has joined the channel.

CodeReaper (Thu, 10 Aug 2017 12:25:11 GMT):
To retrieve all the values a key has had, do I have to retrieve all the txid I got from getHistoryForKey and then go to the payload of each and read the value of it? or is there any shorter way?

niteshsolanki (Thu, 10 Aug 2017 12:25:35 GMT):
Has joined the channel.

niteshsolanki (Thu, 10 Aug 2017 12:26:16 GMT):
Can we write the output of a logger to a file instead of standard output ?

niteshsolanki (Thu, 10 Aug 2017 12:26:16 GMT):
Can we write the output of a logger inside the Chaincode to a file instead of standard output ?

ancythomas (Thu, 10 Aug 2017 12:53:28 GMT):
Hi .. can someone please tell me,, if an external json config file, be accessed from chaincode program. If yes, how? I have already tried using os.Open() and io/ioutil.ReadFile(). But, both are getting error that,,no such file exists.

hamptonsmith (Thu, 10 Aug 2017 17:07:14 GMT):
Has left the channel.

dcmartin (Fri, 11 Aug 2017 05:47:09 GMT):
Has joined the channel.

crazyquark (Fri, 11 Aug 2017 07:34:48 GMT):
Has joined the channel.

crazyquark (Fri, 11 Aug 2017 07:34:55 GMT):
morning everyone

crazyquark (Fri, 11 Aug 2017 07:35:07 GMT):
I am looking for a sample on how to unit test chaincode on HL 1.0

crazyquark (Fri, 11 Aug 2017 07:35:19 GMT):
seems the shim.MockStub interface has changed completely

crazyquark (Fri, 11 Aug 2017 07:35:26 GMT):
any help would be appreciated

CodeReaper (Fri, 11 Aug 2017 12:42:24 GMT):
Was wondering how to use stub.ReadCertAttribute in hyperledger 1.0. Is it deprecated?? Doesnt seem to work anymore. A simple yes or no would suffice.

CodeReaper (Fri, 11 Aug 2017 12:42:24 GMT):
Was wondering how to use stub.ReadCertAttribute in hyperledger 1.0. Is it deprecated?? Doesnt seem to work anymore.

crazyquark (Fri, 11 Aug 2017 13:37:03 GMT):
yup, it's gone

crazyquark (Fri, 11 Aug 2017 13:37:09 GMT):
I am also trying this

crazyquark (Fri, 11 Aug 2017 13:37:16 GMT):
you need to use GetCreator()

crazyquark (Fri, 11 Aug 2017 13:37:29 GMT):
but I am struggling to decode the raw bytes sent

crazyquark (Fri, 11 Aug 2017 13:37:35 GMT):
seems to be a certificate

crazyquark (Fri, 11 Aug 2017 13:37:39 GMT):
but no idea how to decode it

crazyquark (Fri, 11 Aug 2017 14:20:12 GMT):
I managed to do it, here is the code:

crazyquark (Fri, 11 Aug 2017 14:20:15 GMT):
`func getCallerCertificate(stub shim.ChaincodeStubInterface) (*x509.Certificate, error) { creatorBytes, err := stub.GetCreator() if err != nil { return nil, errors.New("Failed to get creator") } var creator mspproto.SerializedIdentity err = proto.Unmarshal(creatorBytes, &creator) if err != nil { logger.Info("Failed to deserialize creator identity:", err.Error()) return nil, errors.New("Failed to deserialize identity") } bl, _ := pem.Decode(creator.IdBytes) if bl == nil { logger.Info("Failed to parse PEM:", err.Error()) return nil, errors.New("Failed to parse PEM") } cert, err := x509.ParseCertificate(bl.Bytes) if err != nil { logger.Info("Failed to parse x509 cert:", err.Error()) return nil, errors.New("Failed to parse x509 cert") } return cert, nil }`

crazyquark (Fri, 11 Aug 2017 14:20:47 GMT):
you need these deps: ` "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/hyperledger/fabric/core/chaincode/shim" mspproto "github.com/hyperledger/fabric/protos/msp" pb "github.com/hyperledger/fabric/protos/peer"`

crazyquark (Fri, 11 Aug 2017 14:20:47 GMT):
you need these deps: ` "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/core/chaincode/shim" mspproto "github.com/hyperledger/fabric/protos/msp" pb "github.com/hyperledger/fabric/protos/peer"`

arjanvaneersel (Sat, 12 Aug 2017 14:29:06 GMT):
Has joined the channel.

nhrishi (Sat, 12 Aug 2017 15:26:24 GMT):
Hi All, I've a one channel with 4 orgs with 2 nodes each (so 8 nodes and 4 archer nodes- one per org). I'm installing the chaincode on all nodes but instantiating only on the archer nodes. I am able to only instantiate on 2 nodes (2 orgs) and its giving me an error while instantiating on the 3rd node (3rd org). Erros is "error endorsing chaincode. status:500". Can anyone pls advise.

nhrishi (Sat, 12 Aug 2017 15:26:24 GMT):
Hi All, I've a one channel with 4 orgs with 2 nodes each (so 8 nodes and 4 archer nodes- one per org). I'm installing the chaincode on all nodes but instantiating only on the archer nodes. I am able to only instantiate on 2 nodes (2 orgs) and its giving me an error while instantiating on the 3rd node (3rd org). Erros is "error endorsing chaincode. status:500". Can anyone pls advise.

nhrishi (Sat, 12 Aug 2017 15:26:24 GMT):
Hi All, I've a one channel with 4 orgs with 2 nodes each (so 8 nodes and 4 archer nodes- one per org). I'm installing the chaincode on all nodes but instantiating only on the archer nodes. I am able to only instantiate on 2 nodes (2 orgs) and its giving me an error while instantiating on the 3rd node (3rd org). Erros is "error endorsing chaincode. status:500". Can anyone pls advise. I see the peer logs shows validation error (VSCC error err Chaincode X is already instantiated)

mastersingh24 (Sat, 12 Aug 2017 17:49:53 GMT):
@nhrishi - A couple of things: 1) If you don't want the chaincode to run on certain peers within a channel, don't install it on those peers 2) You only need to instantiate chaincode once per channel (i.e. instantiate is not run on a per peer basis) The default instantiation policy is that the admin of any org in a channel can instantiate chaincode. So you need only run one instantiate transaction. Once you get the response back from a peer for instantiate and then send that to the orderer, all of of the other peers in the channel will get the instantiate transaction. If they have the chaincode installed, then they will spin it up. If a peer on the channel does not have the chaincode installed, then it simply saves the lifecycle information but will not spin up the chaincode

nhrishi (Sat, 12 Aug 2017 17:52:33 GMT):
@mastersingh24 Thanks a lot for clarification. Yes somehow I completely missed this point.

mastersingh24 (Sat, 12 Aug 2017 18:20:52 GMT):
Sure thing

silliman (Sat, 12 Aug 2017 18:59:22 GMT):
@mastersingh24 @nhrishi > Once you get the response back from a peer for instantiate and then send that to the orderer, all of of the other peers in the channel will get the instantiate transaction. If they have the chaincode installed, then they will spin it up. Hi Gari, unless something has changed post v1.0.0, my experience has been that the chaincode images and container are spun up only on the peer that is the target of the chaincode instantiate request. Other peers that had the chaincode installed do not get the image or container built at that time. I am only referring to using the *peer chaincode instantiate* cli command, so maybe you're referring to what happens when using one of the SDKs?

nhrishi (Sat, 12 Aug 2017 19:02:24 GMT):
@silliman Thats correct. Initially, it'll only spun up only on the peer that is instantiated on (so only one chaincode container). But When you invoke or query the chaincode on the other peers, it'll spin it up for given peer, so you'll see new container for that peer.

nhrishi (Sat, 12 Aug 2017 19:02:41 GMT):
@mastersingh24 correct me if missed anything

nhrishi (Sat, 12 Aug 2017 19:07:10 GMT):
@silliman @mastersingh24 Also with my example above, I see 2 chaincode containers for the same chaincode although second instantiate transaction is failed in the peer log but not on the cli output. I should ideally see only one chaincode container.

mastersingh24 (Sat, 12 Aug 2017 19:11:29 GMT):
@silliman - What @nhrishi wrote above is correct - the other peers will not spin it up until needed (i.e. first invoke). I left out that detail as the point I was making is that you need only run a single instantiate transaction per chaincode per channel

silliman (Sat, 12 Aug 2017 19:12:37 GMT):
@mastersingh24 understood...just making sure I'm not missing out on some new functionality :-)

ydk210999 (Sun, 13 Aug 2017 07:19:31 GMT):
Has joined the channel.

Eric.Bui (Sun, 13 Aug 2017 09:38:55 GMT):
Hi all, Can I know that if user X create a chaincode A, whether admin Y can read & write chaincde X by default?

ArnabChatterjee (Mon, 14 Aug 2017 07:49:12 GMT):
Has joined the channel.

ArnabChatterjee (Mon, 14 Aug 2017 07:49:29 GMT):
Hi Team, I need some examples on how I can query couchdb via chaincode. Can you provide me some examples?

Hatuw (Mon, 14 Aug 2017 14:03:10 GMT):
Has joined the channel.

ArnabChatterjee (Tue, 15 Aug 2017 00:42:31 GMT):
Also, can anyone tell me how I can manage chaincodes in production

ArnabChatterjee (Tue, 15 Aug 2017 00:42:46 GMT):
I mean how do I deploy and undeploy chaincodes?

ArnabChatterjee (Tue, 15 Aug 2017 00:44:04 GMT):
I have seen deployment methods menioned in the documentation. Also versions can be maintained in chaincodes. How do I undeploy a specific version of the chaincode and deploy a newer one?

naruto1982 (Tue, 15 Aug 2017 07:50:57 GMT):
Has joined the channel.

naruto1982 (Tue, 15 Aug 2017 07:55:42 GMT):

Message Attachments

naruto1982 (Tue, 15 Aug 2017 07:57:30 GMT):
Did anyone encounter the similar problem when debugging the chaincode under devmode ? The cli container always says cannot connect to the orderer:7050. Very strange, I changed NOTHING. Could someone give me some help ? Thank you.

asadhayat (Tue, 15 Aug 2017 10:37:46 GMT):
Hi Everyone... Can anyone tell me how to log something on command line from go chaincode. just fmt.Printf("Logs.....") do not work. i want to track values of different variables in chaincode.

asadhayat (Tue, 15 Aug 2017 10:37:46 GMT):
Now Chaincode installs smoothly but when i try to instantiate using `peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C myc ` i got this error ``` 2017-08-18 07:16:16.045 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: 821C33199F563642E7B9FF5EDB86C4291F63A5D594ABC7B58C6AC9B903C00DF5 Error: Error getting (myc) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [myc]: [Failed to get policy manager for channel [myc]]) Usage: peer chaincode instantiate [flags] ```

paul.sitoh (Tue, 15 Aug 2017 10:45:56 GMT):
Try to learn from this very simple example https://github.com/hlf-go/writing-chaincode

paul.sitoh (Tue, 15 Aug 2017 10:45:56 GMT):
Try forking this very simple example https://github.com/hlf-go/writing-chaincode to suit your circumstance.

asadhayat (Tue, 15 Aug 2017 11:17:48 GMT):
@paul.sitoh Thanks... Can you also give me quick commands how to deploy and invoke it... I am trying to modify sample commands from documentation, but no success

paul.sitoh (Tue, 15 Aug 2017 11:18:47 GMT):
All the commands you will need are listed here https://github.com/hlf-go/writing-chaincode/blob/master/fabric/scripts/myfirstchaincode.sh

paul.sitoh (Tue, 15 Aug 2017 11:19:11 GMT):
However, this only applies to this fabric network with no TLS

paul.sitoh (Tue, 15 Aug 2017 11:21:31 GMT):
At the moment, the script is hardcoded to accept only `mychannel` and `mycc` channel and chaincode names respectively. When I have the time, I'll try to make it more generic

tallharish (Tue, 15 Aug 2017 11:53:00 GMT):
Has joined the channel.

tallharish (Tue, 15 Aug 2017 12:27:30 GMT):
I am developing a chaincode and testing it by modifying script.sh in e2e_cli example with the default network setup (Org1,Org2, 2 members each). If I instantiate chaincode using peer0.Org1, I am able to invoke transactions on it. But when I invoke transactions on peer0.Org2 after instantiating CC on peer0.Org1, I get the following error on peer0.org2. The same behavior other way round as well. ``` 2017-08-14 *12:06:27.826 UTC* [chaincode] processStream -> DEBU 645 [8bb78db8]sending state message TRANSACTION 2017-08-14 *12:06:27.922 UTC* [chaincode] processStream -> ERRO 646 Error handling chaincode support stream: rpc error: code = Canceled desc = context canceled 2017-08-14 12:06:27.925 UTC [chaincode] deregisterHandler -> DEBU 647 Deregister handler: mycc:1.0 2017-08-14 12:06:27.925 UTC [chaincode] deregisterHandler -> DEBU 648 Deregistered handler with key: mycc:1.0 (after a while...) 2017-08-14 *12:06:57.829 UTC* [chaincode] Execute -> DEBU 649 Exit 2017-08-14 12:06:57.829 UTC [chaincode] ExecuteChaincode -> ERRO 64a Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) ``` On the orderer, I see the following message corresponding to same timestamp ``` [orderer/common/broadcast] Handle -> WARN a14 Error reading from stream: rpc error: code = Canceled desc = context canceled ``` My e2e_cli works fine with the default chaincode examples. What could be going wrong with my chaincode? how do I debug? Thanks

Jonny (Tue, 15 Aug 2017 13:27:49 GMT):
Has joined the channel.

tallharish (Tue, 15 Aug 2017 13:38:26 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=YW3sKj3sBebBZfozz) @tallharish got answer on another channel. Thanks

gbolo (Tue, 15 Aug 2017 18:13:03 GMT):
hey all

gbolo (Tue, 15 Aug 2017 18:13:58 GMT):
i would like to warm up some chaincode on peers which have some cc installed but not inited (inited on other peers on channel). Is my only option to get the cc running, do a test query?

gbolo (Tue, 15 Aug 2017 18:14:24 GMT):
or is there something else i can do to get the cc up and running?

ArnabChatterjee (Wed, 16 Aug 2017 02:45:35 GMT):
@here Hi Team, I need some examples on how I can query couchdb via chaincode. Can you provide me some examples?

ArnabChatterjee (Wed, 16 Aug 2017 02:47:40 GMT):
@gbolo - AFAIK, once you inited the CC on the anchor peer. a query/invoke on other peers would auto init for you.

TuanTran (Wed, 16 Aug 2017 07:00:37 GMT):
Has joined the channel.

Subramanyam (Wed, 16 Aug 2017 10:28:28 GMT):
Has joined the channel.

Subramanyam (Wed, 16 Aug 2017 10:31:17 GMT):
Hi, I am unable to create a sample example for smart contract integration for data validation. can anyone assist the examples regarding the concept

Subramanyam (Wed, 16 Aug 2017 10:31:49 GMT):
or can anyone assist a example on consensus with validating peers

dave.enyeart (Wed, 16 Aug 2017 15:10:54 GMT):
@ArnabChatterjee The main couchdb chaincode example is here, it demonstrates various patterns of query: https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/marbles02/marbles_chaincode.go

gpb 1 (Wed, 16 Aug 2017 16:04:14 GMT):
Has joined the channel.

jmcnevin (Wed, 16 Aug 2017 17:05:31 GMT):
Has left the channel.

ArnabChatterjee (Wed, 16 Aug 2017 23:53:27 GMT):
thanks. thats exactly what I was looking for @dave.enyeart

ArnabChatterjee (Thu, 17 Aug 2017 02:47:52 GMT):
@here Few quick queries: 1.Does stub.getState not work with couchDB? 2.When I putState data in couchDB, I find keys getting stored as CCNAME\u0000KEY_NAME. When I need to query for data do I have to follow the same convention to concatenate and then query or is there a convenience method for that?

DarshanBc (Thu, 17 Aug 2017 04:08:12 GMT):
I have a structure something like this {key:User1{Name:"joe", age:24, TimeZone:"5.30"}} I can getState through key but How to search by Name

dave.enyeart (Thu, 17 Aug 2017 04:24:29 GMT):
See the index and query pattern here: https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/marbles02/marbles_chaincode.go#L208

DarshanBc (Thu, 17 Aug 2017 04:40:49 GMT):
where do I get these `Index for chaincodeid, docType, owner, size`

DarshanBc (Thu, 17 Aug 2017 04:43:27 GMT):
with respect to any sample chaincodes

saeedi (Thu, 17 Aug 2017 12:13:25 GMT):
Has joined the channel.

saeedi (Thu, 17 Aug 2017 12:13:40 GMT):
Hello everyone, following error is occurring whenever i try to execute *docker-compose -f docker-compose-simple.yaml up* from *fabric-samples/chaincode-docker-devmode* directory. ```cli | Error: Error getting broadcast client: Error connecting to orderer:7050 due to context deadline exceeded cli | 2017-08-17 11:29:55.733 UTC [grpc] Printf -> DEBU 010 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: operation was canceled"; Reconnecting to {orderer:7050 } cli | Usage: cli | peer channel create [flags] cli | cli | Flags: cli | -c, --channelID string In case of a newChain command, the channel ID to create. cli | -f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer cli | -t, --timeout int Channel creation timeout (default 5) cli | cli | Global Flags: cli | --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint cli | --logging-level string Default logging level and overrides, see core.yaml for full syntax cli | -o, --orderer string Ordering service endpoint cli | --test.coverprofile string Done (default "coverage.cov") cli | --tls Use TLS when communicating with the orderer endpoint cli | -v, --version Display current version of fabric peer server cli | orderer | 2017-08-17 11:29:55.740 UTC [orderer/common/deliver] Handle -> WARN 0c9 Error reading from stream: rpc error: code = Canceled desc = context canceled orderer | 2017-08-17 11:29:55.740 UTC [orderer/main] func1 -> DEBU 0ca Closing Deliver stream ``` Is there any solution for this ?

DarshanBc (Thu, 17 Aug 2017 12:33:04 GMT):
How do I query transactions done by particular user

DarshanBc (Thu, 17 Aug 2017 12:33:53 GMT):
How to query all the transactions done on particular state

nikit-os (Thu, 17 Aug 2017 14:41:06 GMT):
Has joined the channel.

tskzh (Thu, 17 Aug 2017 15:26:51 GMT):
Has joined the channel.

ArnabChatterjee (Fri, 18 Aug 2017 02:26:07 GMT):
@here - Hi people. I have been trying hard to put data in couch db and viewing them in Fauxton GUI. I managed to put them using my go CC but I am unable to see any data inside "data" field inside my document. I have tried the marbles_02 example and running that shows data using the Fauxton GUI. Any ideas where I might be going wrong. (I have tried with raw as well as Json documents, but no success till now) 😞

muralisr (Fri, 18 Aug 2017 02:33:24 GMT):
@saeedi wonder if you are running into a DNS issue in the docker env

muralisr (Fri, 18 Aug 2017 02:33:38 GMT):
here's some discussion on that

muralisr (Fri, 18 Aug 2017 02:33:40 GMT):
https://chat.hyperledger.org/channel/fabric?msg=Y6tJXqupKYjw6efN6

dave.enyeart (Fri, 18 Aug 2017 02:41:26 GMT):
@ArnabChatterjee I answered your duplicate question in #fabric-ledger

ArnabChatterjee (Fri, 18 Aug 2017 02:41:48 GMT):
Thank you dave. :)

SaurabhSuman (Fri, 18 Aug 2017 03:59:48 GMT):
Has joined the channel.

asadhayat (Fri, 18 Aug 2017 04:17:23 GMT):
hi everyone, I am following chaincode for developers documentations from https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html Everything goes great.. but when i try `docker exec -it cli bash` as stated under heading *Terminal 3 - Use the chaincode* i get an error responsing saying `Error response from daemon: Container 4f11e553b791863355322946fc414762e9cbc4f27b3a9112e5accd712a91280a is not running`

asadhayat (Fri, 18 Aug 2017 04:19:06 GMT):
Logs of `docker-compose -f docker-

asadhayat (Fri, 18 Aug 2017 04:19:06 GMT):
cli container seems to exit automatically Logs of `docker-compose -f docker-compose-simple.yaml up` about cli are ``` Attaching to orderer, peer, cli, chaincode orderer | 2017-08-18 04:08:32.394 UTC [orderer/main] main -> INFO 001 Starting orderer: orderer | Version: 1.0.1 orderer | Go version: go1.7.5 orderer | OS/Arch: linux/amd64 orderer | 2017-08-18 04:08:32.399 UTC [bccsp_sw] openKeyStore -> DEBU 002 KeyStore opened at [/etc/hyperledger/msp/keystore]...done peer | 2017-08-18 04:08:33.881 UTC [nodeCmd] serve -> INFO 001 Starting peer: peer | Version: 1.0.1 peer | Go version: go1.7.5 peer | OS/Arch: linux/amd64 peer | Chaincode: peer | Base Image Version: 0.3.1 peer | Base Docker Namespace: hyperledger peer | Base Docker Label: org.hyperledger.fabric peer | Docker Namespace: hyperledger cli | 7-08-18 04:08:35.800 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP peer | cli | 2017-08-18 04:08:35.800 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity peer | 2017-08-18 04:08:33.881 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt cli | 2017-08-18 04:08:35.801 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized peer | 2017-08-18 04:08:33.881 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider .... peer | 2017-08-18 04:08:34.049 UTC [kvledger] NewProvider -> DEBU 00a Constructing leveldb VersionedDBProvider cli | --logging-level string Default logging level and overrides, see core.yaml for full syntax orderer | 2017-08-18 04:08:32.399 UTC [msp] getMspConfig -> DEBU 00d TLS CA certs folder not found at [/etc/hyperledger/msp/tlsintermediatecerts]. Skipping and ignoring TLS intermediate CA folder. [stat /etc/hyperledger/msp/tlscacerts: no such file or directory] cli | -o, --orderer string Ordering service endpoint orderer | 2017-08-18 04:08:32.399 UTC [msp] getPemMaterialFromDir -> DEBU 00e Reading directory /etc/hyperledger/msp/crls cli | --test.coverprofile string Done (default "coverage.cov") cli | --tls Use TLS when communicating with the orderer endpoint peer | 2017-08-18 04:08:34.049 UTC [stateleveldb] NewVersionedDBProvider -> DEBU 00b constructing VersionedDBProvider dbPath=/var/hyperledger/production/ledgersData/stateLeveldb cli | -v, --version Display current version of fabric peer server orderer | 2017-08-18 04:08:32.399 UTC [msp] getMspConfig -> DEBU 00f crls folder not found at [/etc/hyperledger/msp/crls]. Skipping. [stat /etc/hyperledger/msp/crls: no such file or directory] cli | peer | 2017-08-18 04:08:34.049 UTC [kvledger.util] CreateDirIfMissing -> DEBU 00c CreateDirIfMissing [/var/hyperledger/production/ledgersData/stateLeveldb/] ```

asadhayat (Fri, 18 Aug 2017 05:01:56 GMT):
so i solve the issue by commenting out `command: /bin/bash -c './script.sh'` line in docker-compose-simple.yaml

asadhayat (Fri, 18 Aug 2017 05:01:56 GMT):
i solve the issue by commenting out `command: /bin/bash -c './script.sh'` line in docker-compose-simple.yaml

asadhayat (Fri, 18 Aug 2017 07:19:59 GMT):
Now `` 2017-08-18 07:16:16.045 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: 821C33199F563642E7B9FF5EDB86C4291F63A5D594ABC7B58C6AC9B903C00DF5 Error: Error getting (myc) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [myc]: [Failed to get policy manager for channel [myc]]) Usage: peer chaincode instantiate [flags] ```

asadhayat (Fri, 18 Aug 2017 07:19:59 GMT):
Now chaincode installation goes smoothly but when i try to invoke chaincode using `peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C myc` ``` 2017-08-18 07:16:16.045 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: 821C33199F563642E7B9FF5EDB86C4291F63A5D594ABC7B58C6AC9B903C00DF5 Error: Error getting (myc) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [myc]: [Failed to get policy manager for channel [myc]]) Usage: peer chaincode instantiate [flags] ```

asadhayat (Fri, 18 Aug 2017 07:29:44 GMT):
@mastersingh24

asadhayat (Fri, 18 Aug 2017 07:29:44 GMT):
@mastersingh24 can you help please??

zhangyijie (Fri, 18 Aug 2017 07:32:28 GMT):
Has joined the channel.

zhangyijie (Fri, 18 Aug 2017 07:32:34 GMT):
after ‘peer chaincode package and signpackage' executed, how to install the output ‘signpackage.out’ to peer ? The document doesn't refer to it.

zhangyijie (Fri, 18 Aug 2017 07:39:17 GMT):
?

zhangyijie (Fri, 18 Aug 2017 07:42:20 GMT):
@asadhayat which container/host you invoked using peer instantiate?

zhangyijie (Fri, 18 Aug 2017 07:46:32 GMT):
@asadhayat if you login to cli container, please pay attention to env. CORE_PEER_ADDRESS,CORE_PEER_LOCALMSPID and CORE_PEER_MSPCONFIGPATH。 These are on behalf of which peer。if the peer no right,it can't invoke chaincode。

asadhayat (Fri, 18 Aug 2017 07:54:00 GMT):
@zhangyijie i echo all above env var in cli container and i got CORE_PEER_ADDRESS=peer:7051 CORE_PEER_LOCALMSPID=DEFAULT CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp

asadhayat (Fri, 18 Aug 2017 07:54:43 GMT):
docker ps gives ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 718097e268bc hyperledger/fabric-tools "/bin/bash" 3 minutes ago Up 3 minutes cli 0e059c225616 hyperledger/fabric-ccenv "/bin/bash -c 'sle..." 3 minutes ago Up 3 minutes chaincode 7dc04f47a648 hyperledger/fabric-peer "peer node start -..." 3 minutes ago Up 3 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer fc292276eb33 hyperledger/fabric-orderer "orderer" 3 minutes ago Up 3 minutes 0.0.0.0:7050->7050/tcp orderer ```

zhangyijie (Fri, 18 Aug 2017 08:53:31 GMT):
@asadhayat please paste configtx.yaml and cryto-config.yaml。

zhangyijie (Fri, 18 Aug 2017 09:04:59 GMT):
@asadhayat paste './script.sh'. pay attention to create block, create channel, join channel commands in script.sh if these match with the configuration.

zhangyijie (Fri, 18 Aug 2017 09:17:27 GMT):
@asadhayat have you installed the chaincode?

asadhayat (Fri, 18 Aug 2017 09:36:47 GMT):
yes the chaincode instalation goes OK

asadhayat (Fri, 18 Aug 2017 09:37:04 GMT):
problem is in chaincode instantiation

asadhayat (Fri, 18 Aug 2017 09:38:22 GMT):
and where can i find `configtx.yaml` and `crypto-config.yaml`, because there are no such files in `fabric-sample/chaincode-docker-devmode` folder

saeedi (Fri, 18 Aug 2017 09:45:47 GMT):
Hi everyone, Thanks for your suggestion now i have been able to start the network successfully but now i am facing following error when i execute *CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc* from second terminal. ```2017-08-18 09:38:21.119 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2017-08-18 09:38:21.119 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... 2017-08-18 09:38:24.134 UTC [shim] userChaincodeStreamGetter -> ERRO 003 Error trying to connect to local peer: context deadline exceeded Error starting SimpleAsset chaincode: Error trying to connect to local peer: context deadline exceededroot@78b21c5a013a:/opt/gopath/src/chaincode/sacc#```

asadhayat (Fri, 18 Aug 2017 09:56:44 GMT):
@zhangyijie i don't know what was the problem... but my network now works now by removing all docker images doing setting up everything from scratch

glotov (Fri, 18 Aug 2017 11:54:47 GMT):
Has joined the channel.

glotov (Fri, 18 Aug 2017 12:41:13 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ZuMuZWML2omHmLBaf) @mastersingh24 The error `cannot find package "github.com/golang/protobuf/proto" in any of ...` comes again when my chaincode tries to import "github.com/golang/protobuf/proto". I use x86_64-1.0.0, not beta.

richard.holzeis (Fri, 18 Aug 2017 13:14:50 GMT):
Has joined the channel.

richard.holzeis (Fri, 18 Aug 2017 13:26:29 GMT):
I have a very strange behavior when updating an asset in the fabric using PutState. The asset structs are something like that Asset1 {id, desc, []asset2} Asset2 {id, name}. Now storing asset1 without any asset2 works without any issue, but once I create an asset2 and add it to the list in asset1 the asset1 object seems to be completely empty stored. I've checked several times, until the point of PutState the byte array isn't empty and no errors a thrown. Any idea what could be the problem here?

richard.holzeis (Fri, 18 Aug 2017 13:26:29 GMT):
hi everyone, I have a very strange behavior when updating an asset in the fabric using PutState. The asset structs are something like that Asset1 {id, desc, []asset2} Asset2 {id, name}. Now storing asset1 without any asset2 works without any issue, but once I create an asset2 and add it to the list in asset1 the asset1 object seems to be completely empty stored. I've checked several times, until the point of PutState the byte array isn't empty and no errors a thrown. Any idea what could be the problem here?

richard.holzeis (Fri, 18 Aug 2017 15:08:03 GMT):
sorry, found the issue.. it was an issue during marshalling and unmarshalling of my custom time type...

Ashish (Sat, 19 Aug 2017 07:27:43 GMT):
Has joined the channel.

zws (Sat, 19 Aug 2017 08:57:29 GMT):
Has joined the channel.

DarshanBc (Mon, 21 Aug 2017 06:21:59 GMT):
In Balance transfer example `http://localhost:4000/channels/mychannel/chaincodes/mycc?peer=peer1&fcn=query&args=%5B%22a%22%5D` what is `args=%5B%22a%22%5D`

AcidumIrae (Mon, 21 Aug 2017 09:37:57 GMT):
Has joined the channel.

glotov (Mon, 21 Aug 2017 13:31:54 GMT):
@DarshanBc this is escaped `args=["a"]`

DarshanBc (Mon, 21 Aug 2017 13:43:44 GMT):
Thank you

arunselvam (Tue, 22 Aug 2017 06:20:24 GMT):
Hi,

arunselvam (Tue, 22 Aug 2017 06:20:35 GMT):
I tried executing the command

arunselvam (Tue, 22 Aug 2017 06:20:37 GMT):
peer channel create -o orderer.example.com:7050 -c mycc -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem

arunselvam (Tue, 22 Aug 2017 06:20:57 GMT):
where channel name is mycc

arunselvam (Tue, 22 Aug 2017 06:22:24 GMT):
we tried executing the above command in Ubuntu but without using vagrant up.

arunselvam (Tue, 22 Aug 2017 06:23:04 GMT):
But i am getting an error as

arunselvam (Tue, 22 Aug 2017 06:23:06 GMT):
Failed to dial orderer.example.com:7050: connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority"; please retry. Error: Error connecting due to rpc error: code = Internal desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority"

arunselvam (Tue, 22 Aug 2017 06:23:14 GMT):
Can someone help me with this

asadhayat (Tue, 22 Aug 2017 10:12:29 GMT):
is there a way to uninstall the chaincode?? or do i have to reset my network everytime while testing changes in chaincode??

glotov (Tue, 22 Aug 2017 10:24:08 GMT):
@asadhayat increment version number

shivap_17 (Tue, 22 Aug 2017 10:35:54 GMT):
Has joined the channel.

shivap_17 (Tue, 22 Aug 2017 10:36:20 GMT):
HI,

shivap_17 (Tue, 22 Aug 2017 10:36:24 GMT):
I want to develop an application on Hyperledger fabrics. I have bit knowledge about ethereum where it was straight forward, can develop smart contract and deploy it on the main network . But here I got confused that where to start itself. My aim is to write a program on Hyperledger fabric. Can you please help me to find the right place to learn other than the doc.

vishwasrao (Tue, 22 Aug 2017 12:31:37 GMT):
Has joined the channel.

nikit-os (Tue, 22 Aug 2017 12:44:21 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zGddBNmQwLzbDskao) I am also faced this error. Run with x86_64-1.0.1 version. Who knows how to add this dependency to chaincode docker container?

Jonny (Wed, 23 Aug 2017 10:34:37 GMT):
I tried to run sample chaincode program, but keep on getting ```github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:10: fatal error: 'ltdl.h' file not found #include ```

Jonny (Wed, 23 Aug 2017 10:34:37 GMT):
I tried to run sample chaincode program, but keep on getting `github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:29:10: fatal error: 'ltdl.h' file not found #include `

Jonny (Wed, 23 Aug 2017 10:35:24 GMT):
Can someone please help me on this. I'm using OSX for this

Jonny (Wed, 23 Aug 2017 10:39:27 GMT):
I resolved this but compiling as following ```curl -OL http://ftp.yzu.edu.tw/gnu/libtool/libtool-2.4.6.tar.xz tar -xzf libtool-2.4.6.tar.xz cd libtool-2.4.6 ls -lrt ./configure && make && sudo make install```

mna2016 (Wed, 23 Aug 2017 13:36:20 GMT):
Has joined the channel.

mna2016 (Wed, 23 Aug 2017 13:42:21 GMT):
Hi Team, I am running the marbles demo inside of "IBM Container service". The hyperledger version that I have is v1.0. I want to access the chaincode methods "query" and "invoke" from external applications. What peer URL/address and port number should I use to access the endpoints "/registrar" and "/chaincode"?

prashant94 (Wed, 23 Aug 2017 13:45:57 GMT):
Has joined the channel.

kievu (Wed, 23 Aug 2017 15:49:48 GMT):
Has joined the channel.

davidkel (Wed, 23 Aug 2017 16:28:29 GMT):
I'm playing around with InvokeChaincode and thought I would try a simple test of having my chaincode implementation call itself. I can see the peer receive the INVOKE_CHAINCODE request but I don't see it trying to invoke the chaincode. The likeyhood is that there is something wrong with the way I have constructed the INVOKE_CHAINCODE message but just want to check there isn't any logic in fabric that basically doesn't allow a chaincode to call itself ?

davidkel (Wed, 23 Aug 2017 16:55:12 GMT):
And as a follow-on are there any examples of calling InvokeChaincode ? specifically the arguments expected ? such as should it have the string "invoke" as the first argument for example ?

ssaddem (Wed, 23 Aug 2017 17:18:08 GMT):
try to vendor https://www.youtube.com/watch?v=-mlUaJbFHcM [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7SHGcYoEGbNjBNcYp) @nikit-os

CodeReaper (Wed, 23 Aug 2017 19:48:19 GMT):
Hey there, I was wondering if there is any way to make a time trigger in chaincode?? I tried to make goroutines, dont seem to work for more thana 30 seconds. How can I make a functionality execute on its own after a period of time on its own??

CodeReaper (Wed, 23 Aug 2017 19:48:19 GMT):
Hey there, I was wondering if there is any way to make a time trigger in chaincode?? I tried to make goroutines, dont seem to work for more than 30 seconds. How can I make a functionality execute on its own after a period of time on its own??

CodeReaper (Wed, 23 Aug 2017 19:48:19 GMT):
Hey there, I was wondering if there is any way to make a time trigger in chaincode?? I tried to make goroutines, dont seem to work for more than 30 seconds. How can I make a functionality execute on its own after a period of time on its own??

nimtiazm (Thu, 24 Aug 2017 00:22:19 GMT):
Has joined the channel.

MoulaliMvg (Thu, 24 Aug 2017 06:13:35 GMT):
Has joined the channel.

CodeReaper (Thu, 24 Aug 2017 10:15:00 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jNNdTtrBwrPb4n97b) @mastersingh24 @dave.enyeart

dave.enyeart (Thu, 24 Aug 2017 10:34:17 GMT):
No, you would have to have a client application trigger the chaincode. The client is responsible for initiating an invoke, getting it endorsed on X peers, and then packaging up the responses in a transaction that is submitted to orderering.

dave.enyeart (Thu, 24 Aug 2017 10:37:42 GMT):
@davidkel InvokeChaincode() example is here: https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/chaincode_example04/chaincode_example04.go#L88

dave.enyeart (Thu, 24 Aug 2017 10:38:32 GMT):
chaincode api doc can be found here: https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L80

davidkel (Thu, 24 Aug 2017 10:53:08 GMT):
@dave.enyeart Thanks for the reply. I've actually found that chaincode cannot invoke itself, it can only invoke another chaincode and I have that working now but it means my e2e testing will require me to setup 2 running chaincodes and I was hoping to get away with 1 :-)

mna2016 (Fri, 25 Aug 2017 08:07:53 GMT):
Hi Team, How to interact with the chaincode contract that I have deployed. I want to communicate with "init", "invoke" and "query" methods of the chaincode. I have used chaincode earlier with hyperledger v0.6 and there the primary mode of communication was REST APIs. It seems v1.0 does not have REST APIs. How to access the chaincode from client applications like HTML/javascript/nodejS. Any links to examples\tutorials in this regard will be a great help. Thanks!

CodeReaper (Fri, 25 Aug 2017 11:20:23 GMT):
Thanks for clarification @dave.enyeart . Sorry to get on your nerves but, I was just wondering what would happen I change the KeepAlive .

CodeReaper (Fri, 25 Aug 2017 11:20:23 GMT):
Thanks for clarification @dave.enyeart . Sorry to get on your nerves but, I was just wondering what would happen if I change the KeepItAlive in core.yaml. I would predict that the goroutines would work for as much time as I want but then what could be the bad outcome of it. I can only imagine problems such as infinite loops or big loads on the system. Again apologies for these queries.

saurabhxtiwari (Fri, 25 Aug 2017 15:18:02 GMT):
Has joined the channel.

FabricioMendes (Fri, 25 Aug 2017 16:51:17 GMT):
Has joined the channel.

mastersingh24 (Fri, 25 Aug 2017 17:05:04 GMT):
(https://chat.hyperledger.org/channel/general?msg=F2XhQMpkhMsupKmjG) @Stas Sorokin

mastersingh24 (Fri, 25 Aug 2017 17:07:33 GMT):
@Stas Sorokin - You use that function if you want your client or an external application to receive some type of notification once your transaction has been committed. There is an eventhub service/endpoint which your client can connect to in order to subscribe to and receive event(s) of this type

muralisr (Sat, 26 Aug 2017 17:51:37 GMT):
@CodeReaper the keepalive in core.yaml is meant for chaincode to send keepalive message on the grpc channel to keep the connection alive in situations where the chaincode, peer endpoints have to go through hops which could terminate inactive connections ... this param is an internal heartbeat and is not part of the request/response which you can somehow harness to implement things like timers

muralisr (Sat, 26 Aug 2017 17:51:37 GMT):
@CodeReaper the keepalive in core.yaml is meant for chaincode to send keepalive message on the grpc channel to keep the connection alive in situations where the chaincode, peer endpoints have to go through hops which could terminate inactive connections ... this param is an internal heartbeat and is not part of the request/response which you can somehow harness to implement things like timers .. in anycase you shouldn't have timers in chaincodes

BinduPriya (Sat, 26 Aug 2017 18:22:45 GMT):
Has joined the channel.

BinduPriya (Sat, 26 Aug 2017 18:22:59 GMT):
Hi

BinduPriya (Sat, 26 Aug 2017 18:23:23 GMT):
I have a question in chaincode, is it possible to query using non primary key

BinduPriya (Sat, 26 Aug 2017 18:23:54 GMT):
like i have main key ApplicationId, but i want to query the block using status key

toddinpal (Sat, 26 Aug 2017 19:09:26 GMT):
@BinduPriya What do you mean by non-primary key? world state and all the indexes (key history, block index, etc.) are maintained in a key-value store.

BinduPriya (Sun, 27 Aug 2017 17:50:24 GMT):
@toddinpal if my structure is {applicationId:String,Status:String,Name:String}, can i query using Status?

toddinpal (Sun, 27 Aug 2017 19:01:05 GMT):
If you are using couchdb, you should be able to do that... Otherwise you'd need to create a separate key-value pair such as Status as the key or more likely Status concatenated with applicationid to do a range query

Luxii (Mon, 28 Aug 2017 06:43:15 GMT):
Has joined the channel.

mna2017 (Mon, 28 Aug 2017 07:44:17 GMT):
Has joined the channel.

mna2017 (Mon, 28 Aug 2017 07:59:42 GMT):
Hello Team, Hyperledger used to provide Rest API endpoints listed on: "https://github.com/hyperledger/fabric/blob/v0.6/core/rest/rest_api.json". My current use case has a frontend screen that displays blockchain information like chain of blocks, hash contents inside a block etc. This screen needs to show block level system information. I want access to the following information: 1) /chain 2) /chain/blocks/{Block} 3) /transactions/{ID} Question A) How do I get this information in the blockchain network built using Composer? Note: I know that Composer server does exposes a REST API. However, that API only provides application level information like asset information, participants etc. and does not provide block level information as I want.

rajasekharpippalla (Mon, 28 Aug 2017 10:37:59 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)) }

raduciobanu (Tue, 29 Aug 2017 06:51:42 GMT):
Has joined the channel.

AnkitSingh5 (Tue, 29 Aug 2017 06:52:47 GMT):
Has joined the channel.

Luxii (Tue, 29 Aug 2017 11:28:02 GMT):
what does `stub.GetStateByPartialCompositeKey(,[]string {})` return ?

nhrishi (Tue, 29 Aug 2017 17:34:34 GMT):
Hi, I'm somehow getting error "Failed to get policy manager for channel " when one chaincode is invoking other chaincode on the same channel. Can someone pls advise on this urgently. Thanks

wy (Wed, 30 Aug 2017 01:10:51 GMT):
hi guys, im trying to do a couchdb query that returns a sorted result but i keep getting the following error: `status: 500, message: http: read on closed response body`

wy (Wed, 30 Aug 2017 01:16:01 GMT):
the query string i used looks like this `queryString := "{\"selector\":{\"docType\":\"test\"},\"sort\":[{\"createTime\":\"asc\"}]}"`

wy (Wed, 30 Aug 2017 01:16:34 GMT):
the query seems to work when i remove the `sort` field from the query

Hangyu (Wed, 30 Aug 2017 07:04:00 GMT):
Has joined the channel.

Hangyu (Wed, 30 Aug 2017 08:47:34 GMT):
@muralisr When attempting to instantiate example05 chaincode using the CLI, the following error is received: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "package github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example05 imports github.com/hyperledger/fabric/core/chaincode/shim imports github.com/hyperledger/fabric/core/comm imports google.golang.org/grpc imports google.golang.org/grpc/status imports google.golang.org/genproto/googleapis/rpc/status imports github.com/golang/protobuf/ptypes/any imports github.com/golang/protobuf/proto: use of vendored package not allowed package github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example05 imports github.com/hyperledger/fabric/core/chaincode/shim imports github.com/hyperledger/fabric/common/ledger imports github.com/hyperledger/fabric/protos/common imports github.com/hyperledger/fabric/common/util imports github.com/golang/protobuf/ptypes/timestamp: use of vendored package not allowed But it worked in previous versions, do you have any idea how I can resolve this? thanks

vanhumbeecka (Wed, 30 Aug 2017 15:59:51 GMT):
Has joined the channel.

vanhumbeecka (Wed, 30 Aug 2017 16:03:53 GMT):
found an annoying in the ChaincodeStubInterface: This interface uses the timestamp package, but as a VENDORED package. This results in being unable to implement the ChaincodeStubInterface with my own struct More info here: https://stackoverflow.com/questions/38091816/packages-type-cannot-be-used-as-the-vendored-packages-type From forum/blog-posts, it seems the only valid solution is that a library should NOT use vendoring when exposing these kind of things to the outside. So please don't put the "github.com/golang/protobuf/ptypes/timestamp" package in a vendor folder...

vanhumbeecka (Wed, 30 Aug 2017 16:03:53 GMT):
found an annoying bug in the ChaincodeStubInterface: This interface uses the timestamp package, but as a VENDORED package. This results in being unable to implement the ChaincodeStubInterface with my own struct More info here: https://stackoverflow.com/questions/38091816/packages-type-cannot-be-used-as-the-vendored-packages-type From forum/blog-posts, it seems the only valid solution is that a library should NOT use vendoring when exposing these kind of things to the outside. So please don't put the "github.com/golang/protobuf/ptypes/timestamp" package in a vendor folder...

vanhumbeecka (Wed, 30 Aug 2017 16:05:11 GMT):
The reason for trying to implement the ChaincodeStubinterface myself, is so that I can use it for testing

vanhumbeecka (Wed, 30 Aug 2017 16:07:37 GMT):

Message Attachments

vanhumbeecka (Wed, 30 Aug 2017 16:08:37 GMT):
and if you use instead "github.com/golang/protobuf/ptypes/timestamp", then you are not implementing the ChaincodeStubInterface anymore

muralisr (Wed, 30 Aug 2017 17:42:43 GMT):
@vanhumbeecka its best to vendor the entire shim as well so you can deal with one type

muralisr (Wed, 30 Aug 2017 17:45:33 GMT):
@Hangyu ^^^ would answer your question too. .... you may find this useful https://www.youtube.com/watch?v=-mlUaJbFHcM

geoffreyporto (Wed, 30 Aug 2017 19:59:21 GMT):
Has joined the channel.

greg.haskins (Wed, 30 Aug 2017 20:14:33 GMT):
Has left the channel.

mmehediha42 (Wed, 30 Aug 2017 21:55:38 GMT):
Has joined the channel.

Hangyu (Thu, 31 Aug 2017 01:09:30 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ymsTbArhoCDh8Xg7f) @muralisr it works very well, thank you very much!

vanhumbeecka (Thu, 31 Aug 2017 06:53:47 GMT):
ok thx @muralisr , looks like this should solve my problem, gonna try it out today. (It's still seems a bit messy though, that you should copy some vendored files from the fabric package to your own chaincode package.., but I'll take it :) )

vanhumbeecka (Thu, 31 Aug 2017 08:24:53 GMT):
hm, I tried the solution mentioned above, with the youtube video, but no luck. I still get the following error from the compiler: cannot use testStub (type *TestAPIStub) as type shim.ChaincodeStubInterface in argument to smartContract.createUser: *TestAPIStub does not implement shim.ChaincodeStubInterface (wrong type for GetTxTimestamp method) have GetTxTimestamp() (*"github.com/golang/protobuf/ptypes/timestamp".Timestamp, error) want GetTxTimestamp() (*"github.com/hyperledger/fabric/vendor/github.com/golang/protobuf/ptypes/timestamp".Timestamp, error)

vanhumbeecka (Thu, 31 Aug 2017 08:25:48 GMT):
he wants the vendor of a vendor package..

AnkitSingh5 (Thu, 31 Aug 2017 08:45:46 GMT):
Has left the channel.

muralisr (Thu, 31 Aug 2017 11:46:46 GMT):
@vanhumbeecka did you change the import to `github.com/golang/protobuf/ptypes/timestamp` ?

DarshanBc (Thu, 31 Aug 2017 11:48:03 GMT):
If I send a transaction Id for my chaincode can I do how to getcreator() for that Tx_Id

nemon (Thu, 31 Aug 2017 14:12:01 GMT):
Has joined the channel.

DarshanBc (Thu, 31 Aug 2017 14:38:55 GMT):
How can I extract the details of the Creator of a transaction with the tx_id from chaincode

Luxii (Fri, 01 Sep 2017 05:56:14 GMT):
Do we get null Iterator if in marbles example , we pass name (in "color~name") in `GetStateByPartialCompositeKey("color~name",[]string {marbleName})` ?

lmrln (Fri, 01 Sep 2017 10:00:11 GMT):
Has joined the channel.

vanhumbeecka (Fri, 01 Sep 2017 11:01:12 GMT):
@muralisr I changed all my imports to github.com/golang/protobuf/ptypes/timestamp, I also tried to change references in vendor.json to github.com/golang/protobuf/ptypes/timestamp. Now my IDE doesn't give errors anymore, but when I run my tests, He still complains with the same error

vanhumbeecka (Fri, 01 Sep 2017 11:08:08 GMT):
sorry, IDE still complains.

vanhumbeecka (Fri, 01 Sep 2017 11:18:31 GMT):
@muralisr i'm not really sure here what I should do. It's still rather unclear how whole this vendor stuff from hyperledger library interacts with my chaincode

muralisr (Fri, 01 Sep 2017 13:41:57 GMT):
@vanhumbeecka if everything is vendored as shown in the video then I'd expect it to work (as it has worked for others). Wonder if are using old chaincode from docker

DomSteil (Fri, 01 Sep 2017 16:09:46 GMT):
Has joined the channel.

alexandra_g (Sat, 02 Sep 2017 21:11:32 GMT):
Has joined the channel.

vanhumbeecka (Mon, 04 Sep 2017 07:27:10 GMT):
@muralisr i managed to do it with the solution you provided (the youtube video). Tnx muralisr!

DarshanBc (Mon, 04 Sep 2017 11:13:12 GMT):
I want to user ledgerInterface go ad API calls from it how shall I use it

DarshanBc (Mon, 04 Sep 2017 11:13:55 GMT):
is it ok to just include the path of it inside import?

zemtsov (Mon, 04 Sep 2017 14:58:45 GMT):
Hello @here. I try to call one chaincode from another. It updates a string with `PutState` and doesn't report any errors. When I read this string from the ledger I get the old value. Is there any reasons why my chaincode doesn't update the ledger successfully? Thanks

DarshanBc (Tue, 05 Sep 2017 04:10:17 GMT):
Chaincode updates it but committing the transaction has to be done after executing the Txn

mna2017 (Tue, 05 Sep 2017 07:06:12 GMT):
Hi Team, How to (1) deploy a chaincode program written in golang? (2) How to install and instantiate? I am running Hyperledger version 1.0 and hyperledger composer inside of an IBM containter servce(kubernetes). I have finished all steps of deploying a basic chaincode(example02). I now want to get my custom chaincode up and running?

ZainozZaini (Tue, 05 Sep 2017 07:51:26 GMT):
Has joined the channel.

zemtsov (Tue, 05 Sep 2017 11:55:15 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=oXEKJmBpmuMg34NhP) @DarshanBc Thanks for your answer.Could you provide some details on it?

DarshanBc (Tue, 05 Sep 2017 12:09:11 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/txflow.html take look at this for theoritical explanation if you want to know how that is done through code make out the diffrences codes of between invoke-transaction.js and query transaction.js

zemtsov (Tue, 05 Sep 2017 12:12:06 GMT):
Well, my question was not about invoking chaincode from SDK, but from another chaincode.

zemtsov (Tue, 05 Sep 2017 12:32:31 GMT):
My new question is Is it ok to call `InvokeChaincode` twice? For example: ``` func Function(stub shim.ChaincodeStubInterface) peer.Response { // first invoke ccArgs := util.ToChaincodeArgs("f1", "1") resp := stub.InvokeChaincode("mycc1", ccArgs, "") // second invoke resp := stub.InvokeChaincode("mycc2", ccArgs, "") return shim.OK } ```

zemtsov (Tue, 05 Sep 2017 14:34:47 GMT):
Is there any restrictions on invoking chaincodes in the same channel? How many chaincodes can I invoke in one transaction?

zemtsov (Tue, 05 Sep 2017 15:20:16 GMT):
@here thanks, I guess I found the error.

glotov (Tue, 05 Sep 2017 15:20:52 GMT):
you are very welcome

zemtsov (Tue, 05 Sep 2017 15:20:59 GMT):
:)

SethiSaab (Tue, 05 Sep 2017 20:41:20 GMT):
Hi team i am new to hyperledger and am etting error while running ./byfn.sh -m generate Error on outputBlock: Error writing genesis block: open ./channel-artifacts/genesis.block: no such file or directory Failed to generate orderer genesis block... anyone please help me out

ZainozZaini (Wed, 06 Sep 2017 01:47:25 GMT):
have you setup your environment path?

ZainozZaini (Wed, 06 Sep 2017 01:48:02 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=RvczBDsPA2H4sQNys) @SethiSaab :point_up_2:

venediktov (Wed, 06 Sep 2017 04:31:11 GMT):
Has joined the channel.

venediktov (Wed, 06 Sep 2017 04:31:54 GMT):
I am new to chain code , can someone tell me if it prevents infinite loops and how ?

Luxii (Wed, 06 Sep 2017 04:40:38 GMT):
@venediktov it doesnt , for all the infinte loops you'll get *Error: Timeout expired* something like this i guess

venediktov (Wed, 06 Sep 2017 04:42:03 GMT):
@Luxii , thanks for quick response .

dragon82 (Wed, 06 Sep 2017 08:58:31 GMT):
Has joined the channel.

DarshanBc (Wed, 06 Sep 2017 13:05:02 GMT):
I have a chaincode 1 installed on peers of org1 and chainode2 installed on peers of org2 can I call functions of chaincode 2 from chaincode 1

zemtsov (Wed, 06 Sep 2017 13:06:43 GMT):
the comment to `InvokeChaincode` function says that you can even call chaincode from another channel (in read-only mode)

DarshanBc (Wed, 06 Sep 2017 13:35:29 GMT):
Where does validation system chaincode resides can we edit it?

zemtsov (Wed, 06 Sep 2017 13:36:26 GMT):
what do you mean? when it is read only?

zemtsov (Wed, 06 Sep 2017 13:39:35 GMT):
when you call chaincode B from chaincode A in the same channel B's read and write sets just add to A's RW sets. It chaincode B is in another channel its `PutState`s will not have any effect and only response will be returned to chaincode A

rcnewman (Wed, 06 Sep 2017 17:45:53 GMT):
Has joined the channel.

rcnewman (Wed, 06 Sep 2017 17:48:02 GMT):
How would I define different user-types/access control within the chain code? Each would have the same read-level, but TypeA could only create TransactionA and TransB, while TypeB can create TransB and TransC. I can't find anything detailed in the docs on how to create this sort of functionality

DarshanBc (Wed, 06 Sep 2017 18:03:15 GMT):
I have a cgaincode

DarshanBc (Wed, 06 Sep 2017 18:09:46 GMT):
I need a system like this i have a chaincodeA on peers of org1 and chaincodeB on peers of org2 if I invoke a transaction on chaincodeA it has to be completed and committed only if already there exists a transaction calling chaincodeB how do I go about it

scott_xu (Thu, 07 Sep 2017 01:43:36 GMT):
Has joined the channel.

jethdg (Thu, 07 Sep 2017 04:16:00 GMT):
Has joined the channel.

Luxii (Thu, 07 Sep 2017 09:30:58 GMT):
what does GetCreator() return ?

Luxii (Thu, 07 Sep 2017 09:30:58 GMT):
what does `GetCreator()` return ?

zemtsov (Thu, 07 Sep 2017 09:31:28 GMT):
certificate of user who proposes transaction

Luxii (Thu, 07 Sep 2017 09:31:53 GMT):
is there anyway to get his public or private keys ?

Luxii (Thu, 07 Sep 2017 09:32:01 GMT):
in chaincode

Luxii (Thu, 07 Sep 2017 09:40:43 GMT):
@zemtsov and where is the certificate stored which we are getting here ?

zemtsov (Thu, 07 Sep 2017 09:44:59 GMT):
certificates and keys are stored locally on your machine

zemtsov (Thu, 07 Sep 2017 09:45:50 GMT):
if you tried some examples, you saw something like `keyValueStore` parameter

zemtsov (Thu, 07 Sep 2017 09:46:10 GMT):
this is the path on the machine where your application runs to store keys and certs

zemtsov (Thu, 07 Sep 2017 09:48:51 GMT):
I'm not sure if it is possible to get keys in chaincode.

Luxii (Thu, 07 Sep 2017 09:59:46 GMT):
i ran *grep* searching the certifiacte that i got from `GetCreator()` and found it in *channel.block*

Luxii (Thu, 07 Sep 2017 09:59:46 GMT):
i ran grep searching the certifiacte that i got from `GetCreator()` and found it in *channel.block*

Luxii (Thu, 07 Sep 2017 10:00:22 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=j7Eapu6L6xnt3xZJE) @zemtsov I was thinking the same thing

Luxii (Thu, 07 Sep 2017 10:01:03 GMT):
I am using docker-devmode

zemtsov (Thu, 07 Sep 2017 10:01:53 GMT):
which sdk does your application use?

Luxii (Thu, 07 Sep 2017 10:04:02 GMT):
not using any sdk just docker-devmode network example with my own chaincode

zemtsov (Thu, 07 Sep 2017 10:05:46 GMT):
`GetCreator()` returns cert of a user, if this user was enrolled with SDK all certs and keys are stored on your local machine where you run your application

zemtsov (Thu, 07 Sep 2017 10:06:27 GMT):
Where cert is located in your case, I don't know. Sorry

zemtsov (Thu, 07 Sep 2017 10:08:19 GMT):
if you didn't enroll any users the cert is probably included in the channel's genesis block.

zemtsov (Thu, 07 Sep 2017 10:08:28 GMT):
But I'm not sure

Luxii (Thu, 07 Sep 2017 10:20:28 GMT):
I guess you're right i will try it with node sdk

Luxii (Thu, 07 Sep 2017 10:20:41 GMT):
Thanks for your response

zemtsov (Thu, 07 Sep 2017 10:20:53 GMT):
you're welcome

DarshanBc (Thu, 07 Sep 2017 10:21:45 GMT):
if I want to get the MSPid of the peers executing the transaction how do I get it

DarshanBc (Thu, 07 Sep 2017 10:21:45 GMT):
@zemtsov if I want to get the MSPid of the peers on which I am executing the chaincode how do I get it

zemtsov (Thu, 07 Sep 2017 10:33:26 GMT):
if peers executing your chaincode are from different orgs, you'll get different mspids

zemtsov (Thu, 07 Sep 2017 10:33:49 GMT):
and this can fail your transaction

zemtsov (Thu, 07 Sep 2017 10:35:15 GMT):
I don't know how to get it.

zemtsov (Thu, 07 Sep 2017 10:35:31 GMT):
@Luxii I was wrong about `GetCreator`'s result

zemtsov (Thu, 07 Sep 2017 10:35:39 GMT):
it is not the cert itself

Luxii (Thu, 07 Sep 2017 10:35:56 GMT):
Then?

zemtsov (Thu, 07 Sep 2017 10:36:21 GMT):
it is a structure ``` type SignatureHeader struct { // Creator of the message, specified as a certificate chain Creator []byte `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // Arbitrary number that may only be used once. Can be used to detect replay attacks. Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` } ```

zemtsov (Thu, 07 Sep 2017 10:36:27 GMT):
https://github.com/hyperledger/fabric/blob/release/protos/common/common.pb.go

Luxii (Thu, 07 Sep 2017 10:37:56 GMT):
```// GetCreator returns `SignatureHeader.Creator` (e.g. an identity) // of the `SignedProposal`. This is the identity of the agent (or user) // submitting the transaction. GetCreator() ([]byte, error)```

Luxii (Thu, 07 Sep 2017 10:37:56 GMT):
```// GetCreator returns `SignatureHeader.Creator` (e.g. an identity) // of the `SignedProposal`. This is the identity of the agent (or user) // submitting the transaction. GetCreator() ([]byte, error)```

zemtsov (Thu, 07 Sep 2017 10:38:36 GMT):
yes :) only creator

Luxii (Thu, 07 Sep 2017 10:38:42 GMT):
Found this in the documentation

zemtsov (Thu, 07 Sep 2017 10:38:58 GMT):
that's what I mean :)

Luxii (Thu, 07 Sep 2017 10:40:19 GMT):
I'll try it with node sdk now , lets see if i get some different results

DarshanBc (Thu, 07 Sep 2017 10:42:08 GMT):
@zemtsov yes thats right I am planning to do distribute the task based on orgName is it possible

CodeReaper (Thu, 07 Sep 2017 10:44:41 GMT):
@here Hey how can I get the public key of the user who invoked the transaction in chaiincode?

FollowingGhosts (Thu, 07 Sep 2017 10:45:13 GMT):
please avoid using here unless it's for a channel announcement as it pings a lot of people

rock_martin (Thu, 07 Sep 2017 11:08:54 GMT):
Has joined the channel.

Luxii (Thu, 07 Sep 2017 11:21:20 GMT):
is there any use case or example for `GetTransient()` method ?

rock_martin (Thu, 07 Sep 2017 11:25:05 GMT):
@Luxii https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/src/github.com/example_cc/example_cc.go

Luxii (Thu, 07 Sep 2017 11:44:27 GMT):
@rock_martin thanks for your response but this example is not returning(or Printing) any transient data when I'm running it in docker-devmode

dave.enyeart (Thu, 07 Sep 2017 12:17:18 GMT):
Concerning the GetCreator() questions, here is an example of how it can be used to get the certificate of the invoker:

dave.enyeart (Thu, 07 Sep 2017 12:17:22 GMT):
```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() }```

Luxii (Thu, 07 Sep 2017 13:25:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=gNWyLhpHQW4eHrKoq) @dave.enyeart Thanks

roccia8685 (Thu, 07 Sep 2017 13:58:12 GMT):
Has joined the channel.

htyagi90 (Thu, 07 Sep 2017 15:20:47 GMT):
https://github.com/hyperledger/fabric/blob/d30b129e1b791ed4c8708675b5034c50f720dcf6/core/chaincode/shim/interfaces.go#L66 Above explanation says that we can query a chaincode deployed on a different channel from a chaincode deployed in another channel. Isn't the concept for multi channel is so that data shared in one is not accessible to peers on the other channel .?

htyagi90 (Thu, 07 Sep 2017 15:49:23 GMT):
and here ( https://docs.google.com/document/d/1eRNxxQ0P8yp4Wh__Vi6ddaN_vhN2RQHP-IruHNUwyhc/edit ) it says that "Only members of a channel may transact on that channel, and *transactions on a channel is not visible on other channels.*"

bta (Thu, 07 Sep 2017 19:19:21 GMT):
Has joined the channel.

bta (Thu, 07 Sep 2017 19:55:11 GMT):
I have an infrequent and seemingly non-reproducible error in the Go shim's GetState and PutState, which is "[txid]Channel exists". (To me it smells like a concurrency issue but I don't use go-routines in my chaincode.) Anyone experienced something like that before?

bta (Thu, 07 Sep 2017 19:58:48 GMT):
@htyagi90 you can query chaincode on a different channel, but the functions you invoke cannot write state. Also, this only works if endorsers that execute the chaincode have access to both channels, which should also make clear that confidentiality is not an issue (or if it is, then the invocation will fail for lack of endorsement).

Chrislkra (Thu, 07 Sep 2017 20:57:30 GMT):
Has joined the channel.

Chrislkra (Thu, 07 Sep 2017 20:58:26 GMT):
Hi!! i need help with my chaincode i try to run it chrislkra.go but it didnt work :/

Chrislkra (Thu, 07 Sep 2017 21:09:54 GMT):
Is made with GO

Chrislkra (Thu, 07 Sep 2017 21:11:33 GMT):
I put this command "CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc"

VoR0220 (Fri, 08 Sep 2017 13:23:35 GMT):
Has joined the channel.

VoR0220 (Fri, 08 Sep 2017 13:26:52 GMT):
Hi there! I was curious. How is Chaincode intended to play with Golang's new Dep package manager? Is there going to be a nice way to have these two play nice together?

mauricio.salinas (Fri, 08 Sep 2017 13:28:06 GMT):
Has joined the channel.

SethiSaab (Fri, 08 Sep 2017 14:23:07 GMT):
Hi i am facing issue while running this command " fabric-ca-server " it is aying command not found i have followed everything properly as mentioned in docs somebody please guide me as i am new to hyperledger

htyagi90 (Fri, 08 Sep 2017 16:15:11 GMT):
Hi, when installing my custom chaincode on one of the peers, I keep getting the following error : `error: Error executing chaincode: Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b)`

htyagi90 (Fri, 08 Sep 2017 16:15:51 GMT):
but after that, if I exec the query command into the same container, I'm getting the correct output. Following is the log of the peer:

htyagi90 (Fri, 08 Sep 2017 16:16:32 GMT):
``` 2017-09-08 15:59:43.597 UTC [container] lockContainer -> DEBU 49a waiting for container(dev-peer1.org1.example.com-b2b-1.0) lock 2017-09-08 15:59:43.597 UTC [container] lockContainer -> DEBU 49b got container (dev-peer1.org1.example.com-b2b-1.0) lock 2017-09-08 15:59:43.600 UTC [dockercontroller] stopInternal -> DEBU 49c Stop container dev-peer1.org1.example.com-b2b-1.0(Container not running: dev-peer1.org1.example.com-b2b-1.0) 2017-09-08 15:59:43.601 UTC [dockercontroller] stopInternal -> DEBU 49d Kill container dev-peer1.org1.example.com-b2b-1.0 (API error (500): {"message":"Cannot kill container dev-peer1.org1.example.com-b2b-1.0: Container 808ee1cea99fb7750a230f3fa27a2d49cbc66342ca2dc1240feed0ec4f7b6564 is not running"} ) 2017-09-08 15:59:43.652 UTC [dockercontroller] stopInternal -> DEBU 49e Removed container dev-peer1.org1.example.com-b2b-1.0 2017-09-08 15:59:43.652 UTC [container] unlockContainer -> DEBU 49f container lock deleted(dev-peer1.org1.example.com-b2b-1.0) 2017-09-08 15:59:43.652 UTC [chaincode] Launch -> ERRO 4a0 launchAndWaitForRegister failed Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [chaincode] ExecuteChaincode -> ERRO 4a1 Error executing chaincode: Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [endorser] callChaincode -> DEBU 4a2 Exit 2017-09-08 15:59:43.652 UTC [endorser] simulateProposal -> ERRO 4a3 failed to invoke chaincode name:"b2b" on transaction ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b, error: Error executing chaincode: Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [endorser] simulateProposal -> DEBU 4a4 Exit 2017-09-08 15:59:43.652 UTC [lockbasedtxmgr] Done -> DEBU 4a5 Done with transaction simulation / query execution [852d5e79-17e5-4bfc-b908-7bd45952a069] 2017-09-08 15:59:43.652 UTC [endorser] ProcessProposal -> DEBU 4a6 Exit ```

htyagi90 (Fri, 08 Sep 2017 16:16:32 GMT):
``` 2017-09-08 15:59:43.601 UTC [dockercontroller] stopInternal -> DEBU 49d Kill container dev-peer1.org1.example.com-b2b-1.0 (API error (500): {"message":"Cannot kill container dev-peer1.org1.example.com-b2b-1.0: Container 808ee1cea99fb7750a230f3fa27a2d49cbc66342ca2dc1240feed0ec4f7b6564 is not running"} ) 2017-09-08 15:59:43.652 UTC [dockercontroller] stopInternal -> DEBU 49e Removed container dev-peer1.org1.example.com-b2b-1.0 2017-09-08 15:59:43.652 UTC [container] unlockContainer -> DEBU 49f container lock deleted(dev-peer1.org1.example.com-b2b-1.0) 2017-09-08 15:59:43.652 UTC [chaincode] Launch -> ERRO 4a0 launchAndWaitForRegister failed Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [chaincode] ExecuteChaincode -> ERRO 4a1 Error executing chaincode: Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [endorser] callChaincode -> DEBU 4a2 Exit 2017-09-08 15:59:43.652 UTC [endorser] simulateProposal -> ERRO 4a3 failed to invoke chaincode name:"b2b" on transaction ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b, error: Error executing chaincode: Timeout expired while starting chaincode b2b:1.0(networkid:dev,peerid:peer1.org1.example.com,tx:ca943bb4a7e08c1d2c99878c4d4effcbb95d04b536bfb1b4767c8407e8fc3a9b) 2017-09-08 15:59:43.652 UTC [endorser] simulateProposal -> DEBU 4a4 Exit 2017-09-08 15:59:43.652 UTC [lockbasedtxmgr] Done -> DEBU 4a5 Done with transaction simulation / query execution [852d5e79-17e5-4bfc-b908-7bd45952a069] 2017-09-08 15:59:43.652 UTC [endorser] ProcessProposal -> DEBU 4a6 Exit ```

VoR0220 (Fri, 08 Sep 2017 19:08:04 GMT):
Question: Why is it in all the examples of Chaincode I see empty structs? Is there something bad about filling in the fields of Chaincode structs?

bmalavan (Fri, 08 Sep 2017 23:09:44 GMT):
Is there any sample on how to write UnitTest for using Rich Query?

muralisr (Sat, 09 Sep 2017 13:18:47 GMT):
@VoR0220 there's nothing _bad_ about filling in field of chaincode structs. Just best practice of chaincode to not have global vars or store data from proposals in chaincode memory - basically make the code itself stateless.

VoR0220 (Sat, 09 Sep 2017 15:50:32 GMT):
got it.

VoR0220 (Sat, 09 Sep 2017 15:50:44 GMT):
so I should be treating the chaincode structs as a monad then?

sampath06 (Sun, 10 Sep 2017 01:49:04 GMT):
Has joined the channel.

sampath06 (Sun, 10 Sep 2017 01:51:15 GMT):
I am trying to access the state from couchdb. Query is not returning any results from chaincode. The same query is returning results in the couchdb browser. The code I have picked up is from the marbles example. I tried the following also ``` {"selector":{}} now has [] ``` Any ideas on how to debug this?

WHATISOOP (Mon, 11 Sep 2017 03:08:01 GMT):
Has joined the channel.

bmalavan (Mon, 11 Sep 2017 08:42:57 GMT):
@muralisr I am getting following error when I try to install a chaincode. This chaincode uses `util.ToChaincodeArgs(..)` this 'util` is in `github.com/hyperledger/fabric/common/util` package. For some reason This package is not included in the `peer`'s gopath or goroot. ```Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/common/util: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH)``` is it something to do with Vendor management?

vpetryk (Mon, 11 Sep 2017 11:58:23 GMT):
Has joined the channel.

mastersingh24 (Mon, 11 Sep 2017 13:20:03 GMT):
@bmalavan - I'd seriously advise against trying to use stuff from the fabric repo as packages - most of them are not really designed as such (and yes - I know one of the examples uses this package - I keep meaning to change that)

mastersingh24 (Mon, 11 Sep 2017 13:20:30 GMT):
That being said, the solution is that you actually need to vendor the shim package with your chaincode

mastersingh24 (Mon, 11 Sep 2017 13:20:55 GMT):
As well as vendoring the common/util package

mastersingh24 (Mon, 11 Sep 2017 13:21:30 GMT):
Are you using the peer CLI to package and install your chaincode? It should have including the common/util package - but you can just vendor it yourself

bmalavan (Mon, 11 Sep 2017 13:25:39 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=dM6RuxWc4n3CpPmii) @mastersingh24 Yep. I try to instantiate via cli. For the moment, I have come up with my own method to get chain code arguments.

bmalavan (Mon, 11 Sep 2017 13:30:00 GMT):
@mastersingh24 bydaway, is there a way to mock couchdb to do go Test? or simply mocking stub will be enough to test `Rich Query`?

vpetryk (Mon, 11 Sep 2017 13:36:51 GMT):
Hello everyone! I tried to invoke chaicodes in sequence: Chaincode1:Method1 -> Chaincode2:Method1 -> Chaincode1:Method2 and got an error "Error: chaincode error (status: 500, message: )" Is this an issue or a protection against cycling?

mastersingh24 (Mon, 11 Sep 2017 13:40:01 GMT):
@bmalavan - the rich query functions have not been implemented in the mock stub

bmalavan (Mon, 11 Sep 2017 13:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=6NobY6pfAC5AQTzy6) @mastersingh24 That Sad. Gonna be long process for me to make sure my query work :( :(

bmalavan (Mon, 11 Sep 2017 18:25:57 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=75YTYhYyLmNfKwwsq) @sampath06 Me too getting into similar issue. when I run the 'Rich Query' on couch db, it is giving proper output. however, ` resultsIterator, err := stub.GetQueryResult(queryString)`'s output always fail to go into `for resultsIterator.HasNext() {...}`. any idea why?

Souvik.Dey (Tue, 12 Sep 2017 06:09:54 GMT):
Has joined the channel.

Souvik.Dey (Tue, 12 Sep 2017 06:10:35 GMT):
Is there any way to check chaincode compilation in my local environment?

zemtsov (Tue, 12 Sep 2017 07:28:30 GMT):
`go build`?

Amit04Patel (Tue, 12 Sep 2017 17:17:30 GMT):
Has joined the channel.

Amit04Patel (Tue, 12 Sep 2017 17:17:43 GMT):
Hello , I am getting the following error on importing "github.com/hyperledger/fabric/events/consumer" in chain code Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/events/consumer: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/events/consumer: cannot find package "github.com/hyperledger/fabric/events/consumer" in any of: /opt/go/src/github.com/hyperledger/fabric/events/consumer (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/events/consumer (from $GOPATH) any suggestions on how i can resolve this issue?

Amit04Patel (Tue, 12 Sep 2017 17:33:03 GMT):
@mastersingh24 could you tell me how to vendor the "github.com/hyperledger/fabric/events/consumer" package?

mastersingh24 (Tue, 12 Sep 2017 17:34:47 GMT):
@Amit04Patel - Before I tell you ( ;) ), why exactly are you going to use the event consumer package in chaincode?

Amit04Patel (Tue, 12 Sep 2017 17:35:38 GMT):
@mastersingh24 to capture new records in the ledger

mastersingh24 (Tue, 12 Sep 2017 17:36:27 GMT):
I don't think you should / would want to have chaincode attempt to subscribe to events

mastersingh24 (Tue, 12 Sep 2017 17:36:46 GMT):
You'd really want to write an app that consumes events and then invokes chaincode

Amit04Patel (Tue, 12 Sep 2017 17:40:54 GMT):
i am getting the error for util package also could you tell me how to vendor that?

mastersingh24 (Tue, 12 Sep 2017 17:58:43 GMT):
``` go get govendor cd to the root of your chaincode project govendor init govendor $PKGNAME ```

Amit04Patel (Wed, 13 Sep 2017 06:02:40 GMT):
@mastersingh24 when i am running govendor in my system (ubuntu16.04) it says already in vendor Do I have to run this in client container , but the source files are not there and if I put the files in the system form volumes section of docker-compose file I get ton of errors on start of container it self

karankb8 (Wed, 13 Sep 2017 10:35:05 GMT):
Has joined the channel.

mna2017 (Wed, 13 Sep 2017 10:40:26 GMT):
Hi Team, I have to run a command "composer identity request -p bmx-hlfv1 -i admin -s PA55W0RD12". I am working on MS Windows 7 machine. I understand for this command to work I need the composer.exe application. Can somebody please guide me on how to run this command on a windows environment?

MRobinson (Wed, 13 Sep 2017 11:23:41 GMT):
Has joined the channel.

ynkumar143 (Wed, 13 Sep 2017 12:10:07 GMT):
Has joined the channel.

FlexyZ-xx (Wed, 13 Sep 2017 13:36:28 GMT):
Has joined the channel.

DarshanBc (Wed, 13 Sep 2017 13:53:45 GMT):
How to get TxId of current Txn from chaincode

zemtsov (Wed, 13 Sep 2017 14:21:13 GMT):
`shim.ChaincodeStubInterface.GetTxID()`

mavericklam (Wed, 13 Sep 2017 14:31:46 GMT):
hi team, I have a question that how we can access the other chaincode's state ? is it possible?

DarshanBc (Wed, 13 Sep 2017 14:33:20 GMT):
@zemtsov Thank you

DarshanBc (Wed, 13 Sep 2017 14:33:34 GMT):
My input is (Random TxId,nonce of current TxID) Using nonce of a current Txn can I validate creator of current Txn and creator of Random TxnID same I need just yes or no

DarshanBc (Wed, 13 Sep 2017 14:33:51 GMT):
How can I do it any idea

mavericklam (Wed, 13 Sep 2017 16:44:51 GMT):
Hi team, I am curious about how the chaincode interact with the world state. Does every chaincode access the world state and can change the Key-Value pair that created or updated by other chaincode?

traviscox (Wed, 13 Sep 2017 18:29:35 GMT):
Has joined the channel.

jrosmith (Wed, 13 Sep 2017 20:55:39 GMT):
@mavericklam are you saying different instances of installed chaincodes on peers accessing the state of the ledger or different chaincodes accessing some outside world state?

mavericklam (Thu, 14 Sep 2017 00:16:01 GMT):
Is is possible for different chaincode to share the state? [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=3nsKTQuLH4XAGx5cz) @jrosmith

TBauia (Thu, 14 Sep 2017 03:44:50 GMT):
Has joined the channel.

levinkwong (Thu, 14 Sep 2017 05:10:59 GMT):
Hi guys, I am not very good at Golang, so I have the following question: Because I do not want to implement all my chaincode functions in a single file. I want to separate them into different files with the structure: ``` $GOPATH/src/my-project/cc/main.go $GOPATH/src/my-project/cc/functions/chaincode_function_A.go ``` In my main.go, I can do : ``` import ( functionA "my-project/cc/functions/chaincode_function_A" ) ``` And I define the chaincode struct in main.go: ``` type Chaincode struct { } ``` However, when I want to implement my chaincode function A in chaincode_function_A.go : ``` func (t *Chaincode) functionA() string { return "Function A" } ``` I failed/don't know how to import the `Chaincode` struct from my main package. Any Golang expert can help???

zemtsov (Thu, 14 Sep 2017 05:19:14 GMT):
@levinkwong what if you define `Chaincode` in `chaincode_function_A`?

Amit04Patel (Thu, 14 Sep 2017 05:19:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=rLACLk3dxpuuG46q9) @Amit04Patel Anyone could you help me with this?

levinkwong (Thu, 14 Sep 2017 05:20:55 GMT):
@zemtsov then in my Invoke function, how should I call it with chaincode.functionA() ? Also, I want to put function per file, would it duplicate the struct in `chaincode_function_B`?

levinkwong (Thu, 14 Sep 2017 05:22:46 GMT):
I mean I want to do something like this in `main.go`: ``` func (t *Chaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function != "invoke" { shim.Error("Invalid function name received " + function + " for invoke transcation") } fmt.Println("function : ", function, " args : ", args) action := args[0] args = args[1:] switch action { case functionA: t.functionA(stub, args) } errMsg := fmt.Sprintln("Received unknown function invocation: [function:", function, ", args:", args, "]") return shim.Error(errMsg) } ```

levinkwong (Thu, 14 Sep 2017 05:23:41 GMT):
In the old days, I put functionA in same file so no problems. But now I have many many functions, so I want to separate them into different files.

zemtsov (Thu, 14 Sep 2017 05:23:58 GMT):
``` func (t *functionA.Chaincode) Invoke(...) pb.Response { } ```

levinkwong (Thu, 14 Sep 2017 05:25:26 GMT):
I think cannot do this because I init the shim by ``` func main() { err := shim.Start(new(Chaincode)) if err != nil { fmt.Printf("Error starting chaincode: %s", err) } } ```

zemtsov (Thu, 14 Sep 2017 05:26:03 GMT):
Can't you put `functionA.Chaincode` to `Start`?

levinkwong (Thu, 14 Sep 2017 05:26:23 GMT):
But there will be funcitonB.Chaincode, functionC .. etc

levinkwong (Thu, 14 Sep 2017 05:27:07 GMT):
Is it not logical to do `t.functionA(stub, args)` while functionA is in another package? should I just do `functionA(stub, args)`??

zemtsov (Thu, 14 Sep 2017 05:27:25 GMT):
so, you want to init all chaincodes in a single `main`?

levinkwong (Thu, 14 Sep 2017 05:27:46 GMT):
I only have 1 chaincode, but that chaincode provide many business functions.

levinkwong (Thu, 14 Sep 2017 05:28:30 GMT):
Please point out anything I doing is not logical

levinkwong (Thu, 14 Sep 2017 05:29:08 GMT):
I just reference https://github.com/hyperledger/fabric/blob/release/examples/chaincode/chaintool/example02/src/chaincode/chaincode_example02.go

levinkwong (Thu, 14 Sep 2017 05:29:39 GMT):
But instead of putting every functions in the file, I want (maybe this wish is not logical) to put the functions into different files

zemtsov (Thu, 14 Sep 2017 05:30:27 GMT):
Define one `Chaincode` type in `main` package, define `Invoke` and `Init` there. And call any your functions defined in `functionA(B,C...)` from `Invoke`

levinkwong (Thu, 14 Sep 2017 05:31:16 GMT):
Yes, exactly what I am trying to do.

zemtsov (Thu, 14 Sep 2017 05:31:55 GMT):
I guess this is wrong: ``` case functionA: t.functionA(stub, args) } ```

levinkwong (Thu, 14 Sep 2017 05:32:01 GMT):
So back to my question , the following codes failed because Chaincode is defined in main.go ``` func (t *Chaincode) functionA() string { return "Function A" } ```

zemtsov (Thu, 14 Sep 2017 05:32:33 GMT):
define it out of `Chaincode` type.

zemtsov (Thu, 14 Sep 2017 05:32:56 GMT):
``` func functionA() string { ... } ```

zemtsov (Thu, 14 Sep 2017 05:33:26 GMT):
and call ``` functionA.functionA() ```

levinkwong (Thu, 14 Sep 2017 05:34:45 GMT):
OK, could you give me some idea what indeed is `(t *Chaincode)`? I would like to know the right use of that

levinkwong (Thu, 14 Sep 2017 05:35:02 GMT):
Thanks for your help! Very new to Golang :(

zemtsov (Thu, 14 Sep 2017 05:35:56 GMT):
when you define a function this way ``` func (t *Chaincode) functionA() string { return "Function A" } ``` you make something like a class member

zemtsov (Thu, 14 Sep 2017 05:36:25 GMT):
of a class `Chaincode`

zemtsov (Thu, 14 Sep 2017 05:36:40 GMT):
and `t` is like `this` here

levinkwong (Thu, 14 Sep 2017 05:38:29 GMT):
Same as what I understand, so I think I should not remove it. Because that function belongs to the class `chaincode`

zemtsov (Thu, 14 Sep 2017 05:38:39 GMT):
why?

zemtsov (Thu, 14 Sep 2017 05:39:07 GMT):
then define it in `main` package

levinkwong (Thu, 14 Sep 2017 05:39:11 GMT):
I want to restrict the access of that function to only that class

levinkwong (Thu, 14 Sep 2017 05:40:03 GMT):
oh! I will try define the chaincode_function_A.go in `main` package

levinkwong (Thu, 14 Sep 2017 05:41:20 GMT):
Thanks very much, it works, and I can sense what I misunderstood

zemtsov (Thu, 14 Sep 2017 05:42:53 GMT):
good luck

CallMain (Thu, 14 Sep 2017 07:11:44 GMT):
Has joined the channel.

glotov (Thu, 14 Sep 2017 07:24:43 GMT):
About the events. Does the `block-listener` example work with TLS now? Its readme said that TLS must be disabled. But its code on github is 3 month long by now so I hope there is some progress there. I need to catch `SetEvent()` notifications from my app, is there any other example how to catch them without disabling TLS for my peers?

muralisr (Thu, 14 Sep 2017 11:52:06 GMT):
@glotov https://gerrit.hyperledger.org/r/#/c/11237/ is in review to help with TLS for block-listener

AbhishekSeth (Thu, 14 Sep 2017 12:14:24 GMT):
Has joined the channel.

gbolo (Thu, 14 Sep 2017 17:40:35 GMT):
nice

jrosmith (Thu, 14 Sep 2017 18:51:04 GMT):
@mavericklam still not entirely clear which case youre talking about. if it is chaincode A installed on peer A and chaincode A installed on peer B then yes, the state db is a reflection of the same ledger. if it is an instance of chaincode A and and an instance of chaincode B they do not share the same state, but they can get information about each other's state by querying and sending invokes between them if and only if they are instantiated on the same channel

debrajo (Thu, 14 Sep 2017 19:27:25 GMT):
I need some help. I've been working on add chaincode logging and can't get it to work. So I created a sample_logging program from fabric-samples sacc.go and added the info from here: http://hyperledger-fabric.readthedocs.io/en/latest/logging-control.html. I've tried various ways and still can't get it to work. My code is located here: https://github.ibm.com/debrajo/logging_sample/blob/master/logging_sample.go Anyone have any idea on why it doesn't work or can point me to a working sample?

wlahti (Thu, 14 Sep 2017 19:44:37 GMT):
Hey @debrajo, let me take a look.

wlahti (Thu, 14 Sep 2017 20:03:56 GMT):
One quick question: how are you running your chaincode? one of the samples that creates the network for you using containers, running locally using devmode?

debrajo (Thu, 14 Sep 2017 20:32:16 GMT):
@wlahti I've got kubenetes container using ibm-container-service

debrajo (Thu, 14 Sep 2017 20:32:46 GMT):
we've deployed our chaincode to it .. and I've deployed sample_logging .. and see nothing in the log

wlahti (Thu, 14 Sep 2017 20:59:50 GMT):
I proactively opened a JIRA to update the documentation for logging: https://jira.hyperledger.org/browse/FAB-6170. I've been meaning to get around to that for a while.

debrajo (Thu, 14 Sep 2017 21:14:28 GMT):
so documentation is incorrect ?

wlahti (Thu, 14 Sep 2017 21:15:41 GMT):
it's at least slightly outdated and not straightforward.

wlahti (Thu, 14 Sep 2017 21:16:07 GMT):
by the way, I'm refreshing my mind on chaincode logging at the moment and should have an answer for you shortly.

wlahti (Thu, 14 Sep 2017 21:46:27 GMT):
hmmm there's definitely something acting weird here. I'm able to get the chaincode loggers working for levels up to INFO but not currently for DEBUG. need to dig deeper.

wlahti (Thu, 14 Sep 2017 21:48:49 GMT):
the chaincode log level should really be controlled by the environment variable CORE_CHAINCODE_LOGGING_LEVEL

wlahti (Thu, 14 Sep 2017 21:48:49 GMT):
the log level for chaincode containers should really be controlled by the environment variable CORE_CHAINCODE_LOGGING_LEVEL

debrajo (Thu, 14 Sep 2017 21:59:16 GMT):
I'm actually thinking of a setChaincodeLevel invoke command .. so we can set prod at say info .. and if something significant happens, we can turn to debug .. capture error, then back to INFO

wlahti (Thu, 14 Sep 2017 21:59:17 GMT):
my container wasn't picking up the change immediately from sampleconfig/core.yaml. it's working now.

wlahti (Thu, 14 Sep 2017 22:01:08 GMT):
interesting. well definitely use CORE_CHAINCODE_LOGGING_LEVEL to set the overall default level for the container initially.

wlahti (Thu, 14 Sep 2017 22:02:35 GMT):
and it's a to-do for the future to add the ability to dynamically update the chaincode container logging level.

wlahti (Thu, 14 Sep 2017 22:04:45 GMT):
it could definitely be worth a try to figure out another way to use the system (like you setChaincodeLevel invoke command) to update the level dynamically but that's not something I've looked into

wlahti (Thu, 14 Sep 2017 22:04:45 GMT):
it could definitely be worth a try to figure out another way to use the system (like you setChaincodeLevel invoke command) to update the level dynamically but that isn't something I've looked into

debrajo (Thu, 14 Sep 2017 22:05:37 GMT):
I don't think the ibm-container-service blockchain.yaml sets a CORE_CHAINCODE_LOGGING_LEVEL environment variable .. I may have to pick one of those .. or explicitly set for our dev environment

debrajo (Thu, 14 Sep 2017 22:05:54 GMT):
don't know what variables will be there for the IBM Blockchain service in bluemix

debrajo (Thu, 14 Sep 2017 22:06:25 GMT):
no worries .. that's what I'm trying for with this sample_logging

wlahti (Thu, 14 Sep 2017 22:07:14 GMT):
in theory, it looks like it should work.

debrajo (Thu, 14 Sep 2017 22:07:34 GMT):
In theory :)

wlahti (Thu, 14 Sep 2017 22:07:34 GMT):
I just tried: ```logger.Critical("critical") logger.Warning("warning") logger.Info("info") logger.Debug("debug") logger.SetLevel(shim.LogWarning) logger.Critical("critical") logger.Warning("warning") logger.Info("info") logger.Debug("debug")```

wlahti (Thu, 14 Sep 2017 22:08:02 GMT):
and get the following output: ```2017-09-14 22:05:54.220 UTC [debrajo] Critical -> CRIT 003 critical 2017-09-14 22:05:54.220 UTC [debrajo] Warning -> WARN 004 warning 2017-09-14 22:05:54.220 UTC [debrajo] Info -> INFO 005 info 2017-09-14 22:05:54.220 UTC [debrajo] Debug -> DEBU 006 debug 2017-09-14 22:05:54.220 UTC [debrajo] Critical -> CRIT 007 critical 2017-09-14 22:05:54.220 UTC [debrajo] Warning -> WARN 008 warning```

debrajo (Thu, 14 Sep 2017 22:08:41 GMT):
from my sample-logger.go chaincode ? ..

wlahti (Thu, 14 Sep 2017 22:09:11 GMT):
well, I started with the same logging calls from your sample and then modified

debrajo (Thu, 14 Sep 2017 22:10:59 GMT):
I've seen a few samples with fmt.Printf() .. does that even work for logging ?

wlahti (Thu, 14 Sep 2017 22:11:27 GMT):
the logger from shim logger does seem like it needs improvement... I don't like that it just shows the logging call as the function name instead of the actual function (I added those calls to the invoke function of my chaincode)

wlahti (Thu, 14 Sep 2017 22:11:56 GMT):
yes, fmt.Print statements work inside chaincode and the containers

debrajo (Thu, 14 Sep 2017 22:12:59 GMT):
so maybe it's the container setup .. because the main() fmt.Printf("logging_sample.go.main started") didn't make the log

wlahti (Thu, 14 Sep 2017 22:15:08 GMT):
yes, it could be. I haven't worked with kubernetes yet; only docker

wlahti (Thu, 14 Sep 2017 22:17:00 GMT):
I'd recommend making sure you see fmt.Print statements in your container first, then try with the loggers and make sure CORE_CHAINCODE_LOGGING_LEVEL is set to DEBUG initially

wlahti (Thu, 14 Sep 2017 22:18:55 GMT):
feel free to reach out to me with any further logging questions that come up

debrajo (Thu, 14 Sep 2017 22:23:34 GMT):
Thanks.. appreciate it .. I'm out tomorrow .. so will try all this on Monday

debrajo (Thu, 14 Sep 2017 22:24:39 GMT):
@wlahti Sorry.. so code wise, my logger-sample.go looks good ?

wlahti (Thu, 14 Sep 2017 23:14:11 GMT):
@debrajo yes, the code itself works. I'd recommend removing the SetLevel statements for now until you get around to implementing/testing that part.

niteshsolanki (Fri, 15 Sep 2017 09:29:27 GMT):
Hi. I am getting the following error on the peer while trying to make invoke calls. The error log is not clear why simulation is failing. https://github.com/hyperledger/fabric/blob/release/core/endorser/endorser.go#L466

muralisr (Fri, 15 Sep 2017 12:14:58 GMT):
@niteshsolanki this could be coming from the chaincode side. Suggest taking a look at the chaincode logs

szhman (Fri, 15 Sep 2017 16:34:54 GMT):
Has joined the channel.

k_watanabe (Sat, 16 Sep 2017 06:27:39 GMT):
Has joined the channel.

annajirajesh (Sun, 17 Sep 2017 22:55:02 GMT):
Has joined the channel.

luke16 (Mon, 18 Sep 2017 01:23:50 GMT):
Has joined the channel.

argman (Mon, 18 Sep 2017 07:15:40 GMT):
Has joined the channel.

wy (Mon, 18 Sep 2017 11:22:38 GMT):
anyone knows how i can extract the creator from `getCreator()`?

jrosmith (Mon, 18 Sep 2017 13:18:50 GMT):
@wy ``` func getSigner(stub shim.ChaincodeStubInterface) (string, error) { creator, err := stub.GetCreator() if err != nil { return "", err } id := &mspprotos.SerializedIdentity{} err = proto.Unmarshal(creator, id) if err != nil { return "", err } block, _ := pem.Decode(id.GetIdBytes()) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { return "", err } mspID := id.GetMspid() // if you need the mspID signer := cert.Subject.CommonName return signer, nil } ```

wy (Mon, 18 Sep 2017 13:25:39 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tg4cXNMiwfgbjymZv) @jrosmith thanks! will try that out

wy (Mon, 18 Sep 2017 13:29:02 GMT):
@jrosmith what do i import for these? ```./bilateralchannel.go:1599:9: undefined: mspprotos ./bilateralchannel.go:1600:8: undefined: proto ./bilateralchannel.go:1605:14: undefined: pem ./bilateralchannel.go:1607:15: undefined: x509```

jrosmith (Mon, 18 Sep 2017 13:43:20 GMT):
@wy ``` import ( "crypto/x509" "encoding/pem" "github.com/golang/protobuf/proto" mspprotos "github.com/hyperledger/fabric/protos/msp" ) ```

ASP 18 (Mon, 18 Sep 2017 18:54:09 GMT):
Has joined the channel.

StephHuynh (Mon, 18 Sep 2017 21:21:02 GMT):
Has joined the channel.

alix (Tue, 19 Sep 2017 09:28:50 GMT):
Has joined the channel.

DarshanBc (Tue, 19 Sep 2017 11:19:41 GMT):
can anyone comment more about this example chain-code present in this path /go/src/github.com/hyperledger/fabric/examples/chaincode/go/utxo because it speaks about bitcoin type of transaction

DarshanBc (Tue, 19 Sep 2017 11:19:41 GMT):
can anyone comment more about this example chain-code present in this path https://github.com/hyperledger/fabric/tree/release/examples/chaincode/go/utxo because it speaks about bitcoin type of transaction

ShashikumarVishweshwara (Tue, 19 Sep 2017 11:57:52 GMT):
Has joined the channel.

ShashikumarVishweshwara (Tue, 19 Sep 2017 11:58:00 GMT):
Where should the conditions for asset transfer be stored ? and also the records of asset transfer? , should this be stored in hyperledger fabric or a database???

ShashikumarVishweshwara (Tue, 19 Sep 2017 11:58:35 GMT):
while writing chaincode with Go program we have the PutState() and GetState() methods ,if my understanding is right should i be using the PutState method to store the contract or transaction rules example PutState('rules_for_successful',rule1_in_bytes) something like b := []byte("transaction_can_take_place_if_color_green") using putstate method should we be using this method to fill the agreement points between two transacting parties for the transaction to be successful and then using the getstate method to pull the points and verify it, can someone clarify this?

niteshsolanki (Tue, 19 Sep 2017 11:59:20 GMT):
Hi. I am following this link to run the test. https://github.com/hyperledger/fabric/tree/release/test/regression/daily/chaincodeTests getting following error: CalledProcessError: Command '['./network_setup.sh up channel 2 1 4']' returned non-zero exit status 1 any config settings needs to be done before running the test ?

Luxii (Tue, 19 Sep 2017 12:34:00 GMT):
Any example / use case for `setEvent()` method ?

habpygo (Tue, 19 Sep 2017 14:04:02 GMT):
Hi, I want to iterate over all the transaction id’s (TxID) on the blockchain and extract the Key/Value pairs belonging to the different TxID’s. I can iterate over all the Keys and get the Value and TxID for each Key, but that’s not what I want. Looking at the marbles example, we can query “a” and extract the Value; so if “a” starts out at 100, buys 100 and then sells 50, we only see the Value for “a” (150) and the TxID for the last transaction, while I would like to see this: ``` TxID Key Value 1607f… a 100 967f2… a 200 e03bc… a 150 ``` Any idea which function/method to use? Looking at the shim interface, `GetTxID() string` is probably not what I want.

habpygo (Tue, 19 Sep 2017 14:04:02 GMT):
I want to iterate over all the transaction id’s (TxID) on the blockchain and extract the Key/Value pairs belonging to the different TxID’s. I can iterate over all the Keys and get the Value and TxID for each Key, but that’s not what I want. Looking at the marbles example, we can query “a” and extract the Value; so if “a” starts out at 100, buys 100 and then sells 50, we only see the Value for “a” (150) and the TxID for the last transaction, while I would like to see this: ``` TxID Key Value 1607f… a 100 967f2… a 200 e03bc… a 150 ``` Any idea which function/method to use?

kletkeman (Tue, 19 Sep 2017 20:21:06 GMT):
@habpygo I would suggest that you crawl the blocks for the channel in which you are interested. Start from the top and you will be able to list them in order starting with most recent first.

ykcai (Tue, 19 Sep 2017 21:55:49 GMT):
Has joined the channel.

sampath06 (Wed, 20 Sep 2017 04:32:23 GMT):
How do we install additional packages to be used with the chaincode. I would like to use proto but am getting the error below: ``` cannot find package "github.com/golang/protobuf/proto" ```

DarshanBc (Wed, 20 Sep 2017 05:49:53 GMT):
if I Invoke a chaincode from other chaincode and do putState() will it be comittted to DB after transaction is executed completely?

habpygo (Wed, 20 Sep 2017 07:24:01 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tkMNQgXiosFzLCY9c) @kletkeman , thanks for the suggestion, but I think that I’m missing something fundamental here. The question is how do I “crawl the blocks for the channel?” Or put it differently, how do I scrutinize the ledger? Looking at `interfaces.go` in the `shim` package, I can find two iterators, i.e. `StateQueryIteratorInterface` and `HistoryQueryIteratorInterface`, all stating: “…allows a chaincode to iterate over a set of key/value pairs…” As I said before, by using the same Key for a nth transaction, this will overwrite the Value of the (n-1)th transaction for that Key, so this is useless; I want to see all n transactions for the same key. If you have any suggestions please let me know. Thanks.

shubhamvrkr (Wed, 20 Sep 2017 10:29:35 GMT):
Has joined the channel.

shubhamvrkr (Wed, 20 Sep 2017 10:30:16 GMT):
Hi. Is the hyperledger/fabric-testenv image available for chaincode unit testing ?

leminhy89 (Wed, 20 Sep 2017 10:51:34 GMT):
Has joined the channel.

Colonel_HLE (Wed, 20 Sep 2017 12:17:27 GMT):
Has joined the channel.

kletkeman (Wed, 20 Sep 2017 13:30:24 GMT):
@habpygo Oh, sorry, you seem to be wanting to do this from inside a smart contract. I can't quite see any reason for doing that, so it never occurred to me that someone would want to. I don't think that there is an interface for it in user chaincode, so you are relegated to doing whatever you can through the shim. What you want is easily done using the SDKs. For any given channel: (1) Get chainheight, (2) read blocks starting at chainheight, decrementing by 1, (3) parse block for transactions in array -- ID, original payload, r/w set, and events

kletkeman (Wed, 20 Sep 2017 13:30:24 GMT):
@habpygo Oh, sorry, you seem to be wanting to do this from inside a smart contract. I can't quite see any reason for doing that, so it never occurred to me that someone would want to. I don't think that there is an interface for it in user chaincode, so you are relegated to doing whatever you can through the shim.

kletkeman (Wed, 20 Sep 2017 13:30:24 GMT):
@habpygo Oh, sorry, you seem to be wanting to do this from inside a smart contract. I can't quite see any reason for doing that, so it never occurred to me that someone would want to. I don't think that there is an interface for it in user chaincode, so you are relegated to doing whatever you can through the shim.

kletkeman (Wed, 20 Sep 2017 13:30:24 GMT):
@habpygo Oh, sorry, you seem to be wanting to do this from inside a smart contract. I can't quite see any reason for doing that, so it never occurred to me that someone would want to. I don't think that there is an interface for it in user chaincode, so you are relegated to doing whatever you can through the shim. This is easily done using the SDKs.

kletkeman (Wed, 20 Sep 2017 13:30:24 GMT):
@habpygo Oh, sorry, you seem to be wanting to do this from inside a smart contract. I can't quite see any reason for doing that, so it never occurred to me that someone would want to. I don't think that there is an interface for it in user chaincode, so you are relegated to doing whatever you can through the shim. What you want is easily done using the SDKs. For any given channel: (1) Get chainheight, (2) read blocks starting at chainheight, decrementing by 1, (3) parse block for transactions by ID with r/w sets and events

habpygo (Wed, 20 Sep 2017 15:02:48 GMT):
@kletkeman I’m not sure that I’m following you now. In order to successfully perform read/write operations against the ledger — and I want to read — one needs chaincode. Well in any case let me puddle along. Thanks so far.

chrisg (Wed, 20 Sep 2017 18:29:57 GMT):
Has joined the channel.

mna2017 (Thu, 21 Sep 2017 07:32:59 GMT):
@kletkeman Hi, I would like to use the SDK for getting chainheight, reading blocks, payload etc. as you mentioned in your last answer. Is there an example of SDK calls doing this. I am looking for an example node application where such calls are present. Please note that i deployed my chaincode using hyperledger composer.

tinywell (Thu, 21 Sep 2017 08:59:02 GMT):
Hi.I can use "stub.GetCreator()" to get the creator's info,but how to get the creator's cert? could any one help?

Luxii (Thu, 21 Sep 2017 09:17:25 GMT):
I'm trying to use `registerChaincodeEvent()` here , But its not executing .... im not even getting *chaincodeEvent* printed on the console. ``` 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(); }); }```

Amber.Zhang (Thu, 21 Sep 2017 09:52:34 GMT):
Has joined the channel.

Amber.Zhang (Thu, 21 Sep 2017 09:57:31 GMT):
Hi, I am trying 'chaincode for developers' part in the http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html. When try to start the network under directory 'chaincode-docker-devmode' via the command 'ibmadmin@Amber-Ubuntu-8:~/gopath/src/github.com/fabric-samples/chaincode-docker-devmode$ docker-compose -f docker-compose-simple.yaml', up', I see the error log "2017-09-21 09:21:18.034 UTC [orderer/main] initializeGrpcServer -> CRIT 002 Failed to listen: listen tcp 9.42.26.131:7050: bind: cannot assign requested address".

Amber.Zhang (Thu, 21 Sep 2017 10:01:01 GMT):
I opened the source code of orderer 'main.go', the error is from the line code ' grpcServer := initializeGrpcServer(conf)', but I don't find where the variable 'conf' is defined. Who has any idea about the problem? By the way, the ip address in the error log is not my virtual machine address. Is the ip addr assigned to orderer docker container?

navaneethaa (Thu, 21 Sep 2017 11:09:36 GMT):
Has joined the channel.

betheone5 (Thu, 21 Sep 2017 13:20:05 GMT):
Has joined the channel.

betheone5 (Thu, 21 Sep 2017 13:21:35 GMT):
Hi, I am following get started on https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html. when i start to execute ./startFrabric.sh i get the following error

betheone5 (Thu, 21 Sep 2017 13:22:21 GMT):
Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx Error response from daemon: Container 503cef83f2eb9c5ef0f8508de95f4f31a7e84629e7d7727c07a9978b1d3e0709 is not running

betheone5 (Thu, 21 Sep 2017 13:22:30 GMT):
Any help would be appricated... Thans

betheone5 (Thu, 21 Sep 2017 13:22:30 GMT):
Any help would be appricated... Thanks

leezie (Thu, 21 Sep 2017 13:35:57 GMT):
Has joined the channel.

wlahti (Thu, 21 Sep 2017 16:06:44 GMT):
@Luxii I'll try to take a look at this based on my knowledge of events on the server side, but I think you may want to reach out in #fabric-sdk-node given this code appears to be Node SDK code.

wlahti (Thu, 21 Sep 2017 16:22:11 GMT):
Never mind, I see that you already have.

bmalavan (Thu, 21 Sep 2017 17:59:07 GMT):
Hi, I am trying to get one state back from current world state of an asset from the ledger. (i.e., If current state of an asset is S, i would like to get S-1 or S-2 data) Is there any efficient way of doing it without using `stub.GetHistoryForKey()`. The problem I foresee is, if a certain asset has 10K state change, This would result me that many value objects and I need to iterate every time to get the correct previous state of an asset. any idea is appreciated?

jrosmith (Thu, 21 Sep 2017 19:05:21 GMT):
@tinywell ``` import ( "crypto/x509" "encoding/pem" "github.com/golang/protobuf/proto" mspprotos "github.com/hyperledger/fabric/protos/msp" ) func getSigner(stub shim.ChaincodeStubInterface) (string, error) { creator, err := stub.GetCreator() if err != nil { return "", err } id := &mspprotos.SerializedIdentity{} err = proto.Unmarshal(creator, id) if err != nil { return "", err } block, _ := pem.Decode(id.GetIdBytes()) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { return "", err } mspID := id.GetMspid() // if you need the mspID signer := cert.Subject.CommonName return signer, nil } ```

RunchaoHan (Thu, 21 Sep 2017 20:09:01 GMT):
Has joined the channel.

sampath06 (Fri, 22 Sep 2017 02:19:08 GMT):
@jrosmith Using the code above I get a 'cannot find package "github.com/golang/protobuf/proto"' error. Any ides on how to fix that?

Amber.Zhang (Fri, 22 Sep 2017 02:55:37 GMT):
@betheone5 Please run 'docker ps -a' to check if the peer and orderer container is up or not.

luckydogchina (Fri, 22 Sep 2017 02:56:00 GMT):
Do we need to send the install tx to orderers or only send the SignedChaincodeDeploymentSpec to endorsors, when installing the chaincode?

kapilAtrey (Fri, 22 Sep 2017 05:04:06 GMT):
Has joined the channel.

jethdg (Fri, 22 Sep 2017 11:14:32 GMT):
How do you guys get peer identity in the chaincode? The certain peer who performs the invoke?

wampum (Fri, 22 Sep 2017 11:40:18 GMT):
Has joined the channel.

muralisr (Fri, 22 Sep 2017 13:44:50 GMT):
@luckydogchina the chaincode is installed on the peers which would need to endorse proposals to the chaincode (ie, orderer not involved in the install process)

muralisr (Fri, 22 Sep 2017 13:46:30 GMT):
@jethdg the chaincode is installed on a peer .. an invoke on the chaincode woukd use the peer to endorse (if the invoke was successful)

danconway (Fri, 22 Sep 2017 15:33:05 GMT):
Has joined the channel.

jrosmith (Fri, 22 Sep 2017 15:37:49 GMT):
@sampath06 `go get -u github.com/golang/protobuf/protoc-gen-go`

vmd90 (Fri, 22 Sep 2017 20:53:30 GMT):
Has joined the channel.

sampath06 (Sat, 23 Sep 2017 01:21:04 GMT):
@jrosmith I did that and am still getting the 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 "chaincode/input/src/github.com/marbles_mini/marbles_chaincode.go:91: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 ``` How can I debug this further? Thanks for your help

muralisr (Sat, 23 Sep 2017 16:21:23 GMT):
@sampath06 let me copy ^^^ to fabric-sdk-node please (assuming you havem't done so already)

kartikeyagupta (Mon, 25 Sep 2017 04:10:29 GMT):
Has joined the channel.

kartikeyagupta (Mon, 25 Sep 2017 04:24:08 GMT):
hi previously have written chaincode and deployed it over free blokchain service on bluemix which was coming with 4 node setup.

kartikeyagupta (Mon, 25 Sep 2017 04:25:46 GMT):
have also integrated UI using rest API with bluemix blockchain service. however since my trial bluemix expired, registered with new account however not able to locate free blockchain n/w/service with 4 nodes .

kartikeyagupta (Mon, 25 Sep 2017 04:26:36 GMT):
any idea if IBM has stopped that service with trail account ?

Amit04Patel (Mon, 25 Sep 2017 06:04:19 GMT):
Hi all, I am trying to implement block-listener using the code given here https://github.com/hyperledger/fabric/tree/v1.0.0/examples/events/block-listener I have set CORE_PEER_TLS_ENABLED=false in docker-compose-cli.yaml and base/peer-base.yaml and ORDERER_GENERAL_TLS_ENABLED=false in base/docker-compose-base.yaml but i am getting the following erros when I try to run it from my local machine (Ubuntu 16.04) root@ampapate-in:/scratch/Hyperledger1.0/fabric-examples/examples/events/block-listener# ./block-listener -events-address=0.0.0.0:7053 -events-from-chaincode=mycc:1.0 -events-mspdir=/scratch/Hyperledger1.0/fabric-examples/examples/e2e_cli/crypto-config/peerOrganizations/org1.example.com/users/Admin\@org1.example.com/msp -events-mspid=Org1MSP Event Address: 0.0.0.0:7053 could not start chat. err: rpc error: code = Internal desc = transport is closing Error creating event client and this when I try to run it from the client container root@53776565f687:/opt/gopath/src/github.com/hyperledger/fabric/examples/block-listener# ./block-listener -events-address=0.0.0.0:7053 -events-from-chaincode=mycc:1.0 -events-mspdir=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp -events-mspid=Org1MSP Event Address: 0.0.0.0:7053 could not start chat. err: could not create client conn to 0.0.0.0:7053:context deadline exceeded Error creating event client

yoyokeen (Mon, 25 Sep 2017 08:17:05 GMT):
Does the CompositeKey support GetStateByRange()?

DarshanBc (Mon, 25 Sep 2017 09:53:05 GMT):
@jrosmith 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:05 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

adarsh_10 (Mon, 25 Sep 2017 12:32:45 GMT):
Has joined the channel.

jrosmith (Mon, 25 Sep 2017 18:24:49 GMT):
@DarshanBc @muralisr @sampath06 how are you guys deploying your chaincode? using an sdk or cli? are you vendoring your dependencies?

jrosmith (Mon, 25 Sep 2017 19:23:11 GMT):
@yoyokeen how do you mean? are you asking if transactions with a composite key are included in `GetStateByRange()` or if querying by a composite key returns a range?

DarshanBc (Tue, 26 Sep 2017 01:03:25 GMT):
@jrosmith it got solved for me I was using SDK

yoyokeen (Tue, 26 Sep 2017 03:13:05 GMT):
@jrosmith ,yes, querying by a composite key return a range.

yoyokeen (Tue, 26 Sep 2017 03:14:13 GMT):
Now,I use the levelDB, just return a range by simple key.

yoyokeen (Tue, 26 Sep 2017 03:14:35 GMT):
the composite key cant.

jethdg (Tue, 26 Sep 2017 05:21:30 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=SdGrN7Bvmsc3Xu8Mg) @muralisr Do you know what method i can use in the chaincode to get the peer who endorsed the transaction?

jethdg (Tue, 26 Sep 2017 05:21:30 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=SdGrN7Bvmsc3Xu8Mg) @muralisr Do you know what method i can use in the chaincode to get the peer who endorsed the transaction? An Equivalent of msg.sender in solidity?

DarshanBc (Tue, 26 Sep 2017 05:31:24 GMT):
Is there any Usecase which involves a block is searched by hash or TxID

tbltzk (Tue, 26 Sep 2017 07:22:26 GMT):
I think, If there is a dispute about when a transactions happened, this might be helpful. Anyway, at least for devlopers I'd consider this rather useful

tbltzk (Tue, 26 Sep 2017 07:28:10 GMT):
Tutorials from the fabric-samples repo suggest to interact with the chaincode via cli like `peer chaincode invoke -n mycc *-c* *'{"Args":["invoke","a","b","10"]}'* -C myc`. Is there a way to submit the content from a file instead of providing plain text?

tbltzk (Tue, 26 Sep 2017 07:28:10 GMT):
Tutorials from the fabric-samples repo suggest to interact with the chaincode via cli like `peer chaincode invoke -n mycc -c '{"Args":["invoke","a","b","10"]}' -C myc`. Is there a way to submit the content from a file instead of providing plain text?

tbltzk (Tue, 26 Sep 2017 07:29:43 GMT):
I'd love something like `peer chaincode invoke -n mycc -f my-invoke.json -C myc`

DarshanBc (Tue, 26 Sep 2017 07:41:12 GMT):
I need to use ledger_interface.go at src/github.com/hyperledger/fabric/core/ledger how do I add it in vendor tree

DarshanBc (Tue, 26 Sep 2017 07:58:11 GMT):
I did `govendor fetch github.com/hyperledger/fabric/core/ledger/kvledger`

DarshanBc (Tue, 26 Sep 2017 07:58:11 GMT):
I did `govendor fetch github.com/hyperledger/fabric/core/ledger`

DarshanBc (Tue, 26 Sep 2017 07:59:01 GMT):
but cursor is just blinking not moving any further

wy (Tue, 26 Sep 2017 11:16:54 GMT):
Hi guys, how do i specify the "creator" for the mockstub ?

DarshanBc (Tue, 26 Sep 2017 11:20:18 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=GiSy3YHDrdm4RwzMo) Issue is resolved

DarshanBc (Tue, 26 Sep 2017 11:22:40 GMT):
Hi I am trying to user github.com/hyperledger/fabric/core/ledger/ledger_interface.go I have used like this ```func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ var plp ledger.PeerLedgerProvider var pl ledger.PeerLedger lId,err:=plp.List()``` but I am getting run time error as ```panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x40301b] goroutine 7 [running]: panic(0x9eb1a0, 0xc420016040) /opt/go/src/runtime/panic.go:500 +0x1a1 main.(*SimpleChaincode).expt(0xfaa000, 0xf71120, 0xc42016ae80, 0xc4202faad0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/example_cc/example_cc.go:191 +0x5b main.(*SimpleChaincode).Invoke(0xfaa000, 0xf71120, 0xc42016ae80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /chaincode/input/src/github.com/example_cc/example_cc.go:98 +0x430 github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4202389a0, 0xc4200119a0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:317 +0x483 created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:328 +0x49``` what may be the problem

DarshanBc (Tue, 26 Sep 2017 11:22:40 GMT):
Hi I am trying to user github.com/hyperledger/fabric/core/ledger/ledger_interface.go I have used like this ```func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ var plp ledger.PeerLedgerProvider var pl ledger.PeerLedger lId,err:=plp.List()``` but I am getting run time error as ```panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x40301b] goroutine 7 [running]: panic(0x9eb1a0, 0xc420016040) /opt/go/src/runtime/panic.go:500 +0x1a1 main.(*SimpleChaincode).expt(0xfaa000, 0xf71120, 0xc42016ae80, 0xc4202faad0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/example_cc/example_cc.go:191 +0x5b main.(*SimpleChaincode).Invoke(0xfaa000, 0xf71120, 0xc42016ae80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /chaincode/input/src/github.com/example_cc/example_cc.go:98 +0x430 github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4202389a0, 0xc4200119a0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:317 +0x483 created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:328 +0x49``` what may be the problem

DarshanBc (Tue, 26 Sep 2017 11:22:40 GMT):
Hi I am trying to user github.com/hyperledger/fabric/core/ledger/ledger_interface.go I have used like this ```func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ var plp ledger.PeerLedgerProvider var pl ledger.PeerLedger lId,err:=plp.List()``` but I am getting run time error as ```panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x40301b] goroutine 7 [running]: panic(0x9eb1a0, 0xc420016040) /opt/go/src/runtime/panic.go:500 +0x1a1 main.(*SimpleChaincode).expt(0xfaa000, 0xf71120, 0xc42016ae80, 0xc4202faad0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/example_cc/example_cc.go:191 +0x5b main.(*SimpleChaincode).Invoke(0xfaa000, 0xf71120, 0xc42016ae80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /chaincode/input/src/github.com/example_cc/example_cc.go:98 +0x430 github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4202389a0, 0xc4200119a0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:317 +0x483 created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:328 +0x49``` what may be the problem

DarshanBc (Tue, 26 Sep 2017 11:24:41 GMT):
I am passing only 2 args but in error it is displaying as 4!!!

muralisr (Tue, 26 Sep 2017 11:48:54 GMT):
@DarshanBc if you changed chaincode, make sure to delete the old image

DarshanBc (Tue, 26 Sep 2017 11:50:11 GMT):
yes it is deleted with command `docker rmi dev-peer0-.....```

DarshanBc (Tue, 26 Sep 2017 11:50:11 GMT):
yes it is deleted with command `docker rmi dev-peer0-.....`

DarshanBc (Tue, 26 Sep 2017 12:17:41 GMT):
If there are any sample chaincode which has implemented interfaces other than shim.xx please post the link

sampath06 (Tue, 26 Sep 2017 13:12:27 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Ayp9ggcbkhGN497CL) @DarshanBc Where did you run the govendor command? I think I need to do the same for proto to resolve my issue

jrosmith (Tue, 26 Sep 2017 13:27:47 GMT):
@yoyokeen that seems to be the expected behavior if querying by a full composite key. if you want to get a range you should use a partial composite key: https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetStateByPartialCompositeKey partial composite keys are implemented in the marbles chaincode example: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/marbles02/marbles_chaincode.go

jrosmith (Tue, 26 Sep 2017 13:29:14 GMT):
@DarshanBc glad to hear the vendoring solved the problem! for the second issue you posted, is that short code block what exists in example_cc.go on line 191?

jrosmith (Tue, 26 Sep 2017 13:32:26 GMT):
@wy meaning `mockstub.GetCreator()`? if so, it is not implemented. https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/mockstub.go#L280

wy (Tue, 26 Sep 2017 13:33:05 GMT):
@jrosmith i have a getcreator in my actual chaincode function which i want to test

wy (Tue, 26 Sep 2017 13:33:34 GMT):
so i want to be able to set the "creator" to see if the function logic passed as expected

jrosmith (Tue, 26 Sep 2017 13:34:53 GMT):
@wy hmm good question. i'm guessing you'd have to sign off on the transaction in the mock.Invoke? @mastersingh24 would probably more help here

mastersingh24 (Tue, 26 Sep 2017 13:35:36 GMT):
Either that or just implement a mock version of GetCreator

mastersingh24 (Tue, 26 Sep 2017 13:35:41 GMT):
probably the best option

mastersingh24 (Tue, 26 Sep 2017 13:36:08 GMT):
Because the mock stub runs chaincode standalone rather than through the peer

wy (Tue, 26 Sep 2017 13:36:59 GMT):
@mastersingh24 what do you mean by a mock version of GetCreator?

DarshanBc (Tue, 26 Sep 2017 13:41:13 GMT):
@sampath06 for protobuf you need not run govendor command there is a directory inside /hyperledger/core/vendor you need to paste vendor directory inside your chaincode directory along with .go file

DarshanBc (Tue, 26 Sep 2017 13:42:27 GMT):
Anyway for other dependency you need to run govendor where your vendor directory is present

mastersingh24 (Tue, 26 Sep 2017 13:42:48 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/mockstub.go#L281 (https://chat.hyperledger.org/channel/chaincode-dev?msg=3bWmzigfk6cyiC3Hc) @wy

mastersingh24 (Tue, 26 Sep 2017 13:43:09 GMT):
You'll see that mockstub returns nil,nil for GetCreator

mastersingh24 (Tue, 26 Sep 2017 13:43:25 GMT):
You could modify that to return something for testing purposes

wy (Tue, 26 Sep 2017 13:43:47 GMT):
@mastersingh24 i cant do that right? i am trying to test my actual chaincode function which makes use of GetCreator

mastersingh24 (Tue, 26 Sep 2017 13:44:04 GMT):
Are you doing mock testing or real testing?

mastersingh24 (Tue, 26 Sep 2017 13:44:21 GMT):
Meaning using a peer or not

wy (Tue, 26 Sep 2017 13:44:32 GMT):
trying to use the mock to do some basic unit tests

mastersingh24 (Tue, 26 Sep 2017 13:44:38 GMT):
If you use a peer, then no issue - just submit a trans against the peer to invoke chaincode

wy (Tue, 26 Sep 2017 13:44:47 GMT):
unless you have another way which i can perform unit tests on my chaincodes?

mastersingh24 (Tue, 26 Sep 2017 13:45:32 GMT):
But if you are doing mock, then you'd need to modify the mockstub.GetCreator to return a real value - even if just a test value

wy (Tue, 26 Sep 2017 13:48:29 GMT):
yes, but i dont need the mock to GetCreator

wy (Tue, 26 Sep 2017 13:51:54 GMT):
the getcreator is in my actual chaincode function, problem is.. if i were to do a mockinvoke to test that, the function will fail due to the creator not being the value as expected

mastersingh24 (Tue, 26 Sep 2017 13:53:27 GMT):
Hmm - maybe I am not understanding what exactly you are doing

DarshanBc (Wed, 27 Sep 2017 02:25:00 GMT):
I need to join another organization to my network of channel xyz dynamically where already 2orgs exist org3 have their own set of functionalities p,q,r written in chaincode how to make these new functionalities available for the members of org1 and org2

DarshanBc (Wed, 27 Sep 2017 04:11:51 GMT):
I have this error while instantiating chaincode ```2017-09-27 04:09:42.039 UTC [shim] func1 -> ERRO 001 Received error from server: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode), ending chaincode stream 2017-09-27 04:09:42.040 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode) ```

DarshanBc (Wed, 27 Sep 2017 04:11:51 GMT):
I have this error while instantiating chaincode through SDK ```2017-09-27 04:09:42.039 UTC [shim] func1 -> ERRO 001 Received error from server: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode), ending chaincode stream 2017-09-27 04:09:42.040 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode) ```

DarshanBc (Wed, 27 Sep 2017 04:14:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=voL2tZ6cdoY3J2Pi5) @jrosmith ```line 96if function == "expt" { line 97 :// Deletes an entity from its state line 98: return t.expt(stub, args) }```

DarshanBc (Wed, 27 Sep 2017 04:14:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=voL2tZ6cdoY3J2Pi5) @jrosmith ```line 96if function == "expt" { line 97 :// Deletes an entity from its state line 98: return t.expt(stub, args) }``` then ```line 187:func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ line 188: line 189: var plp ledger.PeerLedgerProvider line 190: var pl ledger.PeerLedger line 191: lId,err:=plp.List() line 192: if err != nil { line 193: return shim.Error("Invalid transaction amount, expecting a integer value") } fmt.Println(" List lists the ids of the existing ledgers") fmt.Println(lId) yesNO,err:=plp.Exists(lId[0]) if err != nil { return shim.Error("Invalid transaction amount, expecting a integer value") } fmt.Println(" tells whether the ledger with given id exists") fmt.Println(yesNO) txid:=args[0] tx,err:=pl.GetTransactionByID(txid) if err != nil { return shim.Error("Invalid transaction amount, expecting a integer value") } fmt.Println("transaction") fmt.Println(tx) return shim.Success(nil) }```

DarshanBc (Wed, 27 Sep 2017 04:14:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=voL2tZ6cdoY3J2Pi5) @jrosmith ```line 96if function == "expt" { line 97 :// Deletes an entity from its state line 98: return t.expt(stub, args) }``` then ```line 187:func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ line 188: line 189: var plp ledger.PeerLedgerProvider line 190: var pl ledger.PeerLedger line 191: lId,err:=plp.List() line 192: if err != nil { line 193: return shim.Error("Invalid transaction amount, expecting a integer value") } fmt.Println(" List lists the ids of the existing ledgers") fmt.Println(lId) yesNO,err:=plp.Exists(lId[0]) if err != nil { return shim.Error("Error occured") } fmt.Println(" tells whether the ledger with given id exists") fmt.Println(yesNO) txid:=args[0] tx,err:=pl.GetTransactionByID(txid) if err != nil { return shim.Error("Error occured in GetTransactionByID()") } fmt.Println("transaction") fmt.Println(tx) return shim.Success(nil) }```

DarshanBc (Wed, 27 Sep 2017 04:14:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=voL2tZ6cdoY3J2Pi5) @jrosmith ```line 96if function == "expt" { line 97 :// Deletes an entity from its state line 98: return t.expt(stub, args) }``` then ```line 187:func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ line 188: line 189: var plp ledger.PeerLedgerProvider line 190: var pl ledger.PeerLedger line 191: lId,err:=plp.List() line 192: if err != nil { line 193: return shim.Error("Error occured while parsing List()") } fmt.Println(" List lists the ids of the existing ledgers") fmt.Println(lId) yesNO,err:=plp.Exists(lId[0]) if err != nil { return shim.Error("Error occured") } fmt.Println(" tells whether the ledger with given id exists") fmt.Println(yesNO) txid:=args[0] tx,err:=pl.GetTransactionByID(txid) if err != nil { return shim.Error("Error occured in GetTransactionByID()") } fmt.Println("transaction") fmt.Println(tx) return shim.Success(nil) }```

sampath06 (Wed, 27 Sep 2017 05:59:57 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=9GcoTdBwecSL8LiCo) @DarshanBc @jrosmith Just copying the files did not work. I did a govendor init and a govendor add +external. The protobuf code is now working. Thanks for the help

DarshanBc (Wed, 27 Sep 2017 06:00:45 GMT):
ok welcome

Amjadnz (Wed, 27 Sep 2017 06:24:07 GMT):
Starting a new DEV Environment with the MAC ```Amjads-MacBook-Pro:fabric amjad$ make dist-clean all 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```

Amjadnz (Wed, 27 Sep 2017 06:24:31 GMT):
Seems my MAC is missing the protoc-gen-go package

Amjadnz (Wed, 27 Sep 2017 06:24:55 GMT):
or atleast the DOCKER/gotools folder is not having a reference to it

Amjadnz (Wed, 27 Sep 2017 06:25:05 GMT):
Can anyone suggest?

Amjadnz (Wed, 27 Sep 2017 06:27:33 GMT):
Yep - got the result. ```https://stackoverflow.com/questions/41040156/cp-cannot-stat-build-docker-gotools-bin-protoc-gen-go-no-such-file-or-direct```

Amjadnz (Wed, 27 Sep 2017 06:27:36 GMT):
https://stackoverflow.com/questions/41040156/cp-cannot-stat-build-docker-gotools-bin-protoc-gen-go-no-such-file-or-direct

Amjadnz (Wed, 27 Sep 2017 06:27:44 GMT):
This got my issue resolved.

Amjadnz (Wed, 27 Sep 2017 07:11:29 GMT):
Another question if someone might help?

Amjadnz (Wed, 27 Sep 2017 07:11:52 GMT):
Setting up a new MAC for hyperledger dev mode. Got the hyperledger compiled properly using `make dist-clean all` Now Once I start he orderer `./build/bin/orderer` I get the following error

Amjadnz (Wed, 27 Sep 2017 07:12:15 GMT):
```2017-09-27 10:57:05.679 GST [orderer/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration:Unsupported Config Type "" goroutine 1 [running]: github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc4201bfd70, 0xc42027a080, 0x2, 0x2) /tts/official/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xc7 github.com/hyperledger/fabric/orderer/localconfig.Load(0xc420262840) /tts/official/src/github.com/hyperledger/fabric/orderer/localconfig/config.go:231 +0x46b main.main() /tts/official/src/github.com/hyperledger/fabric/orderer/main.go:69 +0x2f6```

Amjadnz (Wed, 27 Sep 2017 07:12:37 GMT):
Looks like the GO-LOGGING is not able to recognize the CONFIG/LOG LEVEL

Amjadnz (Wed, 27 Sep 2017 07:12:46 GMT):
Any clues - would be appreciated.

Amjadnz (Wed, 27 Sep 2017 07:14:34 GMT):
By the way go-logging is available with version `2.0.0-rc1 (2016-02-11)`

Amjadnz (Wed, 27 Sep 2017 07:18:59 GMT):
@mastersingh24 - has mentioned about a CFG path for FABRIC_CFG_PATH on issue https://jira.hyperledger.org/browse/FAB-3438?focusedCommentId=24893&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-24893 Setting this to my current working directory is also not solving the item (till hyperledger/fabric)

Amjadnz (Wed, 27 Sep 2017 07:40:41 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=KKACR9utHTJL67j22) @Amjadnz - Looks to be fine. As singh mentioned - it is part of the official docs now to set the CFG path and once done all is fine with me.

jrosmith (Wed, 27 Sep 2017 13:12:22 GMT):
@DarshanBc in your `Init()` for the chaincode are you logging what happens when it does not start up succesfully? I suspect that on line 191 `plp` may not be defined, i'd recommend logging `plp` and `plp.List()` on a new line between 190 and 191 to be sure

mna2017 (Wed, 27 Sep 2017 17:44:24 GMT):
HI All, I have code written for hyperledger v0.6. What all do I need to do to port this code to hyperledger v1.0? The chaincode is in golang. Is there any developer guide for achieving this?

AnkurDaharwal (Wed, 27 Sep 2017 17:52:49 GMT):
Has joined the channel.

clempo (Wed, 27 Sep 2017 19:10:44 GMT):
Has joined the channel.

clempo (Wed, 27 Sep 2017 19:14:11 GMT):
In chaincode, how do I get the latest Version of a key (i.e. blockNum and TxNum) without calling GetHistoryForKey() because core.ledger.history.enableHistoryDatabase may be false in general. This info is available to the shim because it will appear in the ReadSet if I call GetState()

jrosmith (Wed, 27 Sep 2017 20:12:52 GMT):
@mna2017 ibm wrote a guide here: https://developer.ibm.com/blockchain/2017/03/17/migrate-fabric-v0-6-based-chaincode-run-latest-fabric-v1-0/

jrosmith (Wed, 27 Sep 2017 20:13:43 GMT):
@clempo assuming you've been using the same key when updating state with `stub.PutState()` you can grab the latest value the key points to just by using `stub.GetState()`

clempo (Wed, 27 Sep 2017 20:15:09 GMT):
@jrosmith, I asked for the key Version as seen in the ReadSet deep within a BlockInfo. Getting the latest key value is trivial as you point out.

jrosmith (Wed, 27 Sep 2017 20:17:06 GMT):
oh so you're looking for the value of a key at a certain point in the keys history?

clempo (Wed, 27 Sep 2017 20:17:07 GMT):
What I'm hinting at is GetHistoryForKey() should work for at least one item in the iteration regardless of the db settings. It could possibly work if I tried, but then the function comment needs updating.

clempo (Wed, 27 Sep 2017 20:17:40 GMT):
Yes, that's what GetHistoryForKey() does but it requires a setting on the engine

clempo (Wed, 27 Sep 2017 20:18:18 GMT):
I want the latest version even if that setting is off

jrosmith (Wed, 27 Sep 2017 20:20:02 GMT):
ok so just to make sure i'm understanding correctly...with enableHistoryDatabase off you want to be able to get an iterator of historic values or one specific value from that iterator

jrosmith (Wed, 27 Sep 2017 20:20:14 GMT):
as in a specific block

clempo (Wed, 27 Sep 2017 20:20:14 GMT):
That should be easy to do for the engine since it puts it in the ReadSet of the transaction

clempo (Wed, 27 Sep 2017 20:20:49 GMT):
I want to be able to get the first item, the one for the current version, it's already available to the engine to store in the ReadSet

clempo (Wed, 27 Sep 2017 20:21:10 GMT):
Another function in the shim to do the same is also acceptable

jrosmith (Wed, 27 Sep 2017 20:27:50 GMT):
hmm thats a good question. not sure how to access that via the chaincode, @mastersingh24 would be more knowledgeable about this

clempo (Wed, 27 Sep 2017 20:28:29 GMT):
Did that ring @mastersingh24 automatically, or I need to write the question elsewhere?

clempo (Wed, 27 Sep 2017 20:29:02 GMT):
another more drastic solution is if the settings is always on

clempo (Wed, 27 Sep 2017 20:29:20 GMT):
or I can ask my users to always set it

clempo (Wed, 27 Sep 2017 20:29:52 GMT):
I noticed the iterator returns the value differently than a ReadSet, that's strange

clempo (Wed, 27 Sep 2017 20:30:26 GMT):
Iterator tells you txid, but ReadSet Version is BlockNum and TxNum

jrosmith (Wed, 27 Sep 2017 20:35:12 GMT):
it will ping him. next time he is online, he will come for you. i think whether or not it is enabled really depends on your use case and is decision you can make during network setup

clempo (Wed, 27 Sep 2017 20:35:54 GMT):
I still think the Key Value Storage should give us that info since it maintains it without the help of the db

clempo (Wed, 27 Sep 2017 20:35:54 GMT):
I still think the Key Value Storage should give us that info since it maintains it without the help of the historic db

clempo (Wed, 27 Sep 2017 20:36:43 GMT):
Is there a discussion somewhere of the implications/impacts of turning on that setting?

Asara (Wed, 27 Sep 2017 20:41:11 GMT):
Has joined the channel.

jrosmith (Wed, 27 Sep 2017 20:42:55 GMT):
maybe the people #fabric-ledger would be able to be of more help?

clempo (Wed, 27 Sep 2017 20:45:55 GMT):
are they the ones responsible for the shim?

jrosmith (Wed, 27 Sep 2017 20:56:01 GMT):
they will most likely have more informed opinions about the implication/impact questions you have, as well as accessing the engine readset

alix (Thu, 28 Sep 2017 02:22:45 GMT):
Hi guys , i want to create channel only from endorse peer , can i create one channel in chaincode ?

wy (Thu, 28 Sep 2017 06:25:10 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?

alix (Thu, 28 Sep 2017 06:41:30 GMT):
@wy can you paste the error info in detail?

wy (Thu, 28 Sep 2017 06:54:53 GMT):
```Execution 1: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Call dropped by load balancing policy at /home/azureuser/ubin-fabric-api/node_modules/grpc/src/node/src/client.js:554:15 Error: Call dropped by load balancing policy Execution 2: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Endpoint read failed at /home/azureuser/ubin-fabric-api/node_modules/grpc/src/node/src/client.js:554:15 Error: Endpoint read failed Execution 3: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at /home/azureuser/ubin-fabric-api/node_modules/grpc/src/node/src/client.js:554:15 Error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) Execution 4: Success – returns expected result.```

wy (Thu, 28 Sep 2017 06:55:29 GMT):
@alix

sampath06 (Thu, 28 Sep 2017 07:08:42 GMT):
I have a setup with couchdb as the store. The chaincode is able to insert the objects into the database. But the queries are not returning any results. I can see those objects in the couchdb browser. Even the basic query is returning null results from couchdb. Any ideas on how to debug this? ``` curl -vv -G \ 'http://localhost:3000/channels/mychannel/chaincodes/marbles_mini3?peer=peer1&fcn=queryMarbles' \ -H "authorization: Bearer $ORG1_TOKEN" \ --data-urlencode 'args=["{\"selector\":{\"_id\":{\"$gt\": null}}}"]' ```

ascatox (Thu, 28 Sep 2017 11:05:35 GMT):
Hi All! I'm trying to develop a chaincode with simple CRUD access to a complex object. I don't understand how it's possible to make queries for fields differenti from the object key!!!Thanks for the help in advance.

ascatox (Thu, 28 Sep 2017 11:05:35 GMT):
Hi All! I'm trying to develop a chaincode with simple CRUD access to a complex object. I don't understand how it's possible to make queries for fields different from the object key!!!Thanks for the help in advance.

sampath06 (Thu, 28 Sep 2017 11:58:01 GMT):
@ascatox Using couchdb, you can do additional queries

ascatox (Thu, 28 Sep 2017 12:24:00 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=PR2jJmPhAutdtz5Zb) @sampath06 Do you have any tutorial, example or other ?

ascatox (Thu, 28 Sep 2017 13:00:05 GMT):
Someone can give me a link to an example of a complex chaincode developed, the examples on the fabric documentation are too simple for a production environment.

ascatox (Thu, 28 Sep 2017 13:04:23 GMT):
I find this post on Medium https://medium.com/wearetheledger/hyperledger-fabric-couchdb-fantastic-queries-and-where-to-find-them-f8a3aecef767

ascatox (Thu, 28 Sep 2017 13:04:35 GMT):
This may be useful!!!

ascatox (Thu, 28 Sep 2017 14:52:19 GMT):
I've a question the command `peer chaincode query`is present yet in the fabric v1.0 or I've to use `peer chaincode invoke`for all functions both queries and insert/update

ascatox (Thu, 28 Sep 2017 14:52:19 GMT):
I've a question ! The command `peer chaincode query`is present yet in the fabric v1.0 or I've to use `peer chaincode invoke`for all functions both queries and insert/update

ascatox (Thu, 28 Sep 2017 14:52:19 GMT):
I've a question ! The command `peer chaincode query`is present yet in the fabric v1.0 or I've to use `peer chaincode invoke`for all functions both query and insert/update

rock_martin (Thu, 28 Sep 2017 15:06:10 GMT):
Anyone let me know some links for using hyperledger fabric as for production based environment setup on multiple different hosts with respect to docker swarm or kubernates, Thanks in advance

jrosmith (Thu, 28 Sep 2017 15:49:07 GMT):
@ascatox, @sampath06 is correct, you'll need to use couchdb and perform rich queries using selectors: http://docs.couchdb.org/en/2.0.0/api/database/find.html#find-selectors

jrosmith (Thu, 28 Sep 2017 15:49:48 GMT):
@sampath06 maybe its an issue with checking id's greater than null? if you query for a specific id does it return the proper value?

sampath06 (Thu, 28 Sep 2017 16:19:58 GMT):
@jrosmith Figured out my mistake. I had changed the chaincode name and looks like the chaincode has to be the same. After changing the code to upgrade the chaincode instead of installing a new one, it is working fine. Thanks

hanhzf (Fri, 29 Sep 2017 01:41:15 GMT):
Has joined the channel.

wy (Fri, 29 Sep 2017 02:44:01 GMT):
Does anyone know how we can make use of the certs defined for the fabric network to verify signatures in my chaincode? 1) Are there any built in chaincode functions which i can use to pull the cert/public keys of a particular org/identity? 2) If so, how can i use them for verification?

Riussi (Fri, 29 Sep 2017 07:40:27 GMT):
Has joined the channel.

ascatox (Fri, 29 Sep 2017 13:00:06 GMT):
Hi all!I'm striving to log information in my chaincode go

ascatox (Fri, 29 Sep 2017 13:00:06 GMT):
Someone can help me

ascatox (Fri, 29 Sep 2017 13:01:39 GMT):
I'm striving to log information in my chaincode, but I couldn't see my log information anywhere

wy (Fri, 29 Sep 2017 14:09:57 GMT):
@ascatox you will need to do a `docker attach` to your chaincode container

ascatox (Fri, 29 Sep 2017 14:10:21 GMT):
Thank you very much

wy (Fri, 29 Sep 2017 14:11:51 GMT):
Does anyone know if it is possible to get the current channel name from the chaincode?

ascatox (Fri, 29 Sep 2017 14:21:06 GMT):
Another question :thinking:!!!When I make an install of another chaincode version, the container is updated with the current version?

wy (Fri, 29 Sep 2017 14:50:10 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=N3Zhtdk4Wqhb49baZ) @ascatox refer to my answer to you on #fabric :)

ascatox (Fri, 29 Sep 2017 14:50:30 GMT):
Thank you very much @wy

wwendy (Fri, 29 Sep 2017 14:55:28 GMT):
Has joined the channel.

BernardLin (Sun, 01 Oct 2017 18:27:16 GMT):
Has joined the channel.

wy (Mon, 02 Oct 2017 01:30:41 GMT):
Hello, is there anyway to retrieve a list of all participants within a channel?

ascatox (Mon, 02 Oct 2017 08:52:40 GMT):
Hi All!! Is it possible to execute multiple times, the instantiate phase for a chaincode, with different versions of chaincode too?

ascatox (Mon, 02 Oct 2017 08:52:40 GMT):
Hi All!! Is it possible to execute multiple times, the *instantiate* phase for a chaincode, with *different versions* of chaincode too?

ascatox (Mon, 02 Oct 2017 09:55:00 GMT):
I'm developing a chaincode and every time I modify my GO code, I've to stop and start fabric to see my changes

ascatox (Mon, 02 Oct 2017 09:55:00 GMT):
I'm developing a chaincode and every time I modify my GO code, I've to stop and start fabric to see my changes.

ascatox (Mon, 02 Oct 2017 09:55:44 GMT):
Someone can explain its workflow to develop and test a chiancode in developer environment

ascatox (Mon, 02 Oct 2017 09:55:44 GMT):
Someone can explain its *workflow* to develop and test a chiancode in developer environment.

ascatox (Mon, 02 Oct 2017 14:03:54 GMT):
Is someone using the `dev-mode` to develop the chaincode ?

jrosmith (Mon, 02 Oct 2017 17:34:21 GMT):
@ascatox you might find it easier to unit test the chaincode with MockStub and only install and instantiate when you have a version you're sure you want to spend the time deploying. Alternatively, you could just use `sendUpgradeProposal`: https://fabric-sdk-node.github.io/Channel.html#sendUpgradeProposal__anchor

ggamaral (Tue, 03 Oct 2017 00:42:03 GMT):
Has joined the channel.

wy (Tue, 03 Oct 2017 03:01:44 GMT):
Hi guys, anyone know if we can use multiline strings for rich couchdb queries when using `GetQueryResult`?

ganbold (Tue, 03 Oct 2017 07:44:29 GMT):
Has joined the channel.

ascatox (Tue, 03 Oct 2017 10:07:09 GMT):
Someone has a good tutorial different from the official documentation, to start to develop a chaincode. I'm not asking for Go Tutorial, but how to setup a developer environment to test your chaincode in developer mode.

VaibhavShah (Tue, 03 Oct 2017 16:09:20 GMT):
Has joined the channel.

VaibhavShah (Tue, 03 Oct 2017 16:09:53 GMT):
any step by step documentation for chaincode ?

ArnabChatterjee (Wed, 04 Oct 2017 04:09:52 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jr8Kqv3kqBp6j382n) @mariogemoll - True. Even I get the same error. Any updates on this? Thanks.

rock_martin (Wed, 04 Oct 2017 06:01:14 GMT):
HI ,Can we access transaction id of the parent invocation of the transaction in chaincode?

rock_martin (Wed, 04 Oct 2017 10:13:17 GMT):
Can we access transaction id of the current invocation of the transaction in chaincode?

KevinLeyssens (Wed, 04 Oct 2017 10:47:19 GMT):
Has joined the channel.

ascatox (Wed, 04 Oct 2017 13:23:53 GMT):
Hi All! Is it possible to manage two different assets (assets created like *struct* in Go) in the *same chaincode* ?

jrosmith (Wed, 04 Oct 2017 14:13:44 GMT):
@ascatox see my reply in #fabric

jrosmith (Wed, 04 Oct 2017 14:15:58 GMT):
@ArnabChatterjee @mariogemoll you need to make sure that you have the`github.com/golang/protobuf/proto` in your `$GOPATH`. this will let you develop with it locally. to ensure that its available when you install/instantiate, you must vendor your dependencies. i believe fabric recommends govendor for this step

jrosmith (Wed, 04 Oct 2017 14:19:48 GMT):
@wy so long as it represents parsable json you should be good

wy (Wed, 04 Oct 2017 14:20:19 GMT):
@jrosmith yeah, i managed to try it out. thanks though! :D

ascatox (Wed, 04 Oct 2017 14:23:47 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=j6LQWzsNjHt2EkPxn) @jrosmith Thank you very much!!!

rfrabasile (Wed, 04 Oct 2017 17:43:46 GMT):
Hi. How do I invoke another chaincode from a chaincode? I found this: func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response, what is that args is an [][]byte

rfrabasile (Wed, 04 Oct 2017 17:46:00 GMT):
it was a args []string before

jrosmith (Wed, 04 Oct 2017 18:38:59 GMT):
@rfrabasile `[][]byte` is an array of byte arrays

rfrabasile (Wed, 04 Oct 2017 18:39:29 GMT):
@jrosmith i know, but what does it contain

rfrabasile (Wed, 04 Oct 2017 18:40:08 GMT):
why change array of strings for a matrix of bytes?

jrosmith (Wed, 04 Oct 2017 19:15:00 GMT):
@rfrabasile i believe its because thats what Invoke expects the args to be https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L43

jrosmith (Wed, 04 Oct 2017 19:16:44 GMT):
yep, thats what the handler is expecting: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/handler.go#L719

Menniti (Wed, 04 Oct 2017 20:22:11 GMT):
Has joined the channel.

Souvik.Dey (Thu, 05 Oct 2017 05:38:59 GMT):
I am very new in golang. Every time I am fixing compilation error in instantiate time. It is very time taking process. Is there any way to fixed compilation error without instantiate chaincode.

Souvik.Dey (Thu, 05 Oct 2017 05:38:59 GMT):
I am very new in golang. Every time I am fixing compilation error in instantiate time. It is very time taking process. Is there any way to fixed compilation error without instantiate chaincode?

DarshanBc (Thu, 05 Oct 2017 06:46:53 GMT):
Can I query what is the endorsement policy of the current transaction?

DarshanBc (Thu, 05 Oct 2017 06:51:44 GMT):
@rock_martin yes use stub.GetTxID()

DarshanBc (Thu, 05 Oct 2017 09:48:36 GMT):
can someone explain GetTransient() with an example

muralisr (Thu, 05 Oct 2017 13:51:29 GMT):
@Souvik.Dey the "dev mode" is meant precisely for such fast turn around... search for `Testing Using dev mode` in http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html please

rfrabasile (Thu, 05 Oct 2017 15:57:23 GMT):
Hi. Looking at the insert example for the "map.go", for each insert wouldn't it generate another entry in the db that only has the index name and the content of the field (and a null value).

rfrabasile (Thu, 05 Oct 2017 15:57:24 GMT):
indexName := "compositeKeyTest" compositeKeyTestIndex, err := stub.CreateCompositeKey(indexName, []string{key}) valueByte := []byte{0x00} if err := stub.PutState(compositeKeyTestIndex, valueByte); err != nil { fmt.Printf("Error putting state with compositeKey %s", err) return shim.Error(fmt.Sprintf("put operation failed. Error updating state with compositeKey: %s", err)) }

rfrabasile (Thu, 05 Oct 2017 15:58:21 GMT):
this would create two entries for each insert? the doc with the data and another entry that has the name of the index and the composite key content (and a null value)

jrosmith (Thu, 05 Oct 2017 16:39:56 GMT):
@rfrabasile the code snippet you have posted just does one insert of the composite key. you would have to call `PutState` with an key pointing to the data as well

rfrabasile (Thu, 05 Oct 2017 16:41:58 GMT):
if i where to insert another value in the blockchain, should i repeat the index key? or would i have two more entries(data+new composite index)?

jrosmith (Thu, 05 Oct 2017 16:47:30 GMT):
the index keys should be unique, otherwise you'll be update the value associated with the original index

rfrabasile (Thu, 05 Oct 2017 16:59:12 GMT):
ok

rfrabasile (Thu, 05 Oct 2017 16:59:28 GMT):
so i do end up having two entries in the db for each element i insert

rfrabasile (Thu, 05 Oct 2017 16:59:46 GMT):
one for the document with the data and one that has a compositekeyindex name

rfrabasile (Thu, 05 Oct 2017 17:00:00 GMT):
?

jrosmith (Thu, 05 Oct 2017 17:26:16 GMT):
yes, one with the index pointing to the data, and another with the composite key pointing to null

abhisamant (Thu, 05 Oct 2017 17:32:32 GMT):
Has joined the channel.

rfrabasile (Thu, 05 Oct 2017 17:42:38 GMT):
ok, thanks @jrosmith

george.hant (Thu, 05 Oct 2017 18:13:20 GMT):
Has joined the channel.

iuriarte (Thu, 05 Oct 2017 20:09:33 GMT):
Has joined the channel.

ArnabChatterjee (Fri, 06 Oct 2017 04:33:20 GMT):
Hello everyone. I am using Go chaincodes and want to read files from chaincode. Can anyone let me know how to mount volumes (where files would be placed) in chaincode docker container?

Vadim (Fri, 06 Oct 2017 06:08:02 GMT):
Has joined the channel.

rock_martin (Fri, 06 Oct 2017 10:12:21 GMT):
if I install chaincode on 3 peers of a channel that has total number of 5 so when I instantiate chaincode does the endorsement policy exclude those 2 peers by itself even if they are involved in the organisation that endorsed the chaincode

KGiou (Fri, 06 Oct 2017 10:15:02 GMT):
Has joined the channel.

KGiou (Fri, 06 Oct 2017 10:31:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=fTnLbf8H2iT4GaeNw) @bmalavan @sampath06 I'm having a similar issue. I can see through the Fauxton UI `mychannel` but when I query through chaincode I get empty results. Investigating a bit further I see that one couch container(the one linked to the peer i've installed my cc) returns all the databases while the others don't ``` $ curl -X GET http://127.0.0.1:5984/_all_dbs ["_global_changes","_replicator","_users","mychannel"] $ curl -X GET http://127.0.0.1:7984/_all_dbs ["_global_changes","_replicator","_users"] $ curl -X GET http://127.0.0.1:6984/_all_dbs ["_global_changes","_replicator","_users"] ``` Shouldn't this be distributed to all couch instances? Is there something I'm not getting?

jrosmith (Fri, 06 Oct 2017 14:20:03 GMT):
@rock_martin the endorsement policy should be set before a transaction is run against the chaincode. the chaincode should be installed on all endorsing peers as they submit arguments to the chaincode as part of the transaction flow and return those to the sdk in the proposal response. the endorsement policy has no knowledge of whether or not the chaincode is installed on an endorsing peer, it just expects it to be.

jrosmith (Fri, 06 Oct 2017 21:03:40 GMT):
@KGiou chaincode is instantiated on a channel basis, but it is installed on a peer basis. if the peer does not have the chaincode installed, why would it have a couchdb instance representing the ledger state?

garima (Sat, 07 Oct 2017 06:28:20 GMT):
Has joined the channel.

whoselife (Sat, 07 Oct 2017 15:35:55 GMT):
Has joined the channel.

souradeep-das (Sat, 07 Oct 2017 17:11:46 GMT):
Has joined the channel.

SudhiBhat (Sat, 07 Oct 2017 17:17:02 GMT):
Has joined the channel.

SudhiBhat (Sat, 07 Oct 2017 17:19:34 GMT):
If I write my own chaincode how do I make it available in my cli docker image so that it can be installed in the peers and instantiated. Currently the cli contains the examples available in github.com/hyperledger/fabric/examples/chaincode/go?

SudhiBhat (Sun, 08 Oct 2017 06:38:42 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=sK8Lfuz95vXyh62TB) @SudhiBhat Figured it out. In the docker yaml file where we can compose our network we have an option to specify the volumes. Here you can copy the contents of the ./../chaincode to the $GOPATH/github.com/hyperledger/fabric/peer/examples/chaincode/go folder in the docker image

ArnabChatterjee (Sun, 08 Oct 2017 08:22:21 GMT):
Hello everyone. I am using Go chaincodes and want to read files from chaincode. Can anyone let me know how to mount volumes (where files would be placed) in chaincode docker container?

SudhiBhat (Sun, 08 Oct 2017 10:39:32 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=BXAubyrKjQudE5ukT) @ArnabChatterjee If you look at the docker compose file you can specify the volumes. This copies the content from the local system to the docker image. Ex: ./../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go

ArnabChatterjee (Sun, 08 Oct 2017 12:51:31 GMT):
@SudhiBhat - Thanks. I already tried that but that mounts the volume in the peer container and not in the chaincode container. And this results in a file not found exception. :)

DarshanBc (Mon, 09 Oct 2017 07:03:23 GMT):
I want to invoke a .sh script outside the containers from chaincode how do Ido it

DarshanBc (Mon, 09 Oct 2017 07:03:23 GMT):
I want to invoke a .sh script outside the containers from chaincode how do I do it

Vadim (Mon, 09 Oct 2017 07:04:47 GMT):
@DarshanBc this seems to be like a bad idea, as you leave the chaincode sandbox and the same results across all peers will not be guaranteed

DarshanBc (Mon, 09 Oct 2017 07:37:00 GMT):
There are 3 orgs org1,org2,org3 there are 2 chaincodes with different endorsement policies such as A->AND(org1.member,org2.member), B->AND(org2.member,org3.member). If chaincode A invokes B only on peers of org2 doesn't the endorsement policy fail?

wy (Mon, 09 Oct 2017 08:00:48 GMT):
hi is it possible to create a new state and use `GetState` to get the new state in the same invoke call?

Vadim (Mon, 09 Oct 2017 08:06:32 GMT):
@wy https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L82-L86

wy (Mon, 09 Oct 2017 08:07:25 GMT):
@Vadim ah okay, thanks for the info

KGiou (Mon, 09 Oct 2017 08:47:36 GMT):
@jrosmith thanks for the answer. so, if i get it, by installing the cc in all of the peers i'll get the distribution of the data? and if so, can't i do a "global install" instead of doing it manually in all peers?

gstremote (Mon, 09 Oct 2017 17:44:21 GMT):
Has joined the channel.

gstremote (Mon, 09 Oct 2017 17:57:13 GMT):
Hey guys, is there a way to make a block that has an information, refer to a previous block, where that specific information changed, and show it on the actual block?

tirumaha (Mon, 09 Oct 2017 23:24:11 GMT):
Has joined the channel.

linyuadam (Tue, 10 Oct 2017 05:30:13 GMT):
Hi, all, is there any good way to unit test `GetQueryResult` function when I use couchDB rich query?

jrosmith (Tue, 10 Oct 2017 11:30:18 GMT):
@KGiou yes, the peers all have access to the same ledger data. as of right now, no global installs. and organization is responsible for installing the chaincode on each of its own peers associated with the channel. i don't believe there will ever be a global install in the interest of separating concerns.

lmars (Tue, 10 Oct 2017 15:10:56 GMT):
Has joined the channel.

tamajit (Wed, 11 Oct 2017 10:56:55 GMT):
Has joined the channel.

sheetal365 (Wed, 11 Oct 2017 11:59:10 GMT):
Has joined the channel.

matanyahu (Wed, 11 Oct 2017 17:36:02 GMT):
Hello - I am currently developing a chaincode that will serve for several functions used by a group of participants. Some of the functions are available to all participants, some are designed specifically to be launched only by a restricted group of users. I am curious at what layer (application / fabric client / chaincode) should I focus in order to make sure that given functions of the abovementioned chaincode are executed by eligible participants. Any help with the above will be appreciated.

matanyahu (Wed, 11 Oct 2017 17:36:43 GMT):
fyi - each participant has an exclusive access to its own pair of fabric nodes

jimp1234 (Wed, 11 Oct 2017 19:14:46 GMT):
Has joined the channel.

Lavanya5896 (Thu, 12 Oct 2017 07:34:14 GMT):
Has joined the channel.

Subramanyam (Thu, 12 Oct 2017 07:34:38 GMT):
Hi all, I want to know the setup of couchdb from go lang and connectivity to a front end angular js for a sample application

KevinLeyssens (Thu, 12 Oct 2017 07:36:01 GMT):
Is it possible to generate public/ private keys or an encryption key through a smart contract in a deterministic way?

Vadim (Thu, 12 Oct 2017 07:39:03 GMT):
@KevinLeyssens you could pass the randomness data from the app using the transient field

JeroenDePrest (Thu, 12 Oct 2017 07:40:01 GMT):
Has joined the channel.

KevinLeyssens (Thu, 12 Oct 2017 07:40:56 GMT):
Like giving a seed to a random function?

Vadim (Thu, 12 Oct 2017 07:43:41 GMT):
@KevinLeyssens yes

KevinLeyssens (Thu, 12 Oct 2017 07:50:46 GMT):
Thanks! :-)

Subramanyam (Thu, 12 Oct 2017 10:35:01 GMT):
Hi all, I want to assist couchdb for database supoport with go lang and front end design angularjs application. Can anyone assist the example

eirlis (Thu, 12 Oct 2017 12:48:01 GMT):
Has joined the channel.

Jonny (Thu, 12 Oct 2017 12:53:40 GMT):
Hi guys,

Jonny (Thu, 12 Oct 2017 12:55:13 GMT):
How can I implement self transfer? From A to A. The final amount seems like to incorrect. Suppose no changes But the second override the first one. If I do the minus first and then plus. Only the plus state is taken.

Jonny (Thu, 12 Oct 2017 12:55:13 GMT):
How can I implement self transfer? From A to A. The final amount seems like to be incorrect. Suppose no changes for the final amount. But the second one override the first one. If I do the minus first and then plus. Only the plus state is taken.

Vadim (Thu, 12 Oct 2017 13:51:25 GMT):
@Jonny perhaps this will explain to you the behaviour: https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L89-L91

Jonny (Thu, 12 Oct 2017 13:53:49 GMT):
Thanks @Vadim. Sorry for the basic question, but how to commit a transaction?

Vadim (Thu, 12 Oct 2017 13:56:22 GMT):
you don't need to to that yourself, peers do that when they receive a block from the orderer

Jonny (Thu, 12 Oct 2017 13:58:58 GMT):
Does it means, when I getState again, the final value will be change after txn committed?

Jonny (Thu, 12 Oct 2017 14:01:42 GMT):
Oh, now I got it

Jonny (Thu, 12 Oct 2017 14:01:43 GMT):
// GetState returns the value of the specified `key` from the // ledger. Note that GetState doesn't read data from the writeset, which // has not been committed to the ledger. In other words, GetState doesn't // consider data modified by PutState that has not been committed. // If the key does not exist in the state database, (nil, nil) is returned.

Vadim (Thu, 12 Oct 2017 14:14:49 GMT):
@Jonny that text basically means, that if you do stub.PutState('a', 1) and then immediately stub.GetState('a'), you will not get '1', but some previous value.

Jonny (Thu, 12 Oct 2017 14:18:32 GMT):
if I simply stub.PutState('a', 1) and the stub.PutState('a', 2). I will get 2 for stub.GetState('a') after committed. right?

Jonny (Thu, 12 Oct 2017 14:18:32 GMT):
if I simple stub.PutState('a', 1) and the stub.PutState('a', 2). I will get 2 for stub.GetState('a') after committed. right?

Vadim (Thu, 12 Oct 2017 14:18:57 GMT):
I suppose so

Vadim (Thu, 12 Oct 2017 14:19:00 GMT):
you can try

Vadim (Thu, 12 Oct 2017 14:19:00 GMT):
you can try to be sure

bennettneale (Thu, 12 Oct 2017 22:49:02 GMT):
Has joined the channel.

iamdm (Fri, 13 Oct 2017 07:52:38 GMT):
Has joined the channel.

luckydogchina (Fri, 13 Oct 2017 08:28:27 GMT):
hi, everyone! when I run the cli code `peer chaincode instantiate -o 127.0.0.1:7050 -C mychannel -n mycc -v 1.0 github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a", "100", "b","200"]}'`,the error is thrown that `Error: unknown shorthand flag: 'p' in -p` , the version is `fabric-v1.0.1`. How to solve it?

luckydogchina (Fri, 13 Oct 2017 08:28:27 GMT):
hi, everyone! when I run the cli code `peer chaincode instantiate -o 127.0.0.1:7050 -C mychannel -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a", "100", "b","200"]}'`,the error is thrown that `Error: unknown shorthand flag: 'p' in -p` , the version is `fabric-v1.0.1`. How to solve it?

Subramanyam (Fri, 13 Oct 2017 08:37:55 GMT):
We are trying to build a loan application for user using Hyperledger Fabric and we have just started. Can some please answer some very basic questions: 1. Can we build the entire application using the CouchDB, the application would require to upload documents and trasanctions as well. 2. Can the Couchdb used to store transactional data if yes are the ways we can database modelling to maintain the integrity of the data. 3. How can i connect from golang to couchdb to maintain user data details and restrict from other user

Subramanyam (Fri, 13 Oct 2017 08:37:55 GMT):
We are trying to build a loan application for user using Hyperledger Fabric and we have just started. Can some please answer some very basic questions: 1. Can we build the entire application using the CouchDB, the application would require to upload documents and trasanctions as well. 2. Can the Couchdb used to store transactional data if yes are the ways we can database modelling to maintain the integrity of the data.

vudathasaiomkar (Fri, 13 Oct 2017 09:29:36 GMT):
Has joined the channel.

amolpednekar (Fri, 13 Oct 2017 10:20:41 GMT):
@luckydogchina You dont need to specify path during instantiation (its reqd during installation)

douglasthiel (Fri, 13 Oct 2017 17:34:55 GMT):
Has joined the channel.

muralisr (Fri, 13 Oct 2017 22:38:27 GMT):
@luckydogchina you don;t need a path parameter (-p) for instantiate. It is needed only by install command

muralisr (Fri, 13 Oct 2017 22:39:18 GMT):
(oops I didn;t see @amolpednekar answer...)

lmars (Sat, 14 Oct 2017 17:40:32 GMT):
I try to debug chaincode (with `--peer-chaincodedev=true` peer start param and standalone started chaincode) and first debug attempt is successful, but when I restart debug session, I get this message: `Duplicate chaincodeID error: name:"hello:0"`. Is it by design? I have only one attempt to debug and then I should change my chaincode Id to continue? :)

JosephKovuri (Sun, 15 Oct 2017 09:47:55 GMT):
Has joined the channel.

GLB (Sun, 15 Oct 2017 22:04:14 GMT):
Has joined the channel.

Sufbin (Mon, 16 Oct 2017 01:35:53 GMT):
Has joined the channel.

CodeReaper (Mon, 16 Oct 2017 05:48:54 GMT):
@muralisr how can I access the common name of the user who invoked the chaincode at the chaincode level??

DarshanBc (Mon, 16 Oct 2017 11:09:47 GMT):
@muralisr Can you help me with this please [ ](https://chat.hyperledger.org/channel/fabric-ca?msg=GJ5sFHFqsNPpjBCHZ)

muralisr (Mon, 16 Oct 2017 12:47:05 GMT):
@DarshanBc I haven't tried the ABAC apis yet... perhaps @aambati can help ?

aambati (Mon, 16 Oct 2017 12:47:06 GMT):
Has joined the channel.

jrosmith (Mon, 16 Oct 2017 15:33:40 GMT):
@CodeReaper [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=tGHm4HerDep5NuJEx)

jrosmith (Mon, 16 Oct 2017 15:34:29 GMT):
people have been having problems getting this up and running, make sure you are `go get`ing proto for local development and vendoring your dependencies before deploying

DarshanBc (Mon, 16 Oct 2017 15:55:22 GMT):
Can somebody explain getBinding() with an example preferably with the example in the link https://fabric-shim.github.io/ChaincodeStub.html#getBinding__anchor wrt the example in the link I didn't unset how bob is asked to sign the message @elli-androulaki if you have any sample please share

elli-androulaki (Mon, 16 Oct 2017 15:55:22 GMT):
Has joined the channel.

elli-androulaki (Mon, 16 Oct 2017 17:39:17 GMT):
@DarshanBc binding is used when we have a chaincode invocation that requires application-layer authentication, independent / agnostic to the fabric. So say a chaincode part of application APP with its own PKI. Each user, e.g., Alice, Bob have their own certs under APP's PKI. Now these users have also fabric identities, EnrollmentCerts that would allow them to submit transactions to the Fabric. For APP to authenticate messages invocations need to be signed by their APP certificates' keys. For Fabric to grant them access to a channel they would need to use their Fabric identity keys in transactions. Binding ensures that application layer authentication messages (e.g., a signature on the chaincode input) cannot be detached by a potential attacker who would replay this signature on another Fabric transaction of its.

elli-androulaki (Mon, 16 Oct 2017 17:39:17 GMT):
@DarshanBc binding is used when we have a chaincode invocation that requires application-layer authentication, independent / agnostic to the fabric. So say a chaincode part of application APP with its own PKI. Each user, e.g., Alice, Bob have their own certs under APP's PKI. Now these users have also fabric identities, EnrollmentCerts that would allow them to submit transactions to the Fabric. For APP to authenticate messages invocations need to be signed by their APP certificates' keys. For Fabric to grant them access to a channel they would need to use their Fabric identity keys in transactions. Binding ensures that application layer authentication messages (e.g., a signature on the chaincode input) cannot be detached from honestly generated transactions (e.g., Alice's) by a potential attacker with the intention of having the signature part replayed in another Fabric transaction (i.e., attempting to impersonate Alice in the application layer).

rfrabasile (Mon, 16 Oct 2017 20:18:47 GMT):
Hi. Is there an API way to get the name of the chaincode from the chaincode itself?

CodeReaper (Tue, 17 Oct 2017 10:45:16 GMT):
Thanks @jrosmith

GiorgiBlockchain (Wed, 18 Oct 2017 08:07:37 GMT):
Has joined the channel.

JosephChang (Wed, 18 Oct 2017 13:07:41 GMT):
Has joined the channel.

DarshanBc (Wed, 18 Oct 2017 13:50:54 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=JoiXZ9yHcKwNorYZe) Issue resolved

eclairamb (Wed, 18 Oct 2017 18:05:38 GMT):
Has joined the channel.

GiorgiBlockchain (Thu, 19 Oct 2017 03:09:14 GMT):
Hi everyone. I want to upgrade Chaincode without deleting the historical data, without re-deployment blockchain network. As I read from the docs it is possible by changing Chaincode version number and keep chaincodeName the same. So I installed my new Chaincode on the same peer and changed the version. Installation is successful, but I can't see the changes. Still accessing old version. What I am missing, any suggestions?

Vadim (Thu, 19 Oct 2017 06:53:20 GMT):
@GiorgiBlockchain you are missing `peer chaincode upgrade`

GiorgiBlockchain (Thu, 19 Oct 2017 07:33:12 GMT):
Yes @Vadim I noticed, read from Docs: https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html#install command: `peer chaincode upgrade -n mycc -v 1 -c '{"Args":["d", "e", "f"]} -C mychannel`. But I don't have cli container. I am running balance transfer example. Is there any REST APIs Request for upgrade?

luxus (Thu, 19 Oct 2017 08:09:18 GMT):
Has joined the channel.

luxus (Thu, 19 Oct 2017 08:34:20 GMT):
How do I store data in tabular form?

GiorgiBlockchain (Thu, 19 Oct 2017 09:21:56 GMT):
I added _cli_ container with the configuration from fabcar, what can be `CORE_PEER_MSPCONFIGPATH` value in balanace_transfer example?

daanporon (Thu, 19 Oct 2017 10:29:47 GMT):
Has joined the channel.

daanporon (Thu, 19 Oct 2017 10:30:16 GMT):
does anyone know if it's already possible to write chaincode in javascript? Is it possible to try this already? Saw it was in progress and almost all of it was done except the image ... https://jira.hyperledger.org/browse/FAB-2331

mtttt (Thu, 19 Oct 2017 14:12:31 GMT):
Has joined the channel.

jrosmith (Thu, 19 Oct 2017 14:20:43 GMT):
@daanporon javascript chaincode is slated for the v1.1 release. the 1.1 preview is currently scheduled for end of month october with the full release by end of year

mtttt (Thu, 19 Oct 2017 14:27:50 GMT):
Hi everyone. When I want to invoke chaincode within chaincode and use stub.InvokeChaincode(...), in what form exactly do I pass the chaincodeName?

jrosmith (Thu, 19 Oct 2017 14:28:36 GMT):
@mtttt as a string in the first argument https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/chaincode.go#L375

jrosmith (Thu, 19 Oct 2017 14:28:36 GMT):
@mtttt as a string as the first argument https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/chaincode.go#L375

mtttt (Thu, 19 Oct 2017 14:30:09 GMT):
right. But is it the same name as I installed to chaincode? because when I do this, then I just receive a timeout

jrosmith (Thu, 19 Oct 2017 14:37:49 GMT):
@mtttt i believe it should be the same name as the chaincodeId in the request, that should work if both chaincodes are installed on the peer and instantiated on the same channel. is there any more information in the peer/chaincode logs?

vkblue (Thu, 19 Oct 2017 22:59:54 GMT):
Has joined the channel.

daanporon (Fri, 20 Oct 2017 09:51:59 GMT):
@jrosmith thanks for the info, so by the end of october it would be possible to try it? Or do you think we can already set it up by using the building our own version of fabric? because we have a project starting now ... and using node.js would definitely be a good thing :)

jrosmith (Fri, 20 Oct 2017 14:43:00 GMT):
@daanporon assuming the preview comes out as scheduled you should be able to try it by the end of the month. i'm not sure forking fabric would be the best idea if you guys are starting a project now, trying to implement that on your own might be a major time sink.

Asara (Fri, 20 Oct 2017 14:58:36 GMT):
@daanporon you could also build it from master, which should give you something closer to what will end up in 1.1 https://github.com/hyperledger/fabric/tree/master

pheneghan (Fri, 20 Oct 2017 22:06:25 GMT):
Has joined the channel.

BhaskarGandavabi (Sat, 21 Oct 2017 15:45:36 GMT):
Has joined the channel.

BhaskarGandavabi (Sat, 21 Oct 2017 15:46:29 GMT):
Does anyone have a list of differences between Java Chaincode implementation vs Go Chaincode implementation? I am trying to figure out what's missing from Java, if any...

Lazar955 (Sun, 22 Oct 2017 10:47:30 GMT):
Has joined the channel.

DarshanBc (Sun, 22 Oct 2017 16:09:54 GMT):
I can see all arguments passed to chaincode is only the strings can other types be passed?

DarshanBc (Sun, 22 Oct 2017 16:10:32 GMT):
Like int, []bytes, etc?

agiledeveloper (Sun, 22 Oct 2017 16:56:20 GMT):
Has joined the channel.

GiorgiBlockchain (Mon, 23 Oct 2017 06:43:40 GMT):
Hi everyone. I have a question regarding Chaincode development. From the examples I can see the difference of the chaincode logic between fabric 0.6 and 1.0. I mean the way how transactions are stored in the ledger. For instance, marbels example in v0.6: transactions were recorded under the particular index, that way by querying that index name we could get all transactions saved on it. Right now, in ver1.0 we don't have index, but there is a CompositeKey, which is a good way to retrieve data, but still without rich queries I think there is not much flexibility to read information. Are those indexes used in earlier versions of fabric chaincode discarded and not recommended?

lmars (Mon, 23 Oct 2017 07:24:14 GMT):
@BhaskarGandavabi, I suppose, info from https://jira.hyperledger.org/browse/FAB-3218 can help you. But I hope, you know that Java Chaincode support is disabled now... and you should build fabric from source to enable it.

jrosmith (Mon, 23 Oct 2017 12:29:24 GMT):
@GiorgiBlockchain not entirely sure what you're asking...information about a transaction still associated with a specific index in the state db. are you asking for best practices for querying for multiple transactions?

jrosmith (Mon, 23 Oct 2017 12:35:25 GMT):
@DarshanBc i know the handlers for the invokes pass everything around as an array of byte arrays, you should be able to pass whatever data types you'd like

DarshanBc (Mon, 23 Oct 2017 12:41:04 GMT):
yes did it through with stub.GetArgs()

DarshanBc (Mon, 23 Oct 2017 12:41:04 GMT):
@jrosmith yes did it through with stub.GetArgs()

jrosmith (Mon, 23 Oct 2017 12:51:01 GMT):
@DarshanBc if you'd like the arguments to come back as just `[]byte` you can use `GetArgsSlice()`

jrosmith (Mon, 23 Oct 2017 12:51:09 GMT):
all you options can be found here: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L34

DarshanBc (Mon, 23 Oct 2017 12:51:33 GMT):
yep tried that as well

MohammadObaid (Mon, 23 Oct 2017 17:16:19 GMT):
Hi, I am trying to develop blockchain application related to educational usecase. I want to model student academic lifecycle in chaincode like getting id card from university, getting other sensitive documents etc and these document should be on a blockchain network so that any student can view its entire academic documents... I am completely lost in how to achieve this. Do I need to make separate chaincodes for each document or one chaincode for all documents? What you guys suggest?

jrosmith (Mon, 23 Oct 2017 19:03:11 GMT):
@MohammadObaid you do not need to write a separate chaincode for each document. if you really want to store the bytes of the documents on the ledger you could, but i am not convinced that would be best implementation

asifrajwani (Tue, 24 Oct 2017 01:06:29 GMT):
Has joined the channel.

asifrajwani (Tue, 24 Oct 2017 01:07:09 GMT):
Is it possible to write the chaincode in NodeJs in V1.0. If possible, can somebody please point me to the complete example/tutorial.

asifrajwani (Tue, 24 Oct 2017 01:07:09 GMT):
Is GO the only option for chaincode in V1.0. Is it possible to write the chaincode in NodeJs or Java in 1.0.

lmars (Tue, 24 Oct 2017 02:56:59 GMT):
@asifrajwani, unfortunately, Go only. But you can try https://hyperledger.github.io/composer/. It is possible to write transaction logic on Java Script with Composer. Unfortunately, It is still under active development, as I know.

GiorgiBlockchain (Tue, 24 Oct 2017 05:10:11 GMT):
@jrosmith Yes, my question was a bit confusing. Here what I meant: Marbles demo ver1: https://github.com/IBM-Blockchain/marbles/blob/v1.0/chaincode/part1/part1_chaincode.go here key/values are stored under particular index `_marbleindex`. On the other hand in new versions, they are stored under specific index passed as an argument. But now from your answer I'm guessing that it just depends our choice and needs. So basically, my question is regarding best practices for querying. Thanks!

sudhi-git (Tue, 24 Oct 2017 08:00:08 GMT):
Has joined the channel.

DarshanBc (Tue, 24 Oct 2017 09:58:59 GMT):
is there any ide to develop chaincode/

DarshanBc (Tue, 24 Oct 2017 09:58:59 GMT):
is there any IDE to develop chaincode?

sampath06 (Tue, 24 Oct 2017 10:31:51 GMT):
@DarshanBc I am using Gogland. Works quite well

simonmullaney (Tue, 24 Oct 2017 11:29:22 GMT):
Has joined the channel.

asifrajwani (Tue, 24 Oct 2017 12:23:32 GMT):
@imars thanks

asifrajwani (Tue, 24 Oct 2017 12:23:32 GMT):
@lmars thanks

jrosmith (Tue, 24 Oct 2017 13:18:42 GMT):
@asifrajwani @lmars composer allows you to use javascript to define business logic that gets executed on a generic chaincode written in golang. Fabric v1.1 (due out by end of year, the preview comes out end of month) will have support for chaincode written in node.js. chaincode can also be written in java but it requires building fabric from its source

asifrajwani (Tue, 24 Oct 2017 13:20:57 GMT):
@jrosmith thanks, V1.1 will have support for both JS and Java in chaincode?, or only JS.

jrosmith (Tue, 24 Oct 2017 13:24:42 GMT):
@GiorgiBlockchain the best way to query for a list of transactions depends on your use case. if you're using couchDB you can use rich queries (`shim.GetQueryResult`) to explicitly select a set from the state db, i've found composite keys (`shim.GetStateByPartialCompositeKey) to be useful for getting a particular set. you can also define a range (`shim.GetStateByRange`) and iterate over multiple transactions that way. i've found going through to `interfaces.go` to be really helpful with understanding my options: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L104

jrosmith (Tue, 24 Oct 2017 13:24:42 GMT):
@GiorgiBlockchain the best way to query for a list of transactions depends on your use case. if you're using couchDB you can use rich queries ( `shim.GetQueryResult` ) to explicitly select a set from the state db, i've found composite keys ( `shim.GetStateByPartialCompositeKey` ) to be useful for getting a particular set. you can also define a range ( `shim.GetStateByRange` ) and iterate over multiple transactions that way. i've found going through to `interfaces.go` to be really helpful with understanding my options: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L104

jrosmith (Tue, 24 Oct 2017 13:25:41 GMT):
@asifrajwani i believe just javascript, i don't think the demand for chaincode in java has been high enough to demand a ton of development time. a list of proposed content for v1.1 can be found here: https://wiki.hyperledger.org/projects/fabric/proposedv1_1

jrosmith (Tue, 24 Oct 2017 13:25:41 GMT):
@asifrajwani i believe just javascript, i don't think the demand for chaincode in java has been high enough to warrant a ton of development time. a list of proposed content for v1.1 can be found here: https://wiki.hyperledger.org/projects/fabric/proposedv1_1

asifrajwani (Tue, 24 Oct 2017 14:53:34 GMT):
@jrosmith thanks for the quick response.

Menniti (Tue, 24 Oct 2017 16:20:51 GMT):
Hey guys, Maybe someone is interested Hyperledger Course in EdX https://www.edx.org/course/blockchain-business-introduction-linuxfoundationx-lfs171x

anyone (Tue, 24 Oct 2017 18:37:09 GMT):
Has joined the channel.

anyone (Tue, 24 Oct 2017 18:43:17 GMT):
Hi guys, I have deployed the example "first network" from the blockchain demo. When I run this "./byfn.sh -m up" script, it performs without errors. While the docker is still up and running, I try to run "peer query -C mychannel -n mycc -c {"Args":["query","a"]} and I receive an error "failed to deserialize identity, err MSP DEFAULT is unknown". I made some research but found no help. Anyone has an idea?

anyone (Tue, 24 Oct 2017 18:43:41 GMT):
Sorry, I hope I am right here in this channel. Thanks a lot in advance!

anyone (Tue, 24 Oct 2017 18:45:46 GMT):
The query is copied from script.sh, which is called by "./byfn.sh -m up". Somehow it does not work if I run it directly.

jrosmith (Tue, 24 Oct 2017 18:49:52 GMT):
@anyone this sounds like an identity issue, not a chaincode issue. #fabric-ca will be able to give a more informed answer

anyone (Tue, 24 Oct 2017 18:57:40 GMT):
ok, thanks! I agree, not a chaincode issue

GiorgiBlockchain (Wed, 25 Oct 2017 02:20:37 GMT):
Thanks @jrosmith I tried `composite keys` and `GetStateByRange` as well. They are really useful. I don't want to use couchDB yet, for now testing all possibilities what we can do using state DB. So I have this case: Having a struct consisting with the following fields: "ID", "PayID", "UserID", etc. Transactions are saved under "ID", which means I can query each of them by getting state using that "ID". I can query by range as well. But what if I want query by UserID, how I can get all transactions related to particular user with all fields? By composite key I can get particular sets as you said, but not everything. One way I am thinking is to get IDs by composite key related to that User and then query that IDs. Is there any other way I can consider? Thank you!

gut (Wed, 25 Oct 2017 09:41:02 GMT):
Has joined the channel.

jrosmith (Wed, 25 Oct 2017 13:30:33 GMT):
@GiorgiBlockchain if you don't want to use rich queries then that would be the way to do it. the only downside to this method is that you will have to iterate over each one of those partial composite keys and then dispatch another query for each ledger id

jrosmith (Wed, 25 Oct 2017 13:30:33 GMT):
@GiorgiBlockchain if you don't want to use rich queries then that would be the way to do it. the only downside to this method is that you will have to iterate over each one of those partial composite keys and then dispatch another query for each transaction id

ericb 7 (Wed, 25 Oct 2017 22:48:32 GMT):
Has joined the channel.

john111 (Thu, 26 Oct 2017 04:51:06 GMT):
Has joined the channel.

jaswanth (Thu, 26 Oct 2017 05:51:02 GMT):
I am trying to do some access control in chaincode .. i cloned the fabric from github and ran ` git checkout master` ( as only this branch has the `cid`) . then i ran `make clean ` and `make docker ` .. i cloned fabric-samples examples from github.. and changed the `balance-tranfer` examples chaincode and ran `./runAPIs.sh` ..on instantiation i got ``` 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 " ``` .. is am doing all correct ? any help here

mascanc (Thu, 26 Oct 2017 07:59:23 GMT):
Has joined the channel.

mascanc (Thu, 26 Oct 2017 08:00:32 GMT):
Hi All! I'm struggling with an issue (and I was discussing #fabric), probably the wrong channel.

mascanc (Thu, 26 Oct 2017 08:00:32 GMT):
I've a network of 4 machines, one orderer and 3 peers. They all joined the same channel

mascanc (Thu, 26 Oct 2017 08:00:56 GMT):
In the cli of the peer, I did the peer install, peer instantiate of my chaincode, which is in /opt/gopath/src/

mascanc (Thu, 26 Oct 2017 08:01:33 GMT):
I see the newly created docker image of my chaincode (I'm not running in dev mode)

mascanc (Thu, 26 Oct 2017 08:01:46 GMT):
and from its logs I see my logs that I've in the Init() method.

mascanc (Thu, 26 Oct 2017 08:02:24 GMT):
The chaincode is installed in all the peers, and the policy is "OR ('GPMSP.member', 'LAB1MSP.member', 'LAB2MSP.member')"

mascanc (Thu, 26 Oct 2017 08:02:56 GMT):
However, when I try to invoke it, I see: root@fe3f7ac1bfc1:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode invoke -o blockchain1:7050 -C masab -n testcc -c '{"Args":["invoke","a","b","10"]}'

mascanc (Thu, 26 Oct 2017 08:03:02 GMT):
Error: Error endorsing invoke: rpc error: code = Unknown desc = could not find chaincode with name 'testcc' - make sure the chaincode testcc has been successfully instantiated and try again -

mascanc (Thu, 26 Oct 2017 08:03:15 GMT):
I really don't know what am I doing wrong...

mascanc (Thu, 26 Oct 2017 08:06:38 GMT):
in the logs I see

mascanc (Thu, 26 Oct 2017 08:06:38 GMT):
2017-10-26 08:05:04.272 UTC [chaincode] Launch -> DEBU 60e chaincode is running(no need to launch) : testcc:1.0

mascanc (Thu, 26 Oct 2017 08:06:53 GMT):
2017-10-26 08:05:04.273 UTC [chaincode] HandleMessage -> DEBU 61a [cb29c781]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready

mascanc (Thu, 26 Oct 2017 08:06:59 GMT):
2017-10-26 08:05:04.274 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU 61f Simulation completed, getting simulation results

mascanc (Thu, 26 Oct 2017 08:08:01 GMT):
(that was during the instantiate)

mascanc (Thu, 26 Oct 2017 08:08:39 GMT):
but when I do the invoce: 2017-10-26 08:08:06.526 UTC [lscc] Invoke -> ERRO 66f error getting chaincode testcc on channel: masab(err:could not find chaincode with name 'testcc')

mascanc (Thu, 26 Oct 2017 08:09:04 GMT):
why in the instantiate it is there, while in the invoke is not available?

mascanc (Thu, 26 Oct 2017 08:09:54 GMT):
nothing in the logs of the orderer

mascanc (Thu, 26 Oct 2017 08:09:54 GMT):
2017-10-26 08:09:16.179 UTC [orderer/main] Broadcast -> DEBU 1018 Starting new Broadcast handler 2017-10-26 08:09:16.179 UTC [orderer/common/broadcast] Handle -> DEBU 1019 Starting new broadcast loop 2017-10-26 08:09:16.185 UTC [orderer/common/broadcast] Handle -> WARN 101a Error reading from stream: rpc error: code = Canceled desc = context canceled 2017-10-26 08:09:16.185 UTC [orderer/main] func1 -> DEBU 101b Closing Broadcast stream

mascanc (Thu, 26 Oct 2017 08:11:29 GMT):
In particular, during invocation: 2017-10-26 08:10:36.799 UTC [chaincode] func1 -> DEBU 6d8 [079b5145] getting state for chaincode lscc, key testcc, channel masab

mascanc (Thu, 26 Oct 2017 08:11:31 GMT):
2017-10-26 08:10:36.799 UTC [chaincode] func1 -> DEBU 6da [079b5145]No state associated with key: testcc. Sending RESPONSE with an empty payload

mascanc (Thu, 26 Oct 2017 08:12:16 GMT):
but after a while:

mascanc (Thu, 26 Oct 2017 08:12:16 GMT):
2017-10-26 08:10:36.801 UTC [ccprovider] NewCCContext -> DEBU 6fd NewCCCC (chain=masab,chaincode=testcc,version=1.0,txid=079b5145e452efe4ca75e5fff88c9d9feb98663e9aef45db50490126d25f1a7d,syscc=false,proposal=0xc4212ea1e0,canname=testcc:1.0 2017-10-26 08:10:36.801 UTC [chaincode] Launch -> DEBU 6fe chaincode is running(no need to launch) : testcc:1.0

GiorgiBlockchain (Thu, 26 Oct 2017 09:13:09 GMT):
@jrosmith I see. Yes, using this strategy I mentioned it does the work, but for better performance I will try coucDB. Thanks!

Nate_Y (Thu, 26 Oct 2017 10:50:51 GMT):
Has joined the channel.

Nate_Y (Thu, 26 Oct 2017 10:52:11 GMT):
@mascanc Install--->Instantiate--->Invoke. You missed the step Instantiate.

Nate_Y (Thu, 26 Oct 2017 11:05:07 GMT):
@mascanc Add options: --tls true --cafile $ORDERER_CA

Nate_Y (Thu, 26 Oct 2017 11:05:55 GMT):
@mascanc Add options when invoke: --tls true --cafile $ORDERER_CA

mascanc (Thu, 26 Oct 2017 11:42:40 GMT):
@Nate_Y , thx! But I am not using TLS. In fact, if I try to connect tls, I see:

mascanc (Thu, 26 Oct 2017 11:42:48 GMT):
Error: Error getting broadcast client: Error connecting to blockchain1:7050 due to tls: first record does not look like a TLS handshake

mascanc (Thu, 26 Oct 2017 11:42:53 GMT):
(blockchain1 is the orderer)

nate94305 (Fri, 27 Oct 2017 01:03:49 GMT):
Has joined the channel.

nate94305 (Fri, 27 Oct 2017 01:05:24 GMT):
Hi, All! I got the question from a client company regarding the chaincode infinite loop, which causes a hang

nate94305 (Fri, 27 Oct 2017 01:05:24 GMT):
Hi, All! I got the question from a client company regarding the chaincode infinite loop, which causes a hang. If the hang happens, what is the solution to resolve the situation?

nate94305 (Fri, 27 Oct 2017 01:05:24 GMT):
Hi, All! I got the question from a client company regarding the chaincode infinite loop, which causes a hang. If the hang happens, what is the solution to resolve the situation? Stop docker and update/re-install/instantiate the fixed chaincode?

DarshanBc (Fri, 27 Oct 2017 05:09:51 GMT):
I am sending an error message from chaincode if there is any error. I am using node sdk how can bring that error msg to the front as a response Error msg ends at logging

gut (Fri, 27 Oct 2017 07:34:48 GMT):
Hi @nate94305. I think the infinite loop is not intended, so yes. As far as I know it is the scenario where you want to update your version. Maybe next time you could test your code prior to deploy it :)

gut (Fri, 27 Oct 2017 07:49:38 GMT):
@DarshanBc as you are using the chaincode shim to throw errors, the SDK can get them from the response, which components are status, payload, message and endorser. Then, you can use that message as you want (propagate or log).

jrosmith (Fri, 27 Oct 2017 12:44:23 GMT):
@DarshanBc after using `channel.sendTransactionProposal` you will get back a result set, let call it `results`. in the event of the chaincode returning `shim.Error()` the error message will exists in that results set in `results[0][0].message`

jrosmith (Fri, 27 Oct 2017 12:45:18 GMT):
what is returned in a success is located in `results[0][0].response.payload`

jrosmith (Fri, 27 Oct 2017 12:45:18 GMT):
the return from `shim.Success()` is located in `results[0][0].response.payload`

scmchan (Fri, 27 Oct 2017 14:34:13 GMT):
Has joined the channel.

GiorgiBlockchain (Mon, 30 Oct 2017 06:00:53 GMT):
Hey guys, I'm getting error: ` too many arguments in call to shim.Error`. Inside the function, I'm calling `shim.Error` three times. Error comes when I keep this line: `return shim.Error("Error: Check the third argument. DateType must be one of 'DateType1', 'DateType2' or 'DateType'. But got: %v", args[2])` Full piece of code: ``` if (args[2] != 'DateType1' || args[2] != 'DateType2' || args[2] != 'DateType3') { return shim.Error("Error: Check the third argument. DateType must be one of 'DateType1', 'DateType2' or 'DateType'. But got: %v", args[2]) }``` What I'm doing wrong? Is there any restriction using `shim.Error`?

luxus (Mon, 30 Oct 2017 06:50:15 GMT):
Hi all, Can I use chaincode in hyperledger fabric v1 with other blockchain network (eg stellar, ...)?

pranaysoni0211 (Mon, 30 Oct 2017 07:10:38 GMT):
Has joined the channel.

Vadim (Mon, 30 Oct 2017 08:06:41 GMT):
@GiorgiBlockchain how do you call shim.Error?

GiorgiBlockchain (Mon, 30 Oct 2017 08:09:34 GMT):
Just like this I wrote above. ```func (t *SimpleChaincode) queryByDate(stub shim.ChaincodeStubInterface, args []string) pb.Response { ........................... some code if (args[2] != 'DateType1' || args[2] != 'DateType2' || args[2] != 'DateType3') { return shim.Error("Error: Check the third argument. DateType must be one of 'DateType1', 'DateType2' or 'DateType'. But got: %v", args[2]) } ........................... some code }```

Vadim (Mon, 30 Oct 2017 08:11:25 GMT):
@GiorgiBlockchain shim.Error can take only one arg, you pass two, hence the error

gut (Mon, 30 Oct 2017 09:06:47 GMT):
@Vadim is right. Maybe fmt.Sprintf can help you

mikykey (Mon, 30 Oct 2017 11:12:19 GMT):
Has joined the channel.

GiorgiBlockchain (Tue, 31 Oct 2017 01:37:02 GMT):
@Vadim That's right. I forgot to add `fmt.sprintf` to `shim.error`. Like this: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/artifacts/src/github.com/example_cc/example_cc.go#L92 Thanks!

GiorgiBlockchain (Tue, 31 Oct 2017 01:37:02 GMT):
@Vadim That's right. I forgot to add `fmt.sprintf` to `shim.error`. Like this: https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/artifacts/src/github.com/example_cc/example_cc.go#L92 Thanks! @gut

pranaysoni0211 (Tue, 31 Oct 2017 05:51:47 GMT):
Anyone working in Java chaincode?

mascanc (Tue, 31 Oct 2017 11:26:53 GMT):
Hi All, I am still facing problems.

mascanc (Tue, 31 Oct 2017 11:27:02 GMT):
I don't understand where the chaincode is executed, while NOT in dev mode

mascanc (Tue, 31 Oct 2017 11:28:40 GMT):
After the chaincode instantiate command, an additional docker instance starts

mascanc (Tue, 31 Oct 2017 11:29:18 GMT):
and there I see just a command "chaincode -peer.address=" the address on port 7051

mascanc (Tue, 31 Oct 2017 11:29:52 GMT):
And in the logs I see the output of the Invoke()

mascanc (Tue, 31 Oct 2017 11:29:52 GMT):
And in the logs I see the output of the Init()

mascanc (Tue, 31 Oct 2017 11:30:47 GMT):
but then, when I invoke it, I always see could not find chaincode with name 'masabd1' - make sure the chaincode masabd1 has been successfully instantiated and try again -

mascanc (Tue, 31 Oct 2017 11:31:02 GMT):
I re-created the channels, I tried to enable/disable tls,

mascanc (Tue, 31 Oct 2017 11:31:24 GMT):
Where the chaincode is physically run?

mascanc (Tue, 31 Oct 2017 11:31:32 GMT):
what does the "chaincode" command does?

jrosmith (Tue, 31 Oct 2017 12:42:59 GMT):
@mascanc what was the command you used to install/instantiate the chaincode? it's possible the chaincode was installed with a different identifier than you one youre passing. if you're using one of the sdk's there are functions that allow you to query for installed and instantiated chaincodes

mascanc (Tue, 31 Oct 2017 13:00:24 GMT):
@jrosmith : I instantiated it using the peer chaincode install, and peer chaincode instantiate, the version is still the same (1)

mascanc (Tue, 31 Oct 2017 13:00:30 GMT):
I give you the commands here

mascanc (Tue, 31 Oct 2017 13:02:33 GMT):
I start from a fresh peer: blockchaingp ~/HyperLedger/challenge/dockerFiles $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fe3f7ac1bfc1 hyperledger/fabric-tools "/bin/bash" 10 days ago Up 2 seconds cli 8a707200d2b4 hyperledger/fabric-peer "peer node start" 10 days ago Up 3 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp blockchaingp

mascanc (Tue, 31 Oct 2017 13:06:03 GMT):
I do a install: root@fe3f7ac1bfc1:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n masabd3 -v 1 -p prov-0.2

mascanc (Tue, 31 Oct 2017 13:06:14 GMT):
I do instantiate: peer chaincode instantiate -o blockchain1:7050 -C masab1 -n masabd3 -v 1 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('GPMSP.member')"

mascanc (Tue, 31 Oct 2017 13:06:25 GMT):
and I see the docker container

mascanc (Tue, 31 Oct 2017 13:06:26 GMT):
9e97841f3fb2 dev-blockchaingp.gp.challenge.tiani-spirit.int-masabd3-1 "chaincode -peer.a..." 23 seconds ago Up 21 seconds dev-blockchaingp.gp.challenge.tiani-spirit.int-masabd3-1

mascanc (Tue, 31 Oct 2017 13:06:26 GMT):
9e97841f3fb2 dev-blockchaingp-masabd3-1 "chaincode -peer.a..." 23 seconds ago Up 21 seconds dev-blockchaingp.masabd3-1

mascanc (Tue, 31 Oct 2017 13:07:19 GMT):
@jrosmith but if I go in bash in the instance

mascanc (Tue, 31 Oct 2017 13:07:30 GMT):
blockchaingp ~ $ docker exec -it dev-blockchaingp-masabd3-1 bash

mascanc (Tue, 31 Oct 2017 13:07:50 GMT):
I see just these processes: root@9e97841f3fb2:/# ps axuw USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 48204 7540 ? Ssl 13:05 0:00 chaincode -peer.address=blockchaingp:7051 root 9 0.1 0.0 18232 1908 pts/0 Ss 13:07 0:00 bash root 17 0.0 0.0 34412 1464 pts/0 R+ 13:07 0:00 ps axuw

mascanc (Tue, 31 Oct 2017 13:08:02 GMT):
where is my chaincode? Did hyperledger renamed it as "chaincode"?

mascanc (Tue, 31 Oct 2017 13:08:38 GMT):
from the logs I see my printout

mascanc (Tue, 31 Oct 2017 13:08:44 GMT):
blockchaingp ~ $ docker logs dev-blockchaingp-masabd3-1 2017/10/31 13:05:55 Starting the smart contract. No initialization made

mascanc (Tue, 31 Oct 2017 13:09:32 GMT):
@jrosmith : But then, I invoke and I see: peer chaincode invoke -o blockchain1:7050 -C masab1 -n masabd3 -v 1 -c '{"Args":["invoke","a","b","10"]}'

mascanc (Tue, 31 Oct 2017 13:09:40 GMT):
and the error

mascanc (Tue, 31 Oct 2017 13:09:41 GMT):
Error: Error endorsing invoke: rpc error: code = Unknown desc = could not find chaincode with name 'masabd3' - make sure the chaincode masabd3 has been successfully instantiated and try again -

mascanc (Tue, 31 Oct 2017 13:10:06 GMT):
the version is matching the docker name

mascanc (Tue, 31 Oct 2017 13:10:13 GMT):
and I have the same error with the java sdk

jrosmith (Tue, 31 Oct 2017 13:18:38 GMT):
@mascanc its fine that it says `chaincode -peer.addr`, could it be that the invoke is going to port 7050 and not 7051?

mascanc (Tue, 31 Oct 2017 13:25:10 GMT):
@jrosmith , but how can I tell to the invoke to go on that port?

amiladi (Tue, 31 Oct 2017 13:33:11 GMT):
Has joined the channel.

daanporon (Tue, 31 Oct 2017 16:32:17 GMT):
hi, can someone point me to an example where an identity (public key) of a certificate is stored within the state?

daanporon (Tue, 31 Oct 2017 16:32:17 GMT):
hi, can someone point me to an example where an identity (public key) of a certificate is stored within the state? and is used later on to validate some stuff ...

mascanc (Tue, 31 Oct 2017 18:18:13 GMT):
Works. The error was related to the fact that I had a separate container.

RezwanKabir (Tue, 31 Oct 2017 18:49:12 GMT):
Has joined the channel.

kayadhami (Wed, 01 Nov 2017 15:59:11 GMT):
Has joined the channel.

gregg1494 (Thu, 02 Nov 2017 05:07:04 GMT):
Has joined the channel.

Derashe (Thu, 02 Nov 2017 15:27:31 GMT):
Has joined the channel.

E.Gutarra.Tibco (Thu, 02 Nov 2017 17:57:37 GMT):
Has joined the channel.

E.Gutarra.Tibco (Thu, 02 Nov 2017 17:57:56 GMT):
Hi all, How am I supposed to instantiate my chaincode when my Init function is not expecting any arguments? I've tried the following but it didn't work. peer chaincode instantiate -n mycc -v 0 -c '{}' -C myc

E.Gutarra.Tibco (Thu, 02 Nov 2017 17:58:04 GMT):
My Init function looks like this:

E.Gutarra.Tibco (Thu, 02 Nov 2017 17:58:14 GMT):
func (s *SmartContract) Init(stub shim.ChaincodeStubInterface) sc.Response { return shim.Success(nil) }

muralisr (Thu, 02 Nov 2017 20:41:35 GMT):
@E.Gutarra.Tibco try peer chaincode instantiate -n mycc -v 0 -c '{"Args":[]}' -C myc

kiranarshakota (Fri, 03 Nov 2017 00:55:59 GMT):
Has joined the channel.

Xramas (Fri, 03 Nov 2017 04:14:03 GMT):
Has joined the channel.

chokha (Fri, 03 Nov 2017 06:50:13 GMT):
Has joined the channel.

JyothsnaGali (Fri, 03 Nov 2017 11:10:54 GMT):
Has joined the channel.

Timstar65 (Fri, 03 Nov 2017 12:31:33 GMT):
Has joined the channel.

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:31:30 GMT):
Hi all, I'm trying to create the package for some chaincode I've installed and tested in dev-mode.

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:31:52 GMT):
Now I'm reading through the tutorial Chaincode for Operators

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:32:16 GMT):
For creating the package it's stating that I need to issue this command:

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:32:19 GMT):
peer chaincode package -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 -s -S -i "AND('OrgA.admin')" ccpack.out

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:32:43 GMT):
but where am I supposed to run this command from. Which network do I need to have running to do this?

E.Gutarra.Tibco (Fri, 03 Nov 2017 20:59:42 GMT):
Or well how do I get the path ... github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 into the peer container.. I can't find that path in the peer I'm running it from: docker exec -it cli bash

olegvg (Fri, 03 Nov 2017 23:02:54 GMT):
Has joined the channel.

knagware9 (Sat, 04 Nov 2017 17:43:26 GMT):
@E.Gutarra.Tibco ,need to run at peer where you want to install chaincode and path you taking about is the git repository

creativelinks (Sat, 04 Nov 2017 19:54:29 GMT):
Has joined the channel.

mostafa.elsayyad (Sun, 05 Nov 2017 21:16:41 GMT):
Has joined the channel.

liutc (Mon, 06 Nov 2017 03:54:20 GMT):
Has joined the channel.

Lucifer (Mon, 06 Nov 2017 06:23:20 GMT):
Has joined the channel.

novira (Mon, 06 Nov 2017 08:58:45 GMT):
Has joined the channel.

novira (Mon, 06 Nov 2017 08:59:29 GMT):
i want to query into chaincode using REST, like this

novira (Mon, 06 Nov 2017 08:59:37 GMT):
{ "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID":{ "name": "mycc" }, "ctorMsg": { "args":["deploy", "a", "b", "10"] }, "secureContext": "jim" }, "id": 1 }

novira (Mon, 06 Nov 2017 08:59:58 GMT):
but im getting some error

novira (Mon, 06 Nov 2017 09:00:02 GMT):
{ "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found)" }, "id": 1 }

novira (Mon, 06 Nov 2017 09:00:11 GMT):
please help me

novira (Mon, 06 Nov 2017 09:00:16 GMT):
:D

novira (Mon, 06 Nov 2017 09:00:48 GMT):
im using hyperledger fabri v 0.6

jrosmith (Mon, 06 Nov 2017 13:46:19 GMT):
@novira that looks like a call against a fabric 1.0 chaincode example. the way of writing chaincode is not backwards compatible

toddinpal (Mon, 06 Nov 2017 20:12:42 GMT):
What certificate does chaincode use to sign its messages?

Ryo (Tue, 07 Nov 2017 05:09:25 GMT):
Has joined the channel.

novira (Wed, 08 Nov 2017 09:30:16 GMT):
@jrosmith can you show me how to running fabric 1.0 on windows? but if im running .yaml fabric 1.0.0 on windows version im getting some problem, im only runnning ca and couchdb, but not in orderer and peer (run and exit again)

novira (Wed, 08 Nov 2017 09:31:47 GMT):
@toddinpal im use version fabric 0.6 and running on windows using docker for windows

novira (Wed, 08 Nov 2017 09:32:56 GMT):
@toddinpal im using membersrvc

toddinpal (Wed, 08 Nov 2017 10:11:06 GMT):
@novira You can easily run fabric 1.0 on Windows, but there is no REST support in 1.0

toddinpal (Wed, 08 Nov 2017 10:13:37 GMT):
@novira Although my experience has largely been on Linux (running in a VirtualBox VM on a Windows host)

toddinpal (Wed, 08 Nov 2017 10:14:28 GMT):
@novira I can't really help you with 0.6 as I haven't done anything with that for over a year...

toddinpal (Wed, 08 Nov 2017 10:18:23 GMT):
@novira You might check out this web page: https://techzonego.wordpress.com/2017/07/28/run-hyperledger-fabric-on-windows-natively/

novira (Wed, 08 Nov 2017 10:31:09 GMT):
@toddinpal thank you very much

toddinpal (Wed, 08 Nov 2017 10:31:25 GMT):
np

novira (Wed, 08 Nov 2017 10:36:02 GMT):
im will tryyour experiment, how to i konow about this image support for REST or not, but i think REST support can be look at from port like 7050,

novira (Wed, 08 Nov 2017 10:51:07 GMT):
@toddinpal with your fabric experiment, can i run this using SDK?

Jonny (Wed, 08 Nov 2017 11:53:01 GMT):
Hi guys,

Jonny (Wed, 08 Nov 2017 12:01:57 GMT):
Hi guys, I have the following struct for both Wallet & Owner. I need to create both of owner and wallet at the same time and link up together with ownerId in wallet information. ``` // Wallet represents a data of user's wallet type Wallet struct { ObjectType string `json:"docType"` //field for couchdb WalletID uuid.UUID `json:"walletId"` Balance int `json:"balance"` WalletType string `json:"walletType"` Enabled bool `json:"enabled"` Owner OwnerRelation `json:"owner"` } // Owner represents a data of user type Owner struct { ObjectType string `json:"docType"` //field for couchdb UserID uuid.UUID `json:"userId"` Enabled bool `json:"enabled"` } // OwnerRelation represents a link between Owner and Wallet type OwnerRelation struct { UserID uuid.UUID `json:"userId"` } ``` Question : Is that possible for me to save both entity during one putState or I need to run twice of putState to achieve this?

Jonny (Wed, 08 Nov 2017 12:01:57 GMT):
Hi guys, I have the following struct for both Wallet & Owner. I need to create both of owner and wallet at the same time and link up together with ownerId in wallet information. ``` // Wallet represents a data of user's wallet type Wallet struct { ObjectType string `json:"docType"` //field for couchdb WalletID uuid.UUID `json:"walletId"` Balance int `json:"balance"` WalletType string `json:"walletType"` Enabled bool `json:"enabled"` Owner OwnerRelation `json:"owner"` } // Owner represents a data of user type Owner struct { ObjectType string `json:"docType"` //field for couchdb UserID uuid.UUID `json:"userId"` Enabled bool `json:"enabled"` } ``` Question : Is that possible for me to save both entity during one putState or I need to run twice of putState to achieve this?

mastersingh24 (Wed, 08 Nov 2017 13:27:52 GMT):
@Jonny - you would need to do 2 PutState operations (but they will be atomic since they are part of the same transaction)

Jonny (Wed, 08 Nov 2017 13:28:20 GMT):
thank you @mastersingh24

Jonny (Wed, 08 Nov 2017 13:31:50 GMT):
@mastersingh24, before creating a new owner, no need for me to check whether the wallet already existing or not, right? I could simply try to add again and if there is already one, it would throw an error for me?

Jonny (Wed, 08 Nov 2017 13:31:50 GMT):
@mastersingh24, before creating a new owner, no need for me to check whether the wallet already exist or not, right? I could simply try to add again and if there is already one, it would throw an error for me?

mastersingh24 (Wed, 08 Nov 2017 13:43:00 GMT):
I'd do the check in chaincode actually in order to avoid rejected transactions during validation

Jonny (Wed, 08 Nov 2017 13:46:00 GMT):
Sorry, confuse with the term validation. Is this rejection happen in proposal or endorsement?

JohnCena1337 (Wed, 08 Nov 2017 14:22:40 GMT):
Has joined the channel.

JohnCena1337 (Wed, 08 Nov 2017 14:31:51 GMT):
Hey Guys Does anyone know how it is possible to globally set the logging level of the flogging logger outside the code? Just pretend like I'm a real noob

mastersingh24 (Wed, 08 Nov 2017 15:02:48 GMT):
@Jonny - I would do the check in chaincode and return an error if the wallet already exists. You would not want to rely on the validation/commit process (which happens once peers get blocks from the orderer)

mp (Wed, 08 Nov 2017 15:10:48 GMT):
Has joined the channel.

ahp (Wed, 08 Nov 2017 18:53:51 GMT):
Has joined the channel.

dcs0001 (Wed, 08 Nov 2017 22:15:30 GMT):
Has joined the channel.

novira (Thu, 09 Nov 2017 05:08:11 GMT):
@toddinpalhyperledger 1.0.0 have been erased, i cannot download it, can your startfabric.sh to implement on hyperledger after that?

tim_zeng (Thu, 09 Nov 2017 05:36:23 GMT):
Has joined the channel.

tim_zeng (Thu, 09 Nov 2017 07:20:55 GMT):
Is anyone has idea of designing data struct for bank clearing and settlement? The balance of bank account will be updated by multi users in their payment transaction, only the 1st transaction will update bank account(asset) successfully if these transactions are in the same block . is fabric suitable for bank clearing and settlement?

Vadim (Thu, 09 Nov 2017 08:24:39 GMT):
@tim_zeng https://github.com/hyperledger/fabric-samples/tree/master/high-throughput

tim_zeng (Thu, 09 Nov 2017 11:51:10 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=4huL4pknZygZFJdse) @Vadim Great doc. However, using composite key to store data is not easy for complex use case e.g. bank settlement composite key includes multi banks , and report for settlement is needed

tim_zeng (Thu, 09 Nov 2017 11:51:49 GMT):

Clipboard - 2017年11月9日晚上7点52分

Vadim (Thu, 09 Nov 2017 11:56:48 GMT):
@tim_zeng I guess you can use CouchDB for that?

tim_zeng (Thu, 09 Nov 2017 12:12:27 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Bt3zcTMhRiXZaHjYK) [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=EK77CwbuK7z8uWPXZ) @Vadim CouchDB is for rich query, cannot resovle multi transactoins updating same asset issue

Vadim (Thu, 09 Nov 2017 12:13:07 GMT):
why not? Just make a rich query over transactions.

Vadim (Thu, 09 Nov 2017 12:13:37 GMT):
it's a matter of data representation / model

tim_zeng (Thu, 09 Nov 2017 12:16:31 GMT):
first , rich query is querying against value not key, you have to convert coposite key in the high throught solution to value

Vadim (Thu, 09 Nov 2017 12:26:39 GMT):
@tim_zeng I then suggest you that for a key you use some unique key (e.g. tx id), and use the actual key which you are going to use for searching as a model property, then you can run queries on it.

tim_zeng (Thu, 09 Nov 2017 12:32:39 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=vmH5Tgz6MigWc4kjA) @Vadim thanks, i will think about it

suchith.arodi (Fri, 10 Nov 2017 03:24:35 GMT):
Has joined the channel.

suchith.arodi (Fri, 10 Nov 2017 03:34:02 GMT):
Hello All, I am new to Hyperledger Fabric. Is it possible with the chaincode (Smart contract) to use a hash map and store a set of key value pairs (Where key is the user address/public-key/any unique ID which links back to user and the value is a number). In my app, when the user wants something the user will start a transaction and this transaction will intern trigger the chaincode which has the hashmap stored and based on the user unique ID the hash lookup in the chaincode will return the value. I want to store this value back on the ledger with the user key. Can this be done on Fabric? If someone knows anything about this, please help me out. -Thanks

GiorgiBlockchain (Fri, 10 Nov 2017 08:44:05 GMT):
Hi all, Let's say I have two different type structures in Chaincode and I want to get the most recent transactions (last 10 or 20) no matter of structure. What is the best practice to do it? Thanks!

Vadim (Fri, 10 Nov 2017 08:48:39 GMT):
stub.GetHistoryForKey()?

Vadim (Fri, 10 Nov 2017 08:48:39 GMT):
stub.GetHistoryForKey('key name')?

GiorgiBlockchain (Fri, 10 Nov 2017 09:02:45 GMT):
This will get history by a specific key, right?

Vadim (Fri, 10 Nov 2017 09:05:31 GMT):
yes

Vadim (Fri, 10 Nov 2017 09:05:43 GMT):
key changes over time

GiorgiBlockchain (Fri, 10 Nov 2017 09:06:39 GMT):
I see, thank you Vadim.

GiorgiBlockchain (Fri, 10 Nov 2017 09:11:17 GMT):
Can I write records from a different type of structures in one array in Golang?

Vadim (Fri, 10 Nov 2017 09:12:17 GMT):
you can serialize them, but this seems like a bad design

agiledeveloper (Fri, 10 Nov 2017 09:56:04 GMT):
hi guys, can you suggest what could be the reason for this error ```agiledeveloper@UbuntuServer:~$ docker logs dev-peer0.egyptianmuseum.org-artmanager-0 2017-11-10 09:48:52.070 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "fabric-ca-server") ```

agiledeveloper (Fri, 10 Nov 2017 09:56:04 GMT):
hi guys, can you suggest what could be the reason for this error, I can successfully instantiate the chaincode if tls is disabled ```agiledeveloper@UbuntuServer:~$ docker logs dev-peer0.egyptianmuseum.org-artmanager-0 2017-11-10 09:48:52.070 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "fabric-ca-server") ```

ashablyg (Fri, 10 Nov 2017 16:22:27 GMT):
Has joined the channel.

gut (Fri, 10 Nov 2017 16:42:24 GMT):
Hello everyone. I'm facing "HasNext() couldn't get Current" error when I run queries into a [mockStub](https://gowalker.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStateRangeQueryIterator_HasNext) in my testing environment. I'm developing with Goglang (Version=GO-173.3531.21).

gut (Fri, 10 Nov 2017 16:43:00 GMT):
Does anyone know the sense of this? Can it lead to "phantom reads" in production environment? Or are they different stuff?

gut (Fri, 10 Nov 2017 16:43:21 GMT):
Thanks in advance ;)

mzphitt (Fri, 10 Nov 2017 22:09:27 GMT):
Has joined the channel.

DeepaR (Sat, 11 Nov 2017 06:04:11 GMT):
Has joined the channel.

isahilsharma (Sat, 11 Nov 2017 14:33:21 GMT):
Has joined the channel.

isahilsharma (Sat, 11 Nov 2017 14:33:28 GMT):
Hi All Just joined the hyperledger community and working with the fabric-samples project I'm able to successfully run the fabcar example; just wanted to ask if someone know how to install our own chaincode to the fabcar example and test?

janb87 (Sat, 11 Nov 2017 15:44:44 GMT):
Has joined the channel.

janb87 (Sat, 11 Nov 2017 15:50:41 GMT):
@isahilsharma If you want to run your own chaincode you'll need to do some changes inside the startFabric.sh script

janb87 (Sat, 11 Nov 2017 15:50:43 GMT):
https://github.com/hyperledger/fabric-samples/blob/release/fabcar/startFabric.sh#L23

janb87 (Sat, 11 Nov 2017 15:51:58 GMT):
you'll need to change the path from 'github.com/fabcar' to '../../../my-chain-code/go'

janb87 (Sat, 11 Nov 2017 15:54:07 GMT):
I've did some experimenting to use chaincode instead of go inside the samples repo. I had to rewire also the scripts to use a different path + use node.js language (which is set using the -l option)

janb87 (Sat, 11 Nov 2017 15:54:42 GMT):
https://github.com/janb87/fabric-samples/commit/a3e421a0ef2eb24e425c8501a66b948e9fd75cf5

suchith.arodi (Sat, 11 Nov 2017 20:42:03 GMT):
Hi All, I want to access the public key/address of the node/peer in the chaincode (golang). How can I access this attribute? Is there any builtin function for this?

janb87 (Sun, 12 Nov 2017 08:47:14 GMT):
I'm getting an error on the peer when trying to setup the chaincode-docker-devmode network ``` 2017-11-12 08:45:02.837 UTC [msp] getCertificationChain -> DEBU 04b MSP DEFAULT getting certification chain panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb07129] goroutine 49 [running]: github.com/hyperledger/fabric/gossip/gossip.NewGossipService.func1(0xc420352be0, 0x20, 0x20, 0xc4202e6400, 0x3bc, 0x400) /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:93 +0x79 github.com/hyperledger/fabric/gossip/identity.(*identityMapperImpl).delete(0xc42031d440, 0xc420352be0, 0x20, 0x20, 0xc4202e6400, 0x3bc, 0x400) /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:213 +0xbb github.com/hyperledger/fabric/gossip/identity.(*identityMapperImpl).Put.func1() /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:134 +0x60 created by time.goFunc /opt/go/src/time/sleep.go:170 +0x44 ``` Any idea?

janb87 (Sun, 12 Nov 2017 13:32:07 GMT):
Could this relate to https://jira.hyperledger.org/browse/FAB-6969?

janb87 (Sun, 12 Nov 2017 13:32:11 GMT):
@here

C0rWin (Sun, 12 Nov 2017 13:37:17 GMT):
Has joined the channel.

yacovm (Sun, 12 Nov 2017 13:40:19 GMT):
@janb87 how do you reproduce this?

yacovm (Sun, 12 Nov 2017 13:45:35 GMT):
is this the master branch or release?

janb87 (Sun, 12 Nov 2017 13:45:39 GMT):
I have it all the time now, yesterday no problem

janb87 (Sun, 12 Nov 2017 13:46:43 GMT):
release branch, 1.1.0-preview docker images

janb87 (Sun, 12 Nov 2017 13:47:26 GMT):
FAB-6969 is logged today, so thought it maybe relates to this issue which I only started having from today

mastersingh24 (Sun, 12 Nov 2017 13:49:37 GMT):
@janb87 - yes - this is the issue

yacovm (Sun, 12 Nov 2017 13:50:28 GMT):
ok I got this

mastersingh24 (Sun, 12 Nov 2017 13:50:33 GMT):
It will happen on all branches and for all released Docker images which attempt to use the sampleconfig

yacovm (Sun, 12 Nov 2017 13:50:45 GMT):
the identity mapper is initialized with an outdated cert

yacovm (Sun, 12 Nov 2017 13:50:54 GMT):
and then the callback: ``` func(pkiID common.PKIidType, identity api.PeerIdentityType) { g.comm.CloseConn(&comm.RemotePeer{PKIID: pkiID}) g.certPuller.Remove(string(pkiID)) })

yacovm (Sun, 12 Nov 2017 13:50:55 GMT):
is run

yacovm (Sun, 12 Nov 2017 13:51:01 GMT):
which, calls `g.comm.CloseConn(&comm.RemotePeer{PKIID: pkiID})`

yacovm (Sun, 12 Nov 2017 13:51:09 GMT):
but the comm is only initialized after the identity mapper is initialized

yacovm (Sun, 12 Nov 2017 13:51:14 GMT):
(a few lines below)

mastersingh24 (Sun, 12 Nov 2017 13:51:35 GMT):
ah - yeah - makes sense

yacovm (Sun, 12 Nov 2017 13:51:41 GMT):
But, we should never reach this state, as the MSP should check if the signing identity is expired, and panic!

yacovm (Sun, 12 Nov 2017 13:51:47 GMT):
and the MSP is initialized before gossip is....

knagware9 (Sun, 12 Nov 2017 15:02:46 GMT):
@suchith.arodi ..Yes there is API methods which can be used ..see https://fabric-sdk-node.github.io/module-api.KeyValueStore.html

novira (Sun, 12 Nov 2017 17:03:31 GMT):
i have a trouble on fabric sample, how to make a channel on balance trasnfer, and i have got this massage

novira (Sun, 12 Nov 2017 17:04:14 GMT):
[2017-11-12 18:31:58.951] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } E1112 18:31:58.969000000 6116 ssl_transport_security.c:625] Invalid cipher list : undefined. E1112 18:31:58.969000000 6116 security_connector.c:857] Handshaker factory crea tion failed with TSI_INVALID_ARGUMENT. E1112 18:31:58.970000000 6116 secure_channel_create.c:112] Failed to create sec ure subchannel for secure name 'localhost:7050' E1112 18:31:58.970000000 6116 secure_channel_create.c:143] Failed to create sub channel arguments during subchannel creation. E1112 18:31:58.970000000 6116 ssl_transport_security.c:625] Invalid cipher list : undefined. E1112 18:31:58.970000000 6116 security_connector.c:857] Handshaker factory crea tion failed with TSI_INVALID_ARGUMENT. E1112 18:31:58.971000000 6116 secure_channel_create.c:112] Failed to create sec ure subchannel for secure name 'localhost:7050' E1112 18:31:58.971000000 6116 secure_channel_create.c:143] Failed to create sub channel arguments during subchannel creation.

novira (Sun, 12 Nov 2017 17:04:46 GMT):
how should i do?

novira (Sun, 12 Nov 2017 17:05:21 GMT):
i use windows 8 and docker-ce

chainsaw (Sun, 12 Nov 2017 21:39:36 GMT):
Has joined the channel.

chainsaw (Sun, 12 Nov 2017 21:43:06 GMT):
Where can I learn about the current status of development for developing chaincode in alternative languages like Java, Python, JavaScript, Scala, C/C++, etc.? Why was Java removed and no longer supported? Where can I read about what happened to Java chaincode and why?

jetsginza (Mon, 13 Nov 2017 02:09:53 GMT):
Has joined the channel.

DarshanBc (Mon, 13 Nov 2017 05:11:49 GMT):
Hi I have an array of int inside a struct I need to query int array in ascending order will rich query of couchDb works in this scenario?

yacovm (Mon, 13 Nov 2017 11:21:03 GMT):
@chainsaw there is a chaicode in node.js

AkshayJindal (Mon, 13 Nov 2017 11:45:40 GMT):
Has joined the channel.

jrosmith (Mon, 13 Nov 2017 13:00:24 GMT):
@DarshanBc couchDB with lucene allows for full text queries

Jonny (Mon, 13 Nov 2017 13:55:35 GMT):
hi guys, I just instantiated my chaincode using cli, I need to know, should instantiate only for first peer?

Jonny (Mon, 13 Nov 2017 13:55:35 GMT):
hi guys, I just instantiated my chaincode using cli, but how can I check the log of the instantiation? and I need to know, should instantiate only for first peer?

janb87 (Mon, 13 Nov 2017 20:15:46 GMT):
@here I've taken latest changes from https://gerrit.hyperledger.org/r/#/c/15413/ regarding the certificates which were expired. I'm not able though to update the "orderer.block" file and the "myc.tx" file using "script.sh" (https://github.com/hyperledger/fabric-samples/blob/release/chaincode-docker-devmode/script.sh). Looks like this script.sh needs an update. Anybody know s how to fix this?

theruss (Mon, 13 Nov 2017 20:25:14 GMT):
Has joined the channel.

janb87 (Mon, 13 Nov 2017 20:58:39 GMT):
Fixed it => https://github.com/janb87/fabric-samples/commit/2ced20b600f5de51e2e0cbbe394991a5ee73bc8a

aks1981 (Tue, 14 Nov 2017 09:45:59 GMT):
Has joined the channel.

jrosmith (Tue, 14 Nov 2017 13:36:12 GMT):
@Jonny chaincode instantiation is on a per channel basis, chaincode installation is on a per peer basis. you only need to call instantiate once

Jonny (Tue, 14 Nov 2017 13:37:13 GMT):
thank you @jrosmith

Timstar65 (Tue, 14 Nov 2017 16:00:38 GMT):
Can someone contact me who can help develop a test app using Hyperledger Fabric pls or point me to where I can find someone?

swettdj (Tue, 14 Nov 2017 16:29:32 GMT):
Hello, could some one explain how can I upgrade the chaincode on a fabric-sample blockchain? I run the install command and everything is ok, then I run the upgrade and also it is ok. But I discovered that it continue to load standard chaincode and not my modified chaincode. I'using the command `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.4 -p github.com/hyperledger/fabric/peer/cc` but I get `path to chaincode does not exist`

swettdj (Tue, 14 Nov 2017 16:29:55 GMT):
could someone help me?

theruss (Tue, 14 Nov 2017 19:01:34 GMT):
@swettdj I am not as far along as you with getting my hands dirty, but looking at the `-p` flag, which presumably is short for "path", the URI "github.com/hyperledger/fabric/cc" doesn't exist. Perhaps the "cc" (short for "Chain Code"?) is now replaced with "chaincode"?

theruss (Tue, 14 Nov 2017 19:01:59 GMT):
Looking on github.com via a browser I see: https://github.com/hyperledger/fabric/tree/release/peer/chaincode, and not https://github.com/hyperledger/fabric/tree/release/peer/cc

theruss (Tue, 14 Nov 2017 19:02:52 GMT):
So modify your command's `-p` flag to this and see what happens. If it doesn't work, then I'm out of ideas already! ``` -p github.com/hyperledger/fabric/peer/chaincode ```

theruss (Tue, 14 Nov 2017 19:02:52 GMT):
So modify your command's `-p` flag to this and see what happens. If it doesn't work, then I'm out of ideas already! ```-p github.com/hyperledger/fabric/peer/chaincode ```

swettdj (Wed, 15 Nov 2017 07:56:48 GMT):
@theruss `-p` flag should specify the path, but I'm trying to understand which kind of path because if I set my local machine path I get `path to chaincode does not exist` If I put my chain code on my github repository and set its path, the problem is the same.

swettdj (Wed, 15 Nov 2017 08:01:19 GMT):
I tried also to (following a wrong guide founded on internet) tu put my chaincode into some "special" hyperldeger system folder i.e. `github.com/hyperledger/fabric/peer/cc` but anithing change

ajksharma (Wed, 15 Nov 2017 08:02:33 GMT):
Has joined the channel.

gut (Wed, 15 Nov 2017 09:16:00 GMT):
Hello everyone. I'm facing "HasNext() couldn't get Current" error when I run queries into a mockStub in my testing environment. Does anyone know why is this happening? Is this a problem at production? I'm developing with Goland Version=GO-173.3531.21.

Vadim (Wed, 15 Nov 2017 09:19:14 GMT):
@gut It's not an error, it's just a warning which you can ignore

gut (Wed, 15 Nov 2017 09:20:03 GMT):
[Ok. Ignored then :) ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7WCauWujBysbBLKLA) @Vadim

AliOnder (Wed, 15 Nov 2017 14:39:51 GMT):
Has joined the channel.

daanporon (Wed, 15 Nov 2017 16:28:58 GMT):
hi, we are trying to setup the 1.1 preview with node.js chaincode ... but when we instantiate the chaincode it times out ...

daanporon (Wed, 15 Nov 2017 16:29:36 GMT):
we saw in the code that when you enable TLS, mutual TLS is enabled by default? but we didn't configure anything for mutual tls ... could this be our issue?

daanporon (Wed, 15 Nov 2017 16:30:13 GMT):
it suspects a CORE_TLS_CLIENT_KEY_PATH and CORE_TLS_CLIENT_CERT_PATH

daanporon (Wed, 15 Nov 2017 16:30:39 GMT):
and they are there but we don't know if they are the correct ones

daanporon (Wed, 15 Nov 2017 16:48:06 GMT):
we see that it sends a chat message i think the register one ... but we don't get a response or anything :/

eetti (Wed, 15 Nov 2017 17:07:59 GMT):
I need help on the implementation of a query service so I can mock this feature for testing ``` func (stub *MockStub) GetQueryResult(query string) (StateQueryIteratorInterface, error) { // Not implemented since the mock engine does not have a query engine. // However, a very simple query engine that supports string matching // could be implemented to test that the framework supports queries return nil, errors.New("not implemented") } ```

janb87 (Wed, 15 Nov 2017 19:44:55 GMT):
@here could we add an option to specifiy the 'ssl-target-name-override' for fabric-shim? Currently it's not possible to specify this option. Probably an environment variable would be best. As it's done for the pem option. See https://github.com/hyperledger/fabric-chaincode-node/blob/master/src/lib/chaincode.js#L100

yacovm (Wed, 15 Nov 2017 20:39:01 GMT):
@janb87 why do you need this?

janb87 (Thu, 16 Nov 2017 08:55:53 GMT):
We are trying to run node.js chaincode but we get a timeout from the peer. Inside the logging of the chaincode container we can see it send a chat to the peer but it looks like the peer never received it.

janb87 (Thu, 16 Nov 2017 08:56:47 GMT):
I looked into the code and saw some notes that you need to have mutual tls enabled. We currently don't have this.

janb87 (Thu, 16 Nov 2017 08:57:13 GMT):
I thought that maybe using the ssl-target-name-override would be an option to get around this but it didn't work.

janb87 (Thu, 16 Nov 2017 08:57:27 GMT):
@yacovm Is there some documentation on how to setup mutual TLS?

Vadim (Thu, 16 Nov 2017 08:59:12 GMT):
@janb87 with mutual tls, peer would still receive the request, so I guess that's not the reason

daanporon (Thu, 16 Nov 2017 09:03:01 GMT):
@Vadim i'm working with jan on the project ... do you have any idea how we best proceed into debugging this because right now we have no clue where to look :( we see the chaincode sending a chat message but it doesn't receive anything

yacovm (Thu, 16 Nov 2017 09:05:36 GMT):
@janb87 I don't understand

yacovm (Thu, 16 Nov 2017 09:05:42 GMT):
you're saying you're using node.js chaincode

yacovm (Thu, 16 Nov 2017 09:05:46 GMT):
are you using dev mode or not?

janb87 (Thu, 16 Nov 2017 09:06:11 GMT):
we are not using dev mode

janb87 (Thu, 16 Nov 2017 09:06:50 GMT):
we also have go code which is working, only facing issue with node.js

yacovm (Thu, 16 Nov 2017 09:07:48 GMT):
https://github.com/hyperledger/fabric-chaincode-node/blob/master/src/lib/chaincode.js#L103-L104

yacovm (Thu, 16 Nov 2017 09:07:53 GMT):
so you need to set these env vars

daanporon (Thu, 16 Nov 2017 09:09:38 GMT):
that was our question we need this for mutual TLS ... but based on which certificate are these generated?

daanporon (Thu, 16 Nov 2017 09:10:11 GMT):
does the peer generate them automatically? Because for some reason they are set and they are available inside the chaincode container ... but we don't know where they come from

yacovm (Thu, 16 Nov 2017 09:10:19 GMT):
right exactly

yacovm (Thu, 16 Nov 2017 09:10:25 GMT):
so, the peer generates a certificate

yacovm (Thu, 16 Nov 2017 09:10:31 GMT):
injects it into the container ;)

yacovm (Thu, 16 Nov 2017 09:10:42 GMT):
and the certificate is signed by the peer

daanporon (Thu, 16 Nov 2017 09:10:57 GMT):
does the peer tls certificate needs to be a CA:TRUE then?

yacovm (Thu, 16 Nov 2017 09:11:18 GMT):
so, I don't think it should, however I don't think the `crypto/tls` library enforces it

yacovm (Thu, 16 Nov 2017 09:11:28 GMT):
do you mean the root CA cert?

yacovm (Thu, 16 Nov 2017 09:11:39 GMT):
it's not a certificate of the peer

yacovm (Thu, 16 Nov 2017 09:11:45 GMT):
it's a certificate that the peer generates itself

yacovm (Thu, 16 Nov 2017 09:11:54 GMT):
it generates the entire validation chain itself

yacovm (Thu, 16 Nov 2017 09:11:56 GMT):
at startup

daanporon (Thu, 16 Nov 2017 09:12:18 GMT):
but as @Vadim explained if it's an issue with mutual TLS then the peer should receive a packet from the chaincode container ... but we don't see any packet comming in

daanporon (Thu, 16 Nov 2017 09:13:12 GMT):
the root certificate we are providing is the combined certificate of the peer and all his intermediate certificates all the way to the root one ...

daanporon (Thu, 16 Nov 2017 09:14:08 GMT):
the first one inside that certificate is the root one so ... root > intermediate > intermediate > leaf certificate

daanporon (Thu, 16 Nov 2017 09:14:39 GMT):
btw, probably forgot to mention this but the GO code is working without any issues ... does this also enforces mutual TLS? because we didn't do anything different for that one

Vadim (Thu, 16 Nov 2017 09:22:29 GMT):
@daanporon have you tried to run first-network from master? It has an option to deploy a nodejs chaincode. Just to see if that works.

daanporon (Thu, 16 Nov 2017 09:25:51 GMT):
no, we've setup a dev environment where the nodejs is working

janb87 (Thu, 16 Nov 2017 09:26:07 GMT):
i've tried it using the basic-network

Vadim (Thu, 16 Nov 2017 09:26:58 GMT):
@janb87 you tried to deploy nodejs chaincode on basic-network, did it work?

janb87 (Thu, 16 Nov 2017 09:27:24 GMT):
yes it worked fine

janb87 (Thu, 16 Nov 2017 09:27:30 GMT):
but it's not using tls

Vadim (Thu, 16 Nov 2017 09:27:44 GMT):
and if you deploy your nodejs chaincode, does it work?

Vadim (Thu, 16 Nov 2017 09:27:44 GMT):
and if you deploy your nodejs chaincode on basic-network, does it work?

daanporon (Thu, 16 Nov 2017 09:28:10 GMT):
yes in the basic-network the nodejs is working just fine

Vadim (Thu, 16 Nov 2017 09:28:21 GMT):
so it's a problem with your setup then

daanporon (Thu, 16 Nov 2017 09:28:28 GMT):
but now we try to get it running on our multiple machine setup inside aws ... where we generated all the certificates ourself

daanporon (Thu, 16 Nov 2017 09:28:50 GMT):
and we don't know what we are doing wrong ... go code is running fine ...

daanporon (Thu, 16 Nov 2017 09:29:25 GMT):
so there needs to be a difference between GO and NodeJS chaincode that we are missing

daanporon (Thu, 16 Nov 2017 09:29:39 GMT):
and that's why we thought it had something to do with the mutual TLS

Vadim (Thu, 16 Nov 2017 09:29:58 GMT):
are you sure the peer is reachable at all from the chaincode container?

Vadim (Thu, 16 Nov 2017 09:30:04 GMT):
maybe it's some network issue?

daanporon (Thu, 16 Nov 2017 09:30:43 GMT):
yes the peer is reachable, we tried pinging it

daanporon (Thu, 16 Nov 2017 09:31:21 GMT):
is GO also using port 7052? and does it also enforce mutual TLS?

Vadim (Thu, 16 Nov 2017 09:31:40 GMT):
I think on 7052 there is no tls and it's for dev mode only

Vadim (Thu, 16 Nov 2017 09:32:27 GMT):
however the fact that golang works is confusing

daanporon (Thu, 16 Nov 2017 09:33:26 GMT):
we see that when the nodejs is executed it is using 7052 outside of the dev env

daanporon (Thu, 16 Nov 2017 09:33:55 GMT):
it does this: > mychaincode@1.0.2 start /usr/local/src > CORE_CHAINCODE_LOGGING_SHIM=DEBUG node chaincode.js "--peer.address" "peer1.hostname.be:7052"

yacovm (Thu, 16 Nov 2017 09:34:06 GMT):
on 7052 there is ONLY CHAINCODE

yacovm (Thu, 16 Nov 2017 09:34:09 GMT):
regardless of TLS or not

Vadim (Thu, 16 Nov 2017 09:35:09 GMT):
@yacovm so golang is also connecting to 7052?

yacovm (Thu, 16 Nov 2017 09:35:13 GMT):
yes

daanporon (Thu, 16 Nov 2017 09:35:15 GMT):
yup

yacovm (Thu, 16 Nov 2017 09:35:16 GMT):
any chaincode type

daanporon (Thu, 16 Nov 2017 09:35:19 GMT):
we checked that as well

yacovm (Thu, 16 Nov 2017 09:35:19 GMT):
it has to

yacovm (Thu, 16 Nov 2017 09:35:41 GMT):
look, @daanporon - have you configured the 2 env vars?

yacovm (Thu, 16 Nov 2017 09:35:44 GMT):
that I pasted above

Vadim (Thu, 16 Nov 2017 09:35:58 GMT):
ok, the video on youtube about nodejs chaincode got me confused about 7052

yacovm (Thu, 16 Nov 2017 09:36:18 GMT):
oh wait a second

yacovm (Thu, 16 Nov 2017 09:36:23 GMT):
we don't pass them anymore as env vars...

yacovm (Thu, 16 Nov 2017 09:36:47 GMT):
look please open a JIRA

yacovm (Thu, 16 Nov 2017 09:36:56 GMT):
and tag me and @jimthematrix

yacovm (Thu, 16 Nov 2017 09:37:03 GMT):
and specify what you did there

janb87 (Thu, 16 Nov 2017 09:37:07 GMT):
they are set, I checked the chaincode container ``` CORE_TLS_CLIENT_KEY_PATH=/etc/hyperledger/fabric/client.key CORE_TLS_CLIENT_CERT_PATH=/etc/hyperledger/fabric/client.crt ``

yacovm (Thu, 16 Nov 2017 09:37:15 GMT):
> ok, the video on youtube about nodejs chaincode got me confused about 7052 What in the video made you confused?

daanporon (Thu, 16 Nov 2017 09:37:30 GMT):
but we don't know how those are generated ... because we never did this

Vadim (Thu, 16 Nov 2017 09:37:38 GMT):
because he uses chaincode in dev mode and opens ports 7052 at the same time

yacovm (Thu, 16 Nov 2017 09:37:49 GMT):
lets make an experiment ok?

daanporon (Thu, 16 Nov 2017 09:37:53 GMT):
the CORE_TLS_CLIENT_KEY_PATH and the CORE_TLS_CLIENT_CERT_PATH

yacovm (Thu, 16 Nov 2017 09:37:58 GMT):
oh wait you can't do that

yacovm (Thu, 16 Nov 2017 09:38:05 GMT):
someone needs to set the env vars in the chaincode

daanporon (Thu, 16 Nov 2017 09:38:43 GMT):
the problem is our environment at the moment is quiet complex ... and we don't really know where the issue is

daanporon (Thu, 16 Nov 2017 09:39:02 GMT):
but the go code is running and the nodejs code isn't

yacovm (Thu, 16 Nov 2017 09:39:07 GMT):
> because he uses chaincode in dev mode and opens ports 7052 at the same time @Vadim - chaincode uses 7052

daanporon (Thu, 16 Nov 2017 09:39:09 GMT):
inside the same network

yacovm (Thu, 16 Nov 2017 09:39:14 GMT):
regardless of devmode, TLS, or not :)

Vadim (Thu, 16 Nov 2017 09:39:27 GMT):
@yacovm ok, no problem. I told you why I was confused.

yacovm (Thu, 16 Nov 2017 09:39:37 GMT):
right, I'm reiterating for the viewers

yacovm (Thu, 16 Nov 2017 09:39:53 GMT):
so can you please open a JIRA and tag me and @jimthematrix ?

yacovm (Thu, 16 Nov 2017 09:44:28 GMT):
> they are set, I checked the chaincode container oh really?

daanporon (Thu, 16 Nov 2017 09:44:29 GMT):
@yacovm is it possible to provide you the private key to our network? so that you can see what's happening there?

yacovm (Thu, 16 Nov 2017 09:45:23 GMT):
wait that's not necessary

yacovm (Thu, 16 Nov 2017 09:45:33 GMT):
we can solve it without you compromising your environment

daanporon (Thu, 16 Nov 2017 09:45:59 GMT):
@yacovm while the container is busy with timing out we have time to see which environment variables are set

yacovm (Thu, 16 Nov 2017 09:45:59 GMT):
are you available in an hour from now? maybe we can do a google hangout and I'll take a look

yacovm (Thu, 16 Nov 2017 09:46:16 GMT):
> while the container is busy with timing out we have time to see which environment variables are set oh I see

yacovm (Thu, 16 Nov 2017 09:46:21 GMT):
so the environment variables are set...

yacovm (Thu, 16 Nov 2017 09:46:40 GMT):
is there a way you can perhaps do `cat /etc/hyperledger/fabric/client.crt`

yacovm (Thu, 16 Nov 2017 09:46:43 GMT):
while the container is running

daanporon (Thu, 16 Nov 2017 09:46:45 GMT):
yups, we only don't know how those are generated

daanporon (Thu, 16 Nov 2017 09:46:51 GMT):
yups we did that

yacovm (Thu, 16 Nov 2017 09:46:55 GMT):
show me the output

yacovm (Thu, 16 Nov 2017 09:47:00 GMT):
it's a PEM and it's not classified

yacovm (Thu, 16 Nov 2017 09:47:05 GMT):
since it's generated by the peer

yacovm (Thu, 16 Nov 2017 09:47:26 GMT):
send it to me in a private message though just in case

daanporon (Thu, 16 Nov 2017 09:50:16 GMT):
i've send them to you through private message

daanporon (Thu, 16 Nov 2017 09:50:33 GMT):
we are available within an hour to do a hangout call if needed

Jonny (Thu, 16 Nov 2017 10:29:58 GMT):
hi guys, how can get record based on TxnId?

yogesh.fulsunge (Thu, 16 Nov 2017 13:18:03 GMT):
Has joined the channel.

yogesh.fulsunge (Thu, 16 Nov 2017 13:18:09 GMT):
when i start hyperledger fabric and deploy network i see docker container size keeps on growing and disk becomes 100% full. how to stop this problem ??

yacovm (Thu, 16 Nov 2017 13:21:01 GMT):
@yogesh.fulsunge do you have transactions that happen all the time?

yacovm (Thu, 16 Nov 2017 13:21:15 GMT):
make sure the logs are not in debug

yogesh.fulsunge (Thu, 16 Nov 2017 13:21:30 GMT):
i have just deployed a business network but i haven't done any transaction

yacovm (Thu, 16 Nov 2017 13:21:44 GMT):
do you have logs that keep piling up?

yogesh.fulsunge (Thu, 16 Nov 2017 13:22:30 GMT):
yes

albert.lacambra (Thu, 16 Nov 2017 13:23:53 GMT):
hi

albert.lacambra (Thu, 16 Nov 2017 13:24:06 GMT):
is java chaincode development bin active?

albert.lacambra (Thu, 16 Nov 2017 13:24:25 GMT):
being active?

albert.lacambra (Thu, 16 Nov 2017 13:24:31 GMT):
someone is taking care on it?

yogesh.fulsunge (Thu, 16 Nov 2017 13:28:13 GMT):
root@ubuntu:/var/lib/docker# du -sh * 4.1G aufs 20K builder 2.4M containers 6.9M image 76K network 20K plugins 4.0K swarm 4.0K tmp 4.0K trust 556K volumes

yacovm (Thu, 16 Nov 2017 13:28:30 GMT):
@albert.lacambra - @rickr probably knows

yogesh.fulsunge (Thu, 16 Nov 2017 13:28:31 GMT):
you can see aufs size increasing

yacovm (Thu, 16 Nov 2017 13:36:42 GMT):
can you tell me please, if the logs are constantly appending?

janb87 (Thu, 16 Nov 2017 14:20:37 GMT):
@yacovm @Vadim We figured out the issue with the peer timing out when instantiating node.js chaincode. The url was somehow converted into lowercase "epeer1.vlaanderen.be" where the DNS in our docker network was case sensitive "EPeer1.vlaanderen.be". Probably in Go the casing was kept that is why it was working there and not in node.js.

yacovm (Thu, 16 Nov 2017 14:21:30 GMT):
is docker DNS case sensitive?

Vadim (Thu, 16 Nov 2017 14:23:40 GMT):
@yacovm I just tried, it does make a difference, i.e. `ping peer0` works, but `ping Peer0`does not

yacovm (Thu, 16 Nov 2017 14:23:56 GMT):
hmmm interesting

yogesh.fulsunge (Thu, 16 Nov 2017 14:32:06 GMT):
root@ubuntu:~/fabric-tools# composer network deploy -a /root/tutorial-network_working_new.bna -A admin -S secret -c admin@hlfv1 -f /tmp/PeerAdmin@hlfv1.card Deploying business network from archive: /root/tutorial-network_working_new.bna Business network definition: Identifier: tutorial-network@0.0.1 Description: Start from scratch with a blank business network ✔ Deploying business network definition. This may take a minute... Successfully created business network card to /tmp/PeerAdmin@hlfv1.card Command succeeded

yogesh.fulsunge (Thu, 16 Nov 2017 14:32:28 GMT):
Able to deploy a business network but unable to start REST server any idea???

yogesh.fulsunge (Thu, 16 Nov 2017 14:32:52 GMT):
composer-rest-server -c admin@hlfv1 -n never -p 8082 -a false -m false Discovering types from business network definition ... Connection fails: Error: Error trying to ping. Error: Error trying to query business network. Error: Missing "chaincodeId" parameter in the proposal request It will be retried for the next request. Exception: Error: Error trying to ping. Error: Error trying to query business network. Error: Missing "chaincodeId" parameter in the proposal request Error: Error trying to ping. Error: Error trying to query business network. Error: Missing "chaincodeId" parameter in the proposal request at _checkRuntimeVersions.then.catch (/usr/local/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:679:34)

yogesh.fulsunge (Thu, 16 Nov 2017 15:08:52 GMT):
can anyone help me in this ????????

Vadim (Thu, 16 Nov 2017 15:09:13 GMT):
@yogesh.fulsunge ask on #composer

rickr (Thu, 16 Nov 2017 16:06:49 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=CGNd2MN4B2rNmxqm7) @albert.lacambra Not really involved in Java CC. Best to ask on #fabric-java-chaincode

albert.lacambra (Thu, 16 Nov 2017 16:07:24 GMT):
thnak you. I have already spoken with them

creativemonk (Thu, 16 Nov 2017 18:10:17 GMT):
Has joined the channel.

ashablyg (Thu, 16 Nov 2017 19:50:38 GMT):
Hey guys, hope this is the right place to ask this question:

ashablyg (Thu, 16 Nov 2017 19:51:22 GMT):
I'm trying to instantiate some chaincode but I get the following error : Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode marbles:1.0(networkid:dev,peerid:peer0.*****.*****.com,tx:abc1c70c7c1bdc715743a175fc54cebe2d6055d51f18cca76fed3df914c3afc8)

ashablyg (Thu, 16 Nov 2017 19:53:55 GMT):
Here's a log from the peer '2017-11-16 19:13:19.129 UTC [container] lockContainer -> DEBU 66c waiting for container(dev-peer0.*****.*****.com-marbles-1.0) lock 2017-11-16 19:13:19.129 UTC [container] lockContainer -> DEBU 66d got container (dev-peer0.*****.*****.com-marbles-1.0) lock 2017-11-16 19:13:19.129 UTC [dockercontroller] Start -> DEBU 66e Cleanup container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.130 UTC [dockercontroller] stopInternal -> DEBU 66f Stop container dev-peer0.*****.*****.com-marbles-1.0(No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.131 UTC [dockercontroller] stopInternal -> DEBU 670 Kill container dev-peer0.*****.*****.com-marbles-1.0 (No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.132 UTC [dockercontroller] stopInternal -> DEBU 671 Remove container dev-peer0.*****.*****.com-marbles-1.0 (No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.132 UTC [dockercontroller] Start -> DEBU 672 Start container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.132 UTC [dockercontroller] createContainer -> DEBU 673 Create container: dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.245 UTC [dockercontroller] createContainer -> DEBU 674 Created container: dev-peer0.*****.*****.com-marbles-1.0-35fd2dd0a1e9519f7579bcd4a21886d73e2efb7000923e2bbd2dcc88d9eb9e6f 2017-11-16 19:13:19.836 UTC [dockercontroller] Start -> DEBU 675 Started container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.836 UTC [container] unlockContainer -> DEBU 676 container lock deleted(dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:18:19.131 UTC [chaincode] launchAndWaitForRegister -> DEBU 677 stopping due to error while launching: timeout expired while starting chaincode marbles:1.0(networkid:dev,peerid:peer0.*****.*****.com,tx:abc1c70c7c1bdc715743a175fc54cebe2d6055d51f18cca76fed3df914c3afc8) github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).launchAndWaitForRegister /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:579 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Launch /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:741 github.com/hyperledger/fabric/core/chaincode.Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/exectransaction.go:45 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:152 github.com/hyperledger/fabric/core/endorser.(*Endorser).simulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:262 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:477 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112 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:781 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:981 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:551 runtime.goexit '

ashablyg (Thu, 16 Nov 2017 19:55:07 GMT):
I know this is probably not enough info to diagnose the issue, but basically I think the chaincode container is not properly created when I call instantiate

albert.lacambra (Thu, 16 Nov 2017 20:01:08 GMT):
are you able to see the docker container for the chaincode?

ashablyg (Thu, 16 Nov 2017 20:02:26 GMT):
While i try to instantiate or just in general?

ashablyg (Thu, 16 Nov 2017 20:02:55 GMT):
Currently I have 3 peer containers, 1 orderer and 1 cli

albert.lacambra (Thu, 16 Nov 2017 20:03:29 GMT):
when you instantiate it

albert.lacambra (Thu, 16 Nov 2017 20:03:41 GMT):
you should install it and then instantiate

albert.lacambra (Thu, 16 Nov 2017 20:03:55 GMT):
on instantiation you should see new docker containers apearing

ashablyg (Thu, 16 Nov 2017 20:03:56 GMT):
So I got it to install

ashablyg (Thu, 16 Nov 2017 20:04:04 GMT):
ok let me check

albert.lacambra (Thu, 16 Nov 2017 20:04:42 GMT):
watch -n 1 --differences docker ps

ashablyg (Thu, 16 Nov 2017 20:06:16 GMT):
Ok so it did hang, but I did not see any new containers

ashablyg (Thu, 16 Nov 2017 20:06:29 GMT):
hang as in it's going to timeout again

albert.lacambra (Thu, 16 Nov 2017 20:08:37 GMT):
no contaner at all?

albert.lacambra (Thu, 16 Nov 2017 20:08:40 GMT):
at any moment?

albert.lacambra (Thu, 16 Nov 2017 20:09:26 GMT):
then check that the docker socket is correctly set on the peer. I think it was a property on the docker compose

janb87 (Thu, 16 Nov 2017 20:15:12 GMT):
@jimthematrix I have reported an issue related to node.js chaincode (https://jira.hyperledger.org/browse/FAB-7001). I've updated the ticket information as we figured out the actual cause of the issue. We worked around the issue for now by lowercasing all our urls. I've also added some info on which code is causing the issue.

ashablyg (Thu, 16 Nov 2017 20:16:13 GMT):
@albert.lacambra Everything seems to be in order. Maybe it's a miss match with CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_blockchaindme? Under Networks i have it as 'blockchaindme' but ${COMPOSE_PROJECT_NAME} env is set to 'net'

ashablyg (Thu, 16 Nov 2017 20:22:50 GMT):
However, looking through the logs on one of the peers i did find this:

ashablyg (Thu, 16 Nov 2017 20:23:02 GMT):
'''2017-11-16 19:13:19.129 UTC [chaincode] launch -> DEBU 669 start container: marbles:1.0(networkid:dev,peerid:peer0.*****.*****.com) 2017-11-16 19:13:19.129 UTC [chaincode] launch -> DEBU 66a start container with args: chaincode -peer.address=peer0.*****.*****.com:7052 2017-11-16 19:13:19.129 UTC [chaincode] launch -> DEBU 66b start container with env: CORE_CHAINCODE_ID_NAME=marbles:1.0 CORE_PEER_TLS_ENABLED=true CORE_TLS_CLIENT_KEY_PATH=/etc/hyperledger/fabric/client.key CORE_TLS_CLIENT_CERT_PATH=/etc/hyperledger/fabric/client.crt CORE_CHAINCODE_LOGGING_LEVEL=info CORE_CHAINCODE_LOGGING_SHIM=warning CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} 2017-11-16 19:13:19.129 UTC [container] lockContainer -> DEBU 66c waiting for container(dev-peer0.*****.*****.com-marbles-1.0) lock 2017-11-16 19:13:19.129 UTC [container] lockContainer -> DEBU 66d got container (dev-peer0.*****.*****.com-marbles-1.0) lock 2017-11-16 19:13:19.129 UTC [dockercontroller] Start -> DEBU 66e Cleanup container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.130 UTC [dockercontroller] stopInternal -> DEBU 66f Stop container dev-peer0.*****.*****.com-marbles-1.0(No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.131 UTC [dockercontroller] stopInternal -> DEBU 670 Kill container dev-peer0.*****.*****.com-marbles-1.0 (No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.132 UTC [dockercontroller] stopInternal -> DEBU 671 Remove container dev-peer0.*****.*****.com-marbles-1.0 (No such container: dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:13:19.132 UTC [dockercontroller] Start -> DEBU 672 Start container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.132 UTC [dockercontroller] createContainer -> DEBU 673 Create container: dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.245 UTC [dockercontroller] createContainer -> DEBU 674 Created container: dev-peer0.*****.*****.com-marbles-1.0-35fd2dd0a1e9519f7579bcd4a21886d73e2efb7000923e2bbd2dcc88d9eb9e6f 2017-11-16 19:13:19.836 UTC [dockercontroller] Start -> DEBU 675 Started container dev-peer0.*****.*****.com-marbles-1.0 2017-11-16 19:13:19.836 UTC [container] unlockContainer -> DEBU 676 container lock deleted(dev-peer0.*****.*****.com-marbles-1.0) 2017-11-16 19:18:19.131 UTC [chaincode] launchAndWaitForRegister -> DEBU 677 stopping due to error while launching: timeout expired while starting chaincode marbles:1.0(networkid:dev,peerid:peer0.*****.*****.com,tx:abc1c70c7c1bdc715743a175fc54cebe2d6055d51f18cca76fed3df914c3afc8) '''

janb87 (Thu, 16 Nov 2017 20:25:29 GMT):
@ashablyg do you happen to have capital case letters in your peer address?

janb87 (Thu, 16 Nov 2017 20:25:44 GMT):
we had a simular issue today, see https://jira.hyperledger.org/browse/FAB-7001

ashablyg (Thu, 16 Nov 2017 20:27:15 GMT):
Yeah I saw that earlier today. Unfortunately peer address is all lowercase

ashablyg (Thu, 16 Nov 2017 20:31:27 GMT):
Here's how I try to instantiate the chaincode after I get OK on install:

ashablyg (Thu, 16 Nov 2017 20:31:27 GMT):
peer chaincode instantiate -o orderer.*****.com:7050 --tls --cafile $CA_CERT_FILE -C $CHANNEL_NAME -n marbles -v 1.0 -c '{"Args":["initMarble", "marble1", "13", "doe"]}' -P "OR ('P*****MSP.member', 'P****MSP.member')"

janb87 (Thu, 16 Nov 2017 20:43:18 GMT):
@ashablyg you should check the logs of the chaincode container, maybe it crashed for some reason. The peer just times out because it never got a response back.

janb87 (Thu, 16 Nov 2017 20:43:30 GMT):
docker ps -a

ashablyg (Thu, 16 Nov 2017 20:44:34 GMT):
Well here's the funny part - when i did 'watch -n 1 --differences docker ps' and tried to instantiate, I didn't see any new containers. But from the logs it appears that there's one

zhoujunshan (Fri, 17 Nov 2017 06:21:57 GMT):
Has joined the channel.

zhoujunshan (Fri, 17 Nov 2017 06:22:14 GMT):
Has left the channel.

albert.lacambra (Fri, 17 Nov 2017 07:34:47 GMT):
from the logs of the peer, I suppouse?

wininani (Fri, 17 Nov 2017 12:33:18 GMT):
Has joined the channel.

ashablyg (Fri, 17 Nov 2017 13:38:57 GMT):
@albert.lacambra correct

ashablyg (Fri, 17 Nov 2017 17:41:52 GMT):
So a bit of an update - I got the logs from the container that keeps crashing, looks like this:

ashablyg (Fri, 17 Nov 2017 17:41:54 GMT):
docker logs 17718956df25 2017-11-17 17:00:55.914 UTC [shim] userChaincodeStreamGetter -> ERRO 001 context deadline exceeded error trying to connect to local peer github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:109 github.com/hyperledger/fabric/core/chaincode/shim.Start /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:148 main.main /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/marbles_chaincode.go:105 runtime.main /opt/go/src/runtime/proc.go:185 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2337 Error starting Simple chaincode: error trying to connect to local peer: context deadline exceeded

joshhw (Fri, 17 Nov 2017 21:24:18 GMT):
Has joined the channel.

MohitYadav (Sat, 18 Nov 2017 11:39:41 GMT):
Has joined the channel.

tbltzk (Sat, 18 Nov 2017 13:37:33 GMT):
This code does not, what you would expect ``` APIstub.PutState("key", []byte("initial Value")) val, _ := APIstub.GetState("key") fmt.Println("value from ledger", string(val)) ``` The putState is not applied immediately, but only after the transaction!

tbltzk (Sat, 18 Nov 2017 13:39:26 GMT):

Clipboard - 18. November 2017 14:39

tbltzk (Sat, 18 Nov 2017 13:41:32 GMT):
So if I have multiple modifications on a ledger value, it is the responsibility of the chaincode, to keep track of this? This is a huge pitfall IMO!

tbltzk (Sat, 18 Nov 2017 13:42:25 GMT):
I cannot believe this is a feature. But also cannot believe this is an undetected bug!

tbltzk (Sat, 18 Nov 2017 13:42:41 GMT):
Any experiences on that

muralisr (Sat, 18 Nov 2017 14:09:56 GMT):
@tbltzk endorse-order-commit ... that is the flow. state changes are committed only after required participants have endorsed the changes, transactions have been ordererd into a block and the committer makes sure required endorsements are in each Transaction.

tbltzk (Sat, 18 Nov 2017 14:11:01 GMT):
ok, but *within a transaction* I want multiple modifications to the same value batched, right?

tbltzk (Sat, 18 Nov 2017 14:11:42 GMT):
just created an improvement issue in jira: https://jira.hyperledger.org/projects/FAB/issues/FAB-7029?filter=addedrecently

tbltzk (Sat, 18 Nov 2017 16:59:36 GMT):
I often see chaincode for transfer of ownership like here https://github.com/hyperledger/fabric-samples/blob/b99e1b8da2bc4d17f689c152078d96e8f6428a27/chaincode/fabcar/fabcar.go#L178-L194 How do I control that this code can only be called by the current owner?

vdods (Sun, 19 Nov 2017 14:48:54 GMT):
Has joined the channel.

vdods (Sun, 19 Nov 2017 14:51:53 GMT):
I'm encountering errors while building my chaincode docker image -- am I required to vendor github.com/hyperledger/fabric/protos/peer and github.com/hyperledger/fabric/core/chaincode/shim ? It seems like this stuff should be in the fabric-ccenv docker image, but I searched the image and didn't find it.

tbltzk (Sun, 19 Nov 2017 17:09:45 GMT):
did you check the $GOPATH in ccenv container. The chaincode on the host machine has to be mounted into the right location on the go path. This is also where the dependencies should be located. something like `$GOPATH/src/github.com/hyperledger/...`

vdods (Mon, 20 Nov 2017 01:36:06 GMT):
Yeah, in the ccenv container, GOPATH is set to /opt/gopath. I'm not sure how to check if the source is correctly mounted in a running ccenv container though.

allwelder (Mon, 20 Nov 2017 03:14:52 GMT):
Has joined the channel.

mvaibhavshah (Mon, 20 Nov 2017 04:33:44 GMT):
Has joined the channel.

mvaibhavshah (Mon, 20 Nov 2017 04:34:15 GMT):
Can anybody confirm that CONTAINER clause is working in query

mvaibhavshah (Mon, 20 Nov 2017 04:35:00 GMT):
I have an array and want to get the data from the array using CONTAINER clause but is it is not working

vdods (Mon, 20 Nov 2017 04:37:51 GMT):
Nevermind -- there was an error when I built the ccenv image, and for some reason, the payload to put into the image was empty.

isahilsharma (Mon, 20 Nov 2017 09:26:45 GMT):
I'm tring to consume the result of fabcar chaincode in a variable using Nodejs but it's giving error: const request = { chaincodeId: 'fabcar', fcn: 'queryAllCars', args: [''] }; var resultCar = channel.queryByChaincode(request).query_responses;

isahilsharma (Mon, 20 Nov 2017 09:27:05 GMT):
Is there any other way to fetch chaincode results in Nodejs

daanporon (Mon, 20 Nov 2017 15:00:40 GMT):
quick question ... can 2 chaincodes within the same channel access each others data or are they isolated and we use invokeChaincode?

daanporon (Mon, 20 Nov 2017 15:00:40 GMT):
@here quick question ... can 2 chaincodes within the same channel access each others data or are they isolated and we use invokeChaincode?

Vadim (Mon, 20 Nov 2017 15:01:39 GMT):
@daanporon don't use @ here, just ask your question and be patient

Vadim (Mon, 20 Nov 2017 15:03:49 GMT):
you are allowed to invoke functions in other cc, so if you want to get a data, write a chaincode function which will return that data

Vadim (Mon, 20 Nov 2017 15:04:14 GMT):
other than that, the chaincodes' data are isolated from each other

daanporon (Mon, 20 Nov 2017 15:05:48 GMT):
ok, sorry for the @ here ... and thanks for the answer

ashablyg (Mon, 20 Nov 2017 16:03:12 GMT):
Hey guys, have anyone seen this before "context deadline exceeded error trying to connect to local peer"?

ashablyg (Mon, 20 Nov 2017 16:03:40 GMT):
I'm still trying to instantiate but I get this on the chaincode container that crashes almost immediately

Amjadnz (Mon, 20 Nov 2017 20:27:21 GMT):
Hi does anyone face the below issue when instantiating a chaincode. ```failed to invoke chaincode name:"lscc" on transaction 75d83bb62cdfd7cec933cbe69e5bd33a35272d53919ebed45181bfbed3f06f30, error: Timeout expired while starting chaincode adxagmchanneltest:v0(networkid:dev,peerid:peer0.broker.ubn.ae,tx:75d83bb62cdfd7cec933cbe69e5bd33a35272d53919ebed45181bfbed3f06f30)```

Amjadnz (Mon, 20 Nov 2017 20:29:05 GMT):
Seems like the lscc (which is a lifecycle system chaincode) from the fabric itself in my case is not able to start up.

Amjadnz (Mon, 20 Nov 2017 20:29:34 GMT):
The above logs are from the peer logs directly.

Amjadnz (Mon, 20 Nov 2017 20:30:13 GMT):
Currently using docker mode deployments 1.0.3 is version of fabric images - and using NodeJS as my deployment and invoking platform.

Amjadnz (Mon, 20 Nov 2017 20:30:13 GMT):
Currently using docker mode deployments 1.0.3 is version of fabric images - and using NodeJS as my deployment and invoking platform for my chaincodes

Shachindra (Mon, 20 Nov 2017 22:38:18 GMT):
Has joined the channel.

muralisr (Mon, 20 Nov 2017 23:47:48 GMT):
@Amjadnz that;'s likely a red herring ... assuming you are instantiating a CC, I suspect the chaincode never came up

muralisr (Mon, 20 Nov 2017 23:49:11 GMT):
adding `CORE_VM_DOCKER_ATTACHSTDOUT=true` and `CORE_CHAINCODE_LOGGING_LEVEL=debug` to the peer service may turn up something

muralisr (Mon, 20 Nov 2017 23:49:11 GMT):
adding `CORE_VM_DOCKER_ATTACHSTDOUT=true` and `CORE_CHAINCODE_LOGGING_LEVEL=debug` to the peer service may turn up something more in the logs

muralisr (Tue, 21 Nov 2017 00:00:34 GMT):
Also I was just helping someone with a similar issue... could just be that you regen key/certs but are still using the old image. I'd try removing the CC image first for a quick try

marksta (Tue, 21 Nov 2017 09:03:05 GMT):
Has joined the channel.

stepf (Tue, 21 Nov 2017 09:51:59 GMT):
Has joined the channel.

stepf (Tue, 21 Nov 2017 09:53:42 GMT):
I'm trying to run the chaincode-docker-devmode example, but am having trouble starting the docker images. I'm getting the following error: ``` cli | 2017-11-21 09:49:47.841 UTC [grpc] Printf -> DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer on 127.0.0.11:53: no such host"; Reconnecting to {peer:7051 } cli | 2017-11-21 09:49:49.540 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer on 127.0.0.11:53: no such host"; Reconnecting to {peer:7051 } cli | Error: Error getting endorser client channel: error trying to connect to local peer: context deadline exceeded ``` Any ideas anyone? :-/

tbltzk (Tue, 21 Nov 2017 12:10:28 GMT):
your ip seems to have a typo. Should be 127.0.0.1 not 127.0.0.11. The port also looks weird. should be :7051

Vadim (Tue, 21 Nov 2017 12:22:45 GMT):
@stepf do you really have a peer named "peer" running in your network?

Vadim (Tue, 21 Nov 2017 12:23:36 GMT):
@tbltzk 127.0.0.11 is an address of the docker dns server, port 53 is a standard dns service port

daanporon (Tue, 21 Nov 2017 16:26:03 GMT):
when we invoke chaincode2 from chaincode1 ... will the creator in chaincode2 still be the same as the one from chaincode1? Or will the peer from chaincode1 be the creator?

MohammadObaid (Tue, 21 Nov 2017 17:51:21 GMT):
Hey when I run command to upgrade chaincode `peer chaincode upgrade -C firstchannel -n firstchaincode -v 2.0 -c '{"Args":["init","Obaid", "Software", "Ned/1186/13-14", "3.5" , "Ned "]}' -P "OR ('orga.member','orgb.member')"` from peer shell it return with an error ```Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode instantiation policy violated(Failed to authenticate policy)) ```

Amjadnz (Tue, 21 Nov 2017 18:36:29 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=CEamiiD68GfLTmYmq) @muralisr Thanks would try that now.

Amjadnz (Tue, 21 Nov 2017 18:37:56 GMT):
Just to add - This I am trying with NODEJS Commands. I'm trying with with direct CLI commands in the peer and check.

Amjadnz (Tue, 21 Nov 2017 18:37:56 GMT):
Just to add - This I am trying with NODEJS Commands. I would trying with with direct CLI commands in the peer and check.

Amjadnz (Tue, 21 Nov 2017 22:17:04 GMT):
@muralisr - I ran the command to follow the docker logs `docker logs peer0.auditor.ubn.ae -f`

Amjadnz (Tue, 21 Nov 2017 22:17:44 GMT):
and I'm seeing this error as part of installchaincode nodejs method ```017-11-21 22:15:29.315 UTC [dev-peer0.auditor.ubn.ae-adxagmchanneltest-v0] func2 -> INFO 02f 2017-11-21 22:15:29.307 UTC [shim] userChaincodeStreamGetter -> ERRO 002 Error trying to connect to local peer: x509: certificate is valid for peer0.adx.ubn.ae, peer0, not peer0.auditor.ubn.ae 2017-11-21 22:15:29.315 UTC [dev-peer0.auditor.ubn.ae-adxagmchanneltest-v0] func2 -> INFO 030 2017-11-21 22:15:29.307 UTC [example_cc0] Errorf -> ERRO 003 Error starting Simple chaincode: Error trying to connect to local peer: x509: certificate is valid for peer0.adx.ubn.ae, peer0, not peer0.auditor.ubn.ae ```

Amjadnz (Tue, 21 Nov 2017 22:18:20 GMT):
So obviously my error is to with TLS SSL cert

muralisr (Tue, 21 Nov 2017 22:18:39 GMT):
right

muralisr (Tue, 21 Nov 2017 22:18:39 GMT):
@Amjadnz right

muralisr (Tue, 21 Nov 2017 22:18:54 GMT):
which is why I suggested starting by removing the CC image

muralisr (Tue, 21 Nov 2017 22:20:05 GMT):
so one approach would be turn off SSL everywhere and just get everything working

muralisr (Tue, 21 Nov 2017 22:20:29 GMT):
(^^^ assuming the removing CC image did not help)

Amjadnz (Tue, 21 Nov 2017 22:23:18 GMT):
Removed all the lingering CC images. Still the same issue - would try disabling TLS on all the nodes and check again

Amjadnz (Tue, 21 Nov 2017 22:32:27 GMT):
`peer0.adx.ubn.ae | 2017-11-21 22:30:29.372 UTC [chaincode] HandleMessage -> ERRO 3f4 []Failed to trigger FSM event REGISTER: transition canceled with error: Duplicate chaincodeID error: name:"adxagmchanneltest:v0" `

Amjadnz (Tue, 21 Nov 2017 22:33:00 GMT):
Now disabling TLS tried again - the above message. Looks like I already have the name registered as chaincode ID.

muralisr (Tue, 21 Nov 2017 22:33:26 GMT):
right... not sure what's in your env, but at least you can fix everything else and get back to TLS

Amjadnz (Tue, 21 Nov 2017 22:33:36 GMT):
yep - agree

Amjadnz (Tue, 21 Nov 2017 22:33:48 GMT):
let me have some coffevee - and turn back again

muralisr (Tue, 21 Nov 2017 22:33:57 GMT):
sounds like a plan :-)

GiorgiBlockchain (Wed, 22 Nov 2017 01:14:33 GMT):
Hi guys! I'm running the docker containers on (Ubuntu) VM. After shutting down the server containers were exited. I started all peers, orderer and both fabric-ca. But can't start containers with installed chaincodes, they are exited instantly after I run the docker start command. Error message: ```2017-11-21 10:42:57.061 UTC [shim] func1 -> ERRO 00f Received error from server: rpc error: code = Internal desc = transport is closing, ending chaincode stream 2017-11-21 10:42:57.061 UTC [example_cc0] Errorf -> ERRO 010 Error starting Simple chaincode: rpc error: code = Internal desc = transport is closing 2017-11-22 00:54:46.191 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded 2017-11-22 00:54:46.191 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: Error trying to connect to local peer: context deadline exceeded 2017-11-22 00:56:13.223 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded 2017-11-22 00:56:13.223 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: Error trying to connect to local peer: context deadline exceeded 2017-11-22 00:58:25.584 UTC [shim] func1 -> ERRO 001 Received error from server: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode), ending chaincode stream 2017-11-22 00:58:25.584 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode) 2017-11-22 00:58:51.278 UTC [shim] func1 -> ERRO 001 Received error from server: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode), ending chaincode stream 2017-11-22 00:58:51.278 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode) 2017-11-22 01:04:18.883 UTC [shim] func1 -> ERRO 001 Received error from server: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode), ending chaincode stream 2017-11-22 01:04:18.883 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: rpc error: code = Unknown desc = Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"mycc:v0" (except in dev mode) ``` Do I need to remove those containers and install chaincode again? That case data will be lost I suppouse. What is the solution here? Thank you, cheers !

Vadim (Wed, 22 Nov 2017 07:57:59 GMT):
@GiorgiBlockchain the cc containers will be launched automatically if you try to query/invoke something

GiorgiBlockchain (Wed, 22 Nov 2017 09:12:56 GMT):
Indeed. They started automatically. Thanks @Vadim

trongtoanRaD (Wed, 22 Nov 2017 12:47:18 GMT):
Has joined the channel.

Raghuvamz (Wed, 22 Nov 2017 13:29:30 GMT):
Has joined the channel.

Raghuvamz (Wed, 22 Nov 2017 13:29:43 GMT):
hey there! I have a fundamental question. suppose there are two organisations and four peers(2 each) for both the organisations! Now I create 2 users for both the organisations, say user 1 and 2 belong to org1 and user 3 and 4 belong to org 2. Can i create a channel between users(1,3) and (2,4) and deploy specific chain codes or each of them? All i want to know is if a channel is at a peer level or user level. Thanks in Advance!

Vadim (Wed, 22 Nov 2017 13:35:54 GMT):
@Raghuvamz channel is at the peer level

yogesh.fulsunge (Thu, 23 Nov 2017 05:12:11 GMT):
Hello shall i user fabric or composer for development of block chain applications?

yogesh.fulsunge (Thu, 23 Nov 2017 08:03:45 GMT):
omposer creates a default channel and we can write smart contract between participants so whats the use of chaincode provided by fabric??? is it provides the same thing we can achieve by composer??

Vadim (Thu, 23 Nov 2017 08:12:16 GMT):
@yogesh.fulsunge yes, but composer models the financial world, while using fabric directly is more generic and universal

yogesh.fulsunge (Thu, 23 Nov 2017 08:22:26 GMT):
which ones to be used?? can composer create a private channel ??

yogesh.fulsunge (Thu, 23 Nov 2017 08:22:49 GMT):
the application which is developed in composer can also be done in fabric then which one to be used?

Vadim (Thu, 23 Nov 2017 08:23:19 GMT):
which best suits your needs

Vadim (Thu, 23 Nov 2017 08:23:40 GMT):
in composer, most likely, you will write less code

yogesh.fulsunge (Thu, 23 Nov 2017 08:23:58 GMT):
i am looking for some use cases which we can have permissioned relationships

Vadim (Thu, 23 Nov 2017 08:24:03 GMT):
also, on #composer channel you will most likely get more detailed answers

yogesh.fulsunge (Thu, 23 Nov 2017 08:24:53 GMT):
but whether composer provides all features which fabric provides like consessus, smart contract, permissioned relationships

Vadim (Thu, 23 Nov 2017 08:25:32 GMT):
composer is in a nutschell a specialized chaincode which runs on top of standard fabric

Vadim (Thu, 23 Nov 2017 08:25:54 GMT):
so yes, it implicitly provides all features

yogesh.fulsunge (Thu, 23 Nov 2017 08:27:11 GMT):
so it will be good if i use composer and implement the business use cases to be shown to customer and don't write chaincode in fabric

yogesh.fulsunge (Thu, 23 Nov 2017 08:27:12 GMT):
???

yogesh.fulsunge (Thu, 23 Nov 2017 08:28:24 GMT):
the concept of chaincode is there in fabric i guess it won't be required then ?

Vadim (Thu, 23 Nov 2017 08:32:42 GMT):
@yogesh.fulsunge if you use composer, you dont directly write chaincode. But the business logic you implement in composer will end up in some fabric chaincode which composer manages for you,

Vadim (Thu, 23 Nov 2017 08:32:42 GMT):
@yogesh.fulsunge if you use composer, you dont directly write chaincode. But the business logic you implement in composer will end up in some fabric chaincode which composer manages for you

Vadim (Thu, 23 Nov 2017 08:33:09 GMT):
so you still need to write some code, if that is what you were asking

yogesh.fulsunge (Thu, 23 Nov 2017 08:33:28 GMT):
yes i have written some sample application on composer

yogesh.fulsunge (Thu, 23 Nov 2017 08:33:47 GMT):
then i have gone through the fabric samples and tried to run some of fabric applications

yogesh.fulsunge (Thu, 23 Nov 2017 08:34:27 GMT):
i am confused which one to be used shall i write my use case in fabric or shall i use composer?

Vadim (Thu, 23 Nov 2017 08:35:04 GMT):
depends on your use case

Vadim (Thu, 23 Nov 2017 08:35:19 GMT):
there is no clear answer

yogesh.fulsunge (Thu, 23 Nov 2017 08:38:05 GMT):
the Real World use case can be written in composer ? which creates private channel between nodes and joins them to the channel then execute chaincode to acomplish business transactions ????

Vadim (Thu, 23 Nov 2017 08:39:50 GMT):
I think the network config you should do yourself, but you'd better verify that on #composer

yogesh.fulsunge (Thu, 23 Nov 2017 08:40:26 GMT):
okk

Amit04Patel (Thu, 23 Nov 2017 09:02:23 GMT):
Hi guys ,

Amit04Patel (Thu, 23 Nov 2017 09:09:18 GMT):
Hi guys, For hyperledger images version "x86_64-1.1.0-preview" while running nodejs code for "fabcar" its working fine but when I run the same code for my custom network with changed values I am getting the following error: Store path:/scratch/Hyperledger1.0/fabric-test-multihost/fabric-ccenv-1.2/nodejs/hfc-key-store Successfully loaded user1 from persistence error: [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 /scratch/Hyperledger1.0/fabric-test-multihost/fabric-ccenv-1.2/nodejs/node_modules/grpc/src/client.js:554:15 Query has completed, checking results error from query = { Error: Failed to deserialize creator identity, err the supplied identity is not valid: x509: certificate signed by unknown authority at /scratch/Hyperledger1.0/fabric-test-multihost/fabric-ccenv-1.2/nodejs/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } I have a doubt in what should be the value of affliation while registering the user using "registerUser.js"

Vadim (Thu, 23 Nov 2017 09:11:32 GMT):
@Amit04Patel how did you obtain the identity you use to query the network?

Amit04Patel (Thu, 23 Nov 2017 09:14:41 GMT):
@Vadim before running query.js i ran enrollAdmin.js and registerUser.js gave admin name as admin and pass as adminpw which is mentioned in docker-compose file and for registerUser,js i gave a random name of the user .

Vadim (Thu, 23 Nov 2017 09:15:17 GMT):
so you have a CA? And the network is provisioned with cryptogen?

Amit04Patel (Thu, 23 Nov 2017 09:15:30 GMT):
yes

Vadim (Thu, 23 Nov 2017 09:15:53 GMT):
did you provide correct root CA cert & key to the CA?

Amit04Patel (Thu, 23 Nov 2017 09:17:18 GMT):
if you meant in docker-compose file I am using the same logic to provide key location and values as done in basic-network

Amit04Patel (Thu, 23 Nov 2017 09:18:07 GMT):
but the key values in hfc-key-store are generated by running the js codes

Vadim (Thu, 23 Nov 2017 09:18:53 GMT):
the error message you have implies that the identity you obtain from the CA is not trusted by the network, which means that the CA uses the wrong certs to sign. Make sure these are the certs you obtain from cryptogen.

Vadim (Thu, 23 Nov 2017 09:19:58 GMT):
you have to compare the cert and key the CA uses with the cert from peerOrganizations/orgXXX/ca folder

Vadim (Thu, 23 Nov 2017 09:19:58 GMT):
you have to compare the cert and key the CA uses with the cert from peerOrganizations/orgXXX/ca folder

Amit04Patel (Thu, 23 Nov 2017 09:23:30 GMT):
what should be the value of affiliation in "registerUser.js" if I use any other value than "org1.department1" its not able to register

Vadim (Thu, 23 Nov 2017 09:24:31 GMT):
it's configured in fabric-ca-server.yaml

Amit04Patel (Thu, 23 Nov 2017 09:25:56 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=LpNQtnyHz5riJ7zME) @Vadim the certs location in docker-compose file are correct only did you mean i have to compare the values between hfc-key-store folder and peerOrganizations/orgXXX/ca folde

Vadim (Thu, 23 Nov 2017 09:26:25 GMT):
no, I meant to compare what CA is uses as its root cert/key

Amit04Patel (Thu, 23 Nov 2017 09:27:51 GMT):
where i can find this file "fabric-ca-server.yaml " is it in fabric samples folder

Vadim (Thu, 23 Nov 2017 09:32:43 GMT):
no, it's in the CA container, I'm not sure if that one is mounted to the host or not

Vadim (Thu, 23 Nov 2017 09:32:58 GMT):
you have to provide that yourself

Amit04Patel (Thu, 23 Nov 2017 09:36:31 GMT):
@Vadim thanks it worked there was some error in my compose file only one dot(.) was missing

Amit04Patel (Thu, 23 Nov 2017 09:41:05 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=TuCqTNAyQuQxBgBZL) @Vadim is there any way i can provide a custom value for affiliation in "registerUser.js"

LinfengLiang (Thu, 23 Nov 2017 09:54:18 GMT):
Has joined the channel.

MohitYadav2317 (Fri, 24 Nov 2017 07:09:26 GMT):
Has joined the channel.

kong-bo (Sat, 25 Nov 2017 06:49:16 GMT):
Has joined the channel.

Vthot4 (Sun, 26 Nov 2017 07:43:42 GMT):
Has joined the channel.

sasiedu (Sun, 26 Nov 2017 09:54:04 GMT):
Has joined the channel.

jimthematrix (Mon, 27 Nov 2017 14:34:39 GMT):
Has left the channel.

AngeloRuggiero (Mon, 27 Nov 2017 16:56:09 GMT):
Has joined the channel.

AngeloRuggiero (Mon, 27 Nov 2017 16:56:17 GMT):
Hello, I am doing the http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html. when I try to startup "Terminal 1". I get a problem with cli. Error: Error getting endorser client channel: error trying to connect to local peer: context deadline exceeded. After looking through the output i see this. "peer | panic: runtime error: invalid memory address or nil pointer dereference" - any ideas

theruss (Mon, 27 Nov 2017 17:32:20 GMT):
Has left the channel.

dherykw (Mon, 27 Nov 2017 20:46:17 GMT):
Has joined the channel.

SukanyaParashar (Mon, 27 Nov 2017 20:47:25 GMT):
Has joined the channel.

SukanyaParashar (Mon, 27 Nov 2017 20:54:58 GMT):
Hi, I am quite new to hyperledger and I am trying to understand the marbles demo application for creating assets. Though I am able to run it successfully now, But I want to learn about how to connect chaincode and swagger api. If anyone can suggest a good documentation on this, it will be of great help

muasif80 (Tue, 28 Nov 2017 03:16:43 GMT):
Has joined the channel.

yarnvith (Tue, 28 Nov 2017 08:29:33 GMT):
Has joined the channel.

HubertYoung (Tue, 28 Nov 2017 09:00:02 GMT):
How to get the public key of the invoker of chaincode?

xingstarx (Tue, 28 Nov 2017 09:01:51 GMT):
Has joined the channel.

jojialex2 (Tue, 28 Nov 2017 12:42:39 GMT):
Hi I am getting following error ... /opt/go/pkg/tool/linux_amd64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory Please help if any one know the solution

sk (Tue, 28 Nov 2017 18:44:48 GMT):
Has joined the channel.

johnz (Wed, 29 Nov 2017 02:13:44 GMT):
Has joined the channel.

egeek (Wed, 29 Nov 2017 11:15:29 GMT):
Has joined the channel.

albert.lacambra (Wed, 29 Nov 2017 11:29:10 GMT):
not enough memory? permisions?

Jonny (Wed, 29 Nov 2017 11:33:21 GMT):
hi guys. can someone confirm that if I'm generating random id at chaincode level, the value return will be difference for both proposal and endorsement. I assume that, allow chaincode to generate id is not a good practice if the design is to use the id as a part of response to client.

Vadim (Wed, 29 Nov 2017 11:33:56 GMT):
@Jonny if you generate something random in the cc, then all endorsements will differ

Jonny (Wed, 29 Nov 2017 11:34:44 GMT):
it will be difference for all node?

Vadim (Wed, 29 Nov 2017 11:35:23 GMT):
each node will generate its own random, so you will get different results accross node

Vadim (Wed, 29 Nov 2017 11:35:23 GMT):
each node will generate its own random, so you will get different results accross nodes

Jonny (Wed, 29 Nov 2017 11:36:20 GMT):
Oh, can I say that, allowing chaincode to generate a random id is a really bad design? am I correct?

Vadim (Wed, 29 Nov 2017 11:36:48 GMT):
aha

Jonny (Wed, 29 Nov 2017 11:37:24 GMT):
Ah, seems like I need to change to whole program then. Thank you for the confirmation @Vadim

Vadim (Wed, 29 Nov 2017 11:37:41 GMT):
you can use txid if you want something unique

Jonny (Wed, 29 Nov 2017 11:39:10 GMT):
I'm using uuid currently.

Vadim (Wed, 29 Nov 2017 11:41:27 GMT):
it it unique?

Vadim (Wed, 29 Nov 2017 11:41:27 GMT):
is it unique?

Jonny (Wed, 29 Nov 2017 11:41:55 GMT):
yes, but generated at chaincode level. as you said, it will be differ for each endorsements

Jonny (Wed, 29 Nov 2017 11:43:24 GMT):
Other than txid, is that any way I can use something that I can customize to ensure the value will be same across the network?

Vadim (Wed, 29 Nov 2017 11:44:02 GMT):
pass it from the application when you invoke

Jonny (Wed, 29 Nov 2017 11:44:32 GMT):
means, the value will be from client sdk for example

Jonny (Wed, 29 Nov 2017 11:44:34 GMT):
right?

Vadim (Wed, 29 Nov 2017 11:45:23 GMT):
yes

Jonny (Wed, 29 Nov 2017 11:48:41 GMT):
Any possibility to ask chaincode to generate the value during proposal and use the same for each endorsement?

Vadim (Wed, 29 Nov 2017 11:51:19 GMT):
each chaincode instance running on a peer is executed independently from other chaincodes, so you have to make sure they run deterministically. YOu can only achieve that by not generating anything random within a chaincode.

Jonny (Wed, 29 Nov 2017 11:56:13 GMT):
I think that's really a clear explanation. Appreciate it.

Jonny (Wed, 29 Nov 2017 12:04:18 GMT):
Sorry @Vadim, may I know when I query the record from each peer (including peer from other organization) how can the value of the generated id is same for the all peer (the only difference is value from the proposal

Vadim (Wed, 29 Nov 2017 12:08:37 GMT):
I don't understand

Vadim (Wed, 29 Nov 2017 12:08:52 GMT):
why do you need to generate id to query?

Jonny (Wed, 29 Nov 2017 12:09:59 GMT):
Sorry. the id was generated during invoke already. I just requery for confirmation how it looks like at the ledger

Jonny (Wed, 29 Nov 2017 12:09:59 GMT):
Sorry. the ide already generated during invoke already. I just requery for confirmation how it looks like at the ledger

Jonny (Wed, 29 Nov 2017 12:09:59 GMT):
Sorry. the id already generated during invoke already. I just requery for confirmation how it looks like at the ledger

rfrabasile (Wed, 29 Nov 2017 19:33:07 GMT):
Hi. When i generate a query like this: {"selector":{"ID":{"$in":["111"] } } } I get it transformed to this: {"selector":{"data.ID":{"$in":["data.111"] } } } , is there anyway to avoid the data on the $in??

C0rWin (Wed, 29 Nov 2017 21:42:37 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=vCzj3jhEjW78qk2t6) @rfrabasile I think you probably need to ask this question in #fabric-ledger or probably @dave.enyeart could provide you with a highlight on your question here.

dave.enyeart (Wed, 29 Nov 2017 21:53:26 GMT):
@rfrabasile Please open a bug in Fabric Jira. The data wrapper should get injected before the top level field name, but not within the $in. @chris.elder FYI.

chris.elder (Wed, 29 Nov 2017 21:53:26 GMT):
Has joined the channel.

chris.elder (Wed, 29 Nov 2017 22:20:37 GMT):
@rfrabasile What version are you using?

Russell-Columbia (Wed, 29 Nov 2017 23:00:27 GMT):
Has joined the channel.

rbraniste (Thu, 30 Nov 2017 01:57:33 GMT):
Has joined the channel.

aaron_z7 (Thu, 30 Nov 2017 05:39:05 GMT):
Has joined the channel.

baoyangc (Thu, 30 Nov 2017 06:35:29 GMT):
Has joined the channel.

brianto (Thu, 30 Nov 2017 07:19:23 GMT):
Has joined the channel.

lucasdf (Thu, 30 Nov 2017 15:28:29 GMT):
Has joined the channel.

rfrabasile (Thu, 30 Nov 2017 15:57:45 GMT):
@chris.elder 1.0.0

chris.elder (Thu, 30 Nov 2017 15:58:02 GMT):
thank you

blockcow (Thu, 30 Nov 2017 19:29:58 GMT):
Has joined the channel.

blockcow (Thu, 30 Nov 2017 19:30:09 GMT):
Hey team, question, did the Fabric ramp up script remove the -l option to choose node instead of golang? (./byfn.sh -m up -l node no longer works) I am getting ./byfn.sh: illegal option -- l

iamprem (Thu, 30 Nov 2017 21:54:05 GMT):
Has joined the channel.

mvaibhavshah (Fri, 01 Dec 2017 04:53:12 GMT):
Need urgent help please....how to get the history of all the transactions like create asset, update asset, delete asset, transactions related to update etc from different registries sequentially. Want to simulate same as we see "All transactions" in PlayGround. In historian APIs it is just giving the transactionid but not the attributes. All other explorer APIs provides the information respective to specific repositories..But I need all transactions (different APIs) in one call....

Vadim (Fri, 01 Dec 2017 06:17:52 GMT):
@mvaibhavshah `stub.GetHistoryForKey()` will give you all transactions (changes) for a certain key

Vadim (Fri, 01 Dec 2017 06:17:52 GMT):
@mvaibhavshah `stub.GetHistoryForKey(myKey)` will give you all transactions (changes) for a certain key

mvaibhavshah (Fri, 01 Dec 2017 07:49:28 GMT):
@Vadim : Thanks for your response. Can you please provide some example or documentation so that I can look into it.

Vadim (Fri, 01 Dec 2017 07:50:57 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L152-L164

mvaibhavshah (Fri, 01 Dec 2017 07:54:26 GMT):
@Vadim : Thanks a lot. Let me try this :)

anyone (Sun, 03 Dec 2017 18:58:23 GMT):
Hi guys, I have question when calling and testing my chaincode. As an Argument, I expected an "object" to be passed to my invoke Operation. How do I do this? The example application of hyperledger fabric just Shows how an Array is passed. I am thankful for any idea.

anyone (Sun, 03 Dec 2017 18:58:58 GMT):
my object consists of of several variables and also an array

yogesh.fulsunge (Mon, 04 Dec 2017 06:32:38 GMT):
Hello All i have generated REST APIS from my composer solution can anyone tell me how to call REST APIS from external applications ????

jmaheswaran (Mon, 04 Dec 2017 16:19:17 GMT):
Has joined the channel.

jmaheswaran (Mon, 04 Dec 2017 16:48:59 GMT):
Good question - I am also trying to figure it out

jmaheswaran (Mon, 04 Dec 2017 16:49:04 GMT):
@yogesh.fulsunge

yogesh.fulsunge (Tue, 05 Dec 2017 05:23:15 GMT):
using REST APIs how to execute transactions using user roles so that i can identify which user has performed what transaction? the REST APIS i have generated can execute the transaction but there is not user which is registered and enrolled i think by default it is using admin but i need to know which customers have performed what transactions

HubertYoung (Tue, 05 Dec 2017 06:27:27 GMT):
hi,guys.how to generate primary key in chaincode?here is my way below but i get the same value if invoking quickly

HubertYoung (Tue, 05 Dec 2017 06:27:39 GMT):
func getNextId(stub shim.ChaincodeStubInterface, args []string) (string, error) { if len(args) != 1 { return "", fmt.Errorf("arguments error. ") } currentValue, err := stub.GetState(args[0]) value,_ :=strconv.Atoi(string(currentValue)) nextId := strconv.Itoa(value + 1) stub.PutState(args[0], []byte(nextId)) return nextId,err }

snehalpansare (Tue, 05 Dec 2017 06:31:23 GMT):
Has joined the channel.

snehalpansare (Tue, 05 Dec 2017 06:32:44 GMT):
Hi ... I am wiritng a chaincode where it needs to read from a file which is part of chaincode ... a properties file ... but its not able to find that file

snehalpansare (Tue, 05 Dec 2017 06:33:21 GMT):
does chaincode package includes additional text files? if yes how can I access it from the chaincode?

Luxii (Tue, 05 Dec 2017 07:47:22 GMT):
Has left the channel.

sudhirg (Tue, 05 Dec 2017 07:52:04 GMT):
Has joined the channel.

Vadim (Tue, 05 Dec 2017 07:52:28 GMT):
@HubertYoung you can use txId as a key

Vadim (Tue, 05 Dec 2017 07:53:03 GMT):
@snehalpansare why don't you pass properties to the init function?

snehalpansare (Tue, 05 Dec 2017 07:54:34 GMT):
@Vadim I am reading properties file in Init function ...

sudhirg (Tue, 05 Dec 2017 07:54:36 GMT):
Hi All, i have 8 yr exp in ASP.Net. I am learning Blockchain. Can any one assist me which is good for me in Blockchain. I am pure developer. I need to go for Hyperledger or Ethereum?

Vadim (Tue, 05 Dec 2017 07:55:40 GMT):
@snehalpansare you should pass properties as an arg to the init, the sdks will filter out all files except *.go

Vadim (Tue, 05 Dec 2017 07:55:58 GMT):
@sudhirg depends on your use case

snehalpansare (Tue, 05 Dec 2017 07:56:38 GMT):
@Vadim you mean any file except .go wont be packaged in chaincode?

Vadim (Tue, 05 Dec 2017 07:56:51 GMT):
yes

sudhirg (Tue, 05 Dec 2017 07:58:31 GMT):
@snehalpansare plz suggest me

HubertYoung (Tue, 05 Dec 2017 08:39:45 GMT):
@Vadim Thanks.

HubertYoung (Tue, 05 Dec 2017 08:42:39 GMT):
i want to get cert from stub.getCreator() but get this error.

Jonny (Tue, 05 Dec 2017 08:42:42 GMT):
hi. can someone throw me some light. why I keep on getting `no such file or directory` during chaincode upgrade?

HubertYoung (Tue, 05 Dec 2017 08:43:00 GMT):

Clipboard - December 5, 2017 4:42 PM

Vadim (Tue, 05 Dec 2017 08:43:43 GMT):
@HubertYoung are you on 1.1-preview?

HubertYoung (Tue, 05 Dec 2017 08:43:51 GMT):

Clipboard - December 5, 2017 4:43 PM

HubertYoung (Tue, 05 Dec 2017 08:44:37 GMT):
yes

HubertYoung (Tue, 05 Dec 2017 08:44:37 GMT):
Ok,thanks.

Vadim (Tue, 05 Dec 2017 08:45:06 GMT):
use https://github.com/hyperledger/fabric/tree/master/core/chaincode/lib/cid

HubertYoung (Tue, 05 Dec 2017 09:08:58 GMT):
@Vadim sorry,i am on 1.0.4. just ca is 1.1-preview.

Vadim (Tue, 05 Dec 2017 09:10:23 GMT):
@HubertYoung then you need ``` creatorAsBytes, err := stub.GetCreator() if err != nil { return "", errors.New("Failed to get creator. Reason: " + err.Error()) } serializedID := mspprotos.SerializedIdentity{} err = proto.Unmarshal(creatorAsBytes, &serializedID) if err != nil { return "", errors.New("Failed to unmarshall creator. Reason: " + err.Error()) } block, _ := pem.Decode(serializedID.IdBytes) cert, error := cr.ParseCertificate(block.Bytes)

HubertYoung (Tue, 05 Dec 2017 09:12:21 GMT):
thanks,it helps a lot.:smiley:

HubertYoung (Tue, 05 Dec 2017 09:16:55 GMT):
i upgrade the docker image to the latest but find no 1.1-preview version of peer.

Vadim (Tue, 05 Dec 2017 09:23:14 GMT):
@HubertYoung e.g. https://hub.docker.com/r/hyperledger/fabric-peer/tags/

gut (Tue, 05 Dec 2017 09:56:40 GMT):
@Vadim User Identity attributes are not mocked at MockStub, right?

Vadim (Tue, 05 Dec 2017 09:57:26 GMT):
@gut they are the part of a certificate, so if you manage to pass a proper creator cert to mockstub, it will be correctly parsed

daanporon (Tue, 05 Dec 2017 15:23:34 GMT):
when one chaincode is invoking another chaincode is there a way to identify which chaincode invoked the other one?

daanporon (Tue, 05 Dec 2017 15:24:07 GMT):
something that can't be faked

daanporon (Tue, 05 Dec 2017 15:25:31 GMT):
or maybe get access to the original request ... if chaincode1 invokes chaincode2 ... check in chaincode2 which was the request invoked on chaincode1

daanporon (Wed, 06 Dec 2017 12:30:51 GMT):
anyone has an idea for this?

muasif80 (Wed, 06 Dec 2017 13:47:23 GMT):
Has left the channel.

muralisr (Wed, 06 Dec 2017 14:55:50 GMT):
@daanporon the original Proposal is always passed to the chaincodes

muralisr (Wed, 06 Dec 2017 14:57:30 GMT):
so in the special case of 1 chaincode calling aniother, you can get the calling chaincode ID from the Proposal's header with a bit protobuf unmarshalling

muralisr (Wed, 06 Dec 2017 14:57:30 GMT):
so in the special case of 2 CCs with 1 chaincode calling aniother, you can get the calling chaincode ID from the Proposal's header with a bit protobuf unmarshalling

daanporon (Wed, 06 Dec 2017 15:07:37 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=WhDjq4jEAeaRePSxz) @muralisr i'm not very familiar with that ... but if i look here: https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/handler.go#L721 ... isn't it overwritten?

daanporon (Wed, 06 Dec 2017 15:08:27 GMT):
it looks like it's creating a new payload and not keeping anything from the original

Vadim (Wed, 06 Dec 2017 15:12:24 GMT):
@daanporon perhaps peer will pass the original proposal to another chaincode

daanporon (Wed, 06 Dec 2017 15:13:33 GMT):
ok, that's also possible ... but any idea how i can access this from within chaincode?

Vadim (Wed, 06 Dec 2017 15:13:58 GMT):
stub.GetSignedProposal()

daanporon (Wed, 06 Dec 2017 15:17:06 GMT):
ok, i'm going to check what i find in there .. thanks :)

daanporon (Wed, 06 Dec 2017 16:20:49 GMT):
ok, but i'm still a bit lost ... i found the original chaincode inside the signedProposal.payload.input.buffer (just by converting the buffer to a utf8 string) ... but i'm not sure how to get it out of there :( the transientMap is something we can use to decode the payload? i'm not familiar with google protobuf

SomaNayak (Wed, 06 Dec 2017 18:03:14 GMT):
Has joined the channel.

jarias (Wed, 06 Dec 2017 20:43:17 GMT):
Has joined the channel.

daanporon (Wed, 06 Dec 2017 21:20:26 GMT):
``` const grpc = require('grpc'); const path = require('path'); const shim = require('fabric-shim'); const ChaincodeBase = require('./common/ChaincodeBase'); const _chaincodeProto = grpc.load({ root: path.join(__dirname, 'node_modules/fabric-shim/lib/protos'), file: 'peer/chaincode.proto' }).protos; const input = _chaincodeProto.ChaincodeInput.decode(stub.getSignedProposal().proposal.payload.input); input.args.map((entry) => { return entry.toBuffer().toString('utf8'); }).forEach((entry) => { console.info(`chain arg: ${entry}`); }); ``` we are using the following node.js chaincode and the argument printed contains the chaincodename and chaincodefunction from the initial proposal ... i don't know why because i just did the same as is done in de stub and i get a different result (i thought this would have given me the chaincodename and function of the current proposal) ... but anyhow i get the response i want ... the only thing is that there are special characters in front of it and after it and i don't know why :( any idea? and is this the way to do this? also is it safe to do this, can't this be faked somehow?

MohammadObaid (Thu, 07 Dec 2017 05:19:46 GMT):
Hi . As documented in official docs , chaincode run in separate isolated docker containers . why it is run in separate isolated container?Any advanatges ?

Megaco (Thu, 07 Dec 2017 16:58:13 GMT):
Has joined the channel.

Soundharya (Fri, 08 Dec 2017 05:26:36 GMT):
Has joined the channel.

DannyWong (Fri, 08 Dec 2017 08:08:37 GMT):
Hi, when I upgrade a chaincode, will the Init() method execute? I would like to leverage that method to do some data patching (e.g. I added a new field to the JSON document of many state values, and i want to add default values to that new field)

Vadim (Fri, 08 Dec 2017 08:09:02 GMT):
@DannyWong yes

DannyWong (Fri, 08 Dec 2017 08:09:09 GMT):
Good!

DannyWong (Fri, 08 Dec 2017 08:11:29 GMT):
Thank you

manojpramesh (Fri, 08 Dec 2017 10:03:52 GMT):
Has joined the channel.

mogamboizer (Fri, 08 Dec 2017 21:05:35 GMT):
Has joined the channel.

alvaradojl (Sat, 09 Dec 2017 13:00:49 GMT):
Has joined the channel.

nehirakdag (Sun, 10 Dec 2017 04:54:54 GMT):
Has joined the channel.

Chalex (Mon, 11 Dec 2017 08:08:48 GMT):
Has joined the channel.

Chalex (Mon, 11 Dec 2017 08:11:06 GMT):
Hi. Could anyone tell me how to set up a multi-channel block-chain network and the chaincode in one channel calls the chaincode in the other channel?

Chalex (Mon, 11 Dec 2017 08:11:32 GMT):
Or is there any document about this?

Vadim (Mon, 11 Dec 2017 08:25:52 GMT):
@Chalex to call cc from another cc, you can use stub.InvokeChaincode(), but note, that it only works for read queries if the chaincodes are on different channels, see https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L66-L80

Chalex (Mon, 11 Dec 2017 08:28:18 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=wgwpJShNJRPHamDMd) @Vadim Thank you. I know the interface to call chaincode from chaincode .I just wonder how to set up a blockchain network with different channels and in these channel how all the chaincode should be installed and instantiated to realize calling chaincode from chaincode.

Vadim (Mon, 11 Dec 2017 08:29:13 GMT):
@Chalex generate artifacts for the second channel, then the procedure is the same as for creating and joining the first channel

Chalex (Mon, 11 Dec 2017 08:30:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=wxKpv75ZBgBnw9pgm) @Vadim Thank you. I will try it. I just worried maybe there are some other requirements for a multi channel blockchain

Vadim (Mon, 11 Dec 2017 08:31:03 GMT):
not really

CodeReaper (Mon, 11 Dec 2017 15:05:47 GMT):
@Vadim Hey once I deploy the chaincode, Do I have the functionality of upgrading the code of the chaincode ?? Is that why we have version field for the chaincode???

Vadim (Mon, 11 Dec 2017 15:17:05 GMT):
@CodeReaper yes, install a new chaincode with the same name and different version and then do `peer chaincode upgrade`

david_dornseifer (Mon, 11 Dec 2017 17:16:03 GMT):
Has joined the channel.

jrosmith (Mon, 11 Dec 2017 19:47:13 GMT):
when using `GetQueryResult` we can pass complex strings that make use of couchDB's "use_index", right?

jrosmith (Mon, 11 Dec 2017 20:00:21 GMT):
for example i want a complex query string to look like: ```queryString := "{ \"selector\": { some_criteria }, \"field\": [\"field1\", \"field2\"], \"use_index\": \"myindex\" }" ```

jrosmith (Mon, 11 Dec 2017 20:00:21 GMT):
for example i want a complex query string to look like: ```queryString := "{ \"selector\": { some_criteria }, \"fields\": [\"field1\", \"field2\"], \"use_index\": \"myindex\" }" ```

jrosmith (Mon, 11 Dec 2017 20:51:46 GMT):
this is for an index i have manually created externally to the chaincode and verified

jrosmith (Mon, 11 Dec 2017 21:47:44 GMT):
nevermind, saw in marbles that this is possible

jrosmith (Mon, 11 Dec 2017 21:47:44 GMT):
nevermind, saw in marbles that this is possible, just was not passing the index properly

CodeReaper (Tue, 12 Dec 2017 07:38:57 GMT):
@Vadim What will be the signature policy for upgrading the chaincode?

Vadim (Tue, 12 Dec 2017 07:54:17 GMT):
@CodeReaper same as for instantiation policy which is by default any org admin

gut (Tue, 12 Dec 2017 09:19:09 GMT):
I think I have something misconfigured while compiling with Golang: `main` is the package name for the chaincode start point code in my application. Then, I have other packages inside that app (controller, model, etc.). That code is already running on the servers. But when I try to run my tests locally, the `go install` command run automatically by Goland after `go build` is leading me into `permission denied`. The trace is `go install tecnalia/lab: open bin/lab: permission denied` because go build has no output. If I run tests with `package lab` it works. If I run them with `package main` it fails.

gut (Tue, 12 Dec 2017 09:20:16 GMT):
Ah! `package main`'s directory is called lab, and it has several files and other packages inside

gut (Tue, 12 Dec 2017 09:21:11 GMT):
I think it has to do with this fact, because when compiling a simple-one-file chaincode, it works like a charm.

Vadim (Tue, 12 Dec 2017 09:28:32 GMT):
@gut I have many files in my chaincode, all of them with subpackages are located in the folder called "chaincode", the main file is called "project_name.go" and it's in "package main". All files are in $GOPATH. Works for me without problems.

Vadim (Tue, 12 Dec 2017 09:29:24 GMT):
perhaps for you the problem is that it tries to put the compiled file into $GOPATH/bin, but it's not writable by the user which executes "go build"

vijay5378 (Tue, 12 Dec 2017 10:31:06 GMT):
Has joined the channel.

gut (Tue, 12 Dec 2017 10:44:14 GMT):
Thanks @Vadim I'll check and will tell you

didianV5 (Tue, 12 Dec 2017 10:52:30 GMT):
Has joined the channel.

daanporon (Tue, 12 Dec 2017 10:58:27 GMT):
hi, we are invoking chaincode from another chaincode and sometimes we get an error: "error executing chaincode: failed to execute transaction: error sending: txid: 8D443...c085 exists" so it tries to invoke other chaincode and we direcly get an error back telling us the txid already exists, but we don't know where and why it's throwing this error

Vadim (Tue, 12 Dec 2017 10:59:09 GMT):
@daanporon chaincodes on different channels?

daanporon (Tue, 12 Dec 2017 10:59:16 GMT):
same channel

Vadim (Tue, 12 Dec 2017 10:59:45 GMT):
it should work

daanporon (Tue, 12 Dec 2017 11:00:30 GMT):
yes, most of the time it works ... but for some reason we sometimes get this

Vadim (Tue, 12 Dec 2017 11:00:42 GMT):
seems like something wrong in your client app

Vadim (Tue, 12 Dec 2017 11:01:12 GMT):
don't think it has anything to do with cc calling another cc

daanporon (Tue, 12 Dec 2017 11:01:24 GMT):
ok, i'll have a look at the client then

daanporon (Tue, 12 Dec 2017 11:01:39 GMT):
but then it's weird that it only happens when invoking the second cc

Vadim (Tue, 12 Dec 2017 11:02:01 GMT):
what you invoke the second cc from the app?

Vadim (Tue, 12 Dec 2017 11:02:01 GMT):
you invoke the second cc from the app?

daanporon (Tue, 12 Dec 2017 11:02:44 GMT):
i invoke cc1 and that one invokes cc2

daanporon (Tue, 12 Dec 2017 11:02:51 GMT):
cc1 is invoked from the app

daanporon (Tue, 12 Dec 2017 11:03:01 GMT):
and then with the second invoke we sometimes get the error

Vadim (Tue, 12 Dec 2017 11:03:51 GMT):
where does the second invoke come from?

daanporon (Tue, 12 Dec 2017 11:04:04 GMT):
from the first chaincode

daanporon (Tue, 12 Dec 2017 11:04:07 GMT):
cc1

Vadim (Tue, 12 Dec 2017 11:04:23 GMT):
why do you think it's caused by that?

daanporon (Tue, 12 Dec 2017 11:05:59 GMT):
because i can see that the error is thrown then

daanporon (Tue, 12 Dec 2017 11:06:36 GMT):
``` peer | 2017-12-12 10:59:17.377 UTC [chaincode] ExecuteChaincode -> ERRO 14d97 txid: e09047924a8ad0cafcf7dc71e374023c884e4726af209930c8cbbaca68f8ac63 exists peer | github.com/hyperledger/fabric/core/chaincode.(*Handler).createTxContext peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:171 peer | github.com/hyperledger/fabric/core/chaincode.(*Handler).sendExecuteMessage peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1430 peer | github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:814 peer | github.com/hyperledger/fabric/core/chaincode.Execute peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/exectransaction.go:58 peer | github.com/hyperledger/fabric/core/chaincode.ExecuteChaincode peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincodeexec.go:85 peer | github.com/hyperledger/fabric/core/chaincode.GetChaincodeDataFromLSCC peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincodeexec.go:61 peer | github.com/hyperledger/fabric/core/chaincode.(*Handler).enterBusyState.func1 peer | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1263 peer | runtime.goexit peer | /opt/go/src/runtime/asm_amd64.s:2337 peer | error sending peer | failed to execute transaction peer | error executing chaincode peer | 2017-12-12 10:59:17.377 UTC [chaincode] 2 -> ERRO 14d98 [e0904792]Failed to get chaincode data (error executing chaincode: failed to execute transaction: error sending: txid: e09047924a8ad0cafcf7dc71e374023c884e4726af209930c8cbbaca68f8ac63 exists) for invoked chaincode. Sending ERROR ```

daanporon (Tue, 12 Dec 2017 11:07:14 GMT):
so app invokes cc1, cc1 invokes cc2 ... retrieves an answer, cc1 invokes cc3 and then this error occurs

Vadim (Tue, 12 Dec 2017 11:07:31 GMT):
@daanporon but txid is generated by the client app

Vadim (Tue, 12 Dec 2017 11:08:04 GMT):
afaik when cc executes cc, the resulting rwset is just added to the current tx

daanporon (Tue, 12 Dec 2017 11:08:05 GMT):
and sometimes it just works ... so it seems like a timing issue

Vadim (Tue, 12 Dec 2017 11:08:38 GMT):
yes, perhaps in you client app? It somehow not synchonized and reuses the same txid for another transaction?

daanporon (Tue, 12 Dec 2017 11:09:39 GMT):
no because then when the app invokes cc1 it should throw the error already? or when cc1 invokes cc2? because all of these transactions are using the same txId (which was generated from the app) ... but it throws the error when cc1 invokes cc3

Vadim (Tue, 12 Dec 2017 11:10:08 GMT):
it's not different transactions, it's all the same

daanporon (Tue, 12 Dec 2017 11:10:44 GMT):
yep, but for some reason the error is thrown when cc1 invokes cc3 ... while preparing the message

daanporon (Tue, 12 Dec 2017 11:11:38 GMT):
in this function: https://github.com/hyperledger/fabric/blob/release/core/chaincode/handler.go#L184

mna2016 (Tue, 12 Dec 2017 11:12:17 GMT):
@Vadim Although composer framework now makes development much easier, can there be a need to still code chaincode/smart contracts using golang? Are there any things that can only be done using golang chaincode?

Vadim (Tue, 12 Dec 2017 11:12:41 GMT):
@mna2016 ask on #composer, I'm not using it

Vadim (Tue, 12 Dec 2017 11:13:57 GMT):
@daanporon you tried this on master? Maybe it's some bug.

daanporon (Tue, 12 Dec 2017 11:14:28 GMT):
i think deleteTxContext (inside Handler) isn't called yet from the previous chaincode that was invoked

daanporon (Tue, 12 Dec 2017 11:14:32 GMT):
so it is still locked

daanporon (Tue, 12 Dec 2017 11:14:38 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/chaincode_support.go#L719

daanporon (Tue, 12 Dec 2017 11:14:51 GMT):
no haven't tried on master yet ... we are on the preview version

Vadim (Tue, 12 Dec 2017 11:17:36 GMT):
@daanporon are you sure you are on preview? because the link you gave is for release branch

Vadim (Tue, 12 Dec 2017 11:17:45 GMT):
which is 1.0.5

daanporon (Tue, 12 Dec 2017 11:18:27 GMT):
we are running preview in our network ... but right now i'm trying to understand what is happening behind the scenes ... and this code is still more or less the same

Vadim (Tue, 12 Dec 2017 11:18:47 GMT):
not really

daanporon (Tue, 12 Dec 2017 11:23:12 GMT):
ok, but i can find the functions where the issues are happening so

daanporon (Tue, 12 Dec 2017 11:25:52 GMT):
but i'm going to check the 1.1.0-preview tag ... the line numbers match better there :)

daanporon (Tue, 12 Dec 2017 11:34:59 GMT):

error.log

Vadim (Tue, 12 Dec 2017 11:50:45 GMT):
@daanporon I think you should address some of the developers with that issue...

samdeir (Tue, 12 Dec 2017 12:56:17 GMT):
Hi! i'm calling a method on another chaincode on different channel, i'm facing this exception:

samdeir (Tue, 12 Dec 2017 12:56:17 GMT):
Hi! i'm calling a method on another chaincode on different channel, i'm facing this exception: Failed to get policy manager for channel

samdeir (Tue, 12 Dec 2017 12:57:33 GMT):
however when calling the method on the same channel i have no problem at all

samdeir (Tue, 12 Dec 2017 12:58:41 GMT):
any ideas?

Vadim (Tue, 12 Dec 2017 13:00:40 GMT):
@samdeir has the peer joined both channels?

samdeir (Tue, 12 Dec 2017 13:01:21 GMT):
so i got channel foo and bar

samdeir (Tue, 12 Dec 2017 13:01:31 GMT):
both installed the same chaincode

samdeir (Tue, 12 Dec 2017 13:01:45 GMT):
each channel has 2 peers

Vadim (Tue, 12 Dec 2017 13:02:20 GMT):
the peer needs to be a part of both channels if you do cross-channel invoke

samdeir (Tue, 12 Dec 2017 13:03:17 GMT):
even query?

Vadim (Tue, 12 Dec 2017 13:04:47 GMT):
yes, and only query is possible btw

samdeir (Tue, 12 Dec 2017 13:05:20 GMT):
thank @Vadim

daanporon (Tue, 12 Dec 2017 13:06:02 GMT):
@Vadim i'll create an issue on jira

jrosmith (Tue, 12 Dec 2017 14:51:28 GMT):
hey guys, running into a weird issue. i have an anonymous goroutine inside my chaincode that runs a complex query using `GetQueryResult()`, but it fails to get the iterator. The chaincode error log i have returns this: `[0d3e00a5]Channel exists`

jrosmith (Tue, 12 Dec 2017 14:51:28 GMT):
hey guys, running into a weird issue. i have an anonymous goroutine inside my chaincode that runs a complex query using `GetQueryResult()`, but it fails to get the iterator. The chaincode error log i have returns this: `[0d3e00a5]Channel exists` but when i check the peer logs, the only errors i see referencing that short txid are as follows: ```2017-12-12 14:47:32.303 UTC [eventhub_producer] Chat -> ERRO 907 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2017-12-12 14:47:32.303 UTC [eventhub_producer] deRegisterHandler -> DEBU 908 deregistering event type: BLOCK 2017-12-12 14:47:43.645 UTC [chaincode] Execute -> DEBU 909 Exit 2017-12-12 14:47:43.645 UTC [chaincode] ExecuteChaincode -> ERRO 90a Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) 2017-12-12 14:47:43.645 UTC [endorser] callChaincode -> DEBU 90b Exit 2017-12-12 14:47:43.645 UTC [endorser] simulateProposal -> ERRO 90c failed to invoke chaincode name:"treds" on transaction 0d3e00a5f2db9e77ac44df8371e63a3948be8501585e5caa643e03daa4aef52c, error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) ```

jrosmith (Tue, 12 Dec 2017 14:51:28 GMT):
hey guys, running into a weird issue. i have an anonymous goroutine inside my chaincode that runs a complex query using `GetQueryResult()`, but it fails to get the iterator. The chaincode error log i have returns this: `[0d3e00a5]Channel exists` but when i check the peer logs, the only errors i see referencing that short txid are as follows: ```2017-12-12 14:47:32.303 UTC [eventhub_producer] Chat -> ERRO 907 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2017-12-12 14:47:32.303 UTC [eventhub_producer] deRegisterHandler -> DEBU 908 deregistering event type: BLOCK 2017-12-12 14:47:43.645 UTC [chaincode] Execute -> DEBU 909 Exit 2017-12-12 14:47:43.645 UTC [chaincode] ExecuteChaincode -> ERRO 90a Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) 2017-12-12 14:47:43.645 UTC [endorser] callChaincode -> DEBU 90b Exit 2017-12-12 14:47:43.645 UTC [endorser] simulateProposal -> ERRO 90c failed to invoke chaincode name:"mycc" on transaction 0d3e00a5f2db9e77ac44df8371e63a3948be8501585e5caa643e03daa4aef52c, error: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) ```

jrosmith (Tue, 12 Dec 2017 15:02:39 GMT):
not really sure how to go about further debugging, is it referencing a grpc channel here?

jrosmith (Tue, 12 Dec 2017 19:15:02 GMT):
i've looked into this further, and the only place i'm seeing `channel exists` is in https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/handler.go the workflow for this transaction involves 6 calls to `GetState()`, up to 6 calls to `GetQueryResult`, and then 7 calls to `PutState()` all in the same invoke. is it possible that these are stepping on each other and thats why I'm getting `channel exists`?

Chalex (Wed, 13 Dec 2017 01:47:10 GMT):
Hi. Everyone, if I want to call chaincode2 from a chaincode1, then chaincode2 has to be installed locally with chaincode1. Right?

wanghhao (Wed, 13 Dec 2017 02:38:50 GMT):
Has joined the channel.

daanporon (Wed, 13 Dec 2017 09:48:15 GMT):
yup you can't specify a peer on which you wan't to invoke so ... it needs to be installed on the samepeer

Khaled.MH (Wed, 13 Dec 2017 14:32:35 GMT):
Has joined the channel.

nickgaski (Wed, 13 Dec 2017 18:53:40 GMT):
@here - has anyone successfully run chaincode-dev-mode on master ?

nickgaski (Wed, 13 Dec 2017 18:54:10 GMT):
I'm seeing the peer crap out as soon as I spin up the docker compose.

joshhw (Wed, 13 Dec 2017 18:54:25 GMT):
@nickgaski are you checking the logs of the containers?

joshhw (Wed, 13 Dec 2017 18:54:33 GMT):
@nickgaski its a good starting point

yacovm (Wed, 13 Dec 2017 18:54:37 GMT):
I don't think dev mode has containers

nickgaski (Wed, 13 Dec 2017 18:54:48 GMT):
sorry for the here

yacovm (Wed, 13 Dec 2017 18:54:52 GMT):
at least not for CC

nickgaski (Wed, 13 Dec 2017 18:54:55 GMT):
but we need to fix the doc or the compose file

joshhw (Wed, 13 Dec 2017 18:55:04 GMT):
something needs to be spinning up for the chaincode to work.

joshhw (Wed, 13 Dec 2017 18:55:14 GMT):
in my experinece the chaincode always runs in a container

nickgaski (Wed, 13 Dec 2017 18:55:51 GMT):
@yacovm - have you seen anything like this

nickgaski (Wed, 13 Dec 2017 18:55:55 GMT):
```panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb07129] goroutine 66 [running]: github.com/hyperledger/fabric/gossip/gossip.NewGossipService.func1(0xc42037aba0, 0x20, 0x20, 0xc420334400, 0x3bc, 0x400) /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:93 +0x79 github.com/hyperledger/fabric/gossip/identity.(*identityMapperImpl).delete(0xc42036c300, 0xc42037aba0, 0x20, 0x20, 0xc420334400, 0x3bc, 0x400) /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:213 +0xbb github.com/hyperledger/fabric/gossip/identity.(*identityMapperImpl).Put.func1() /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:134 +0x60 created by time.goFunc /opt/go/src/time/sleep.go:170 +0x44```

yacovm (Wed, 13 Dec 2017 18:56:43 GMT):
let me guess... your certificate has expired?

nickgaski (Wed, 13 Dec 2017 18:56:50 GMT):
haha

nickgaski (Wed, 13 Dec 2017 18:56:57 GMT):
so the baked crypto material that we're using

nickgaski (Wed, 13 Dec 2017 18:57:02 GMT):
needs to be regenerated

yacovm (Wed, 13 Dec 2017 18:57:07 GMT):
it's funny that I remember the stack trace of this code by heart

yacovm (Wed, 13 Dec 2017 18:57:07 GMT):
it's funny that I remember the stack trace of this "bug" by heart

yacovm (Wed, 13 Dec 2017 18:57:30 GMT):
I opened a JIRA to make the local MSP crash if the certificate expires

yacovm (Wed, 13 Dec 2017 18:57:38 GMT):
but the guy that took it needs to add UTs

yacovm (Wed, 13 Dec 2017 18:57:50 GMT):
and then you won't see this stack trace after it will be merged

nickgaski (Wed, 13 Dec 2017 18:58:06 GMT):
I thought these certs were good for like two years

yacovm (Wed, 13 Dec 2017 18:58:08 GMT):
@blw any ETA for your UTs? :)

blw (Wed, 13 Dec 2017 18:58:09 GMT):
Has joined the channel.

yacovm (Wed, 13 Dec 2017 18:58:48 GMT):
well maybe they were created 2 years ago, @nickgaski ?

nickgaski (Wed, 13 Dec 2017 18:59:03 GMT):
lemme parse one

nickgaski (Wed, 13 Dec 2017 19:00:28 GMT):
well I'll be damned

nickgaski (Wed, 13 Dec 2017 19:00:32 GMT):
```Validity Not Before: Nov 11 17:07:00 2016 GMT Not After : Nov 11 17:07:00 2017 GMT```

nickgaski (Wed, 13 Dec 2017 19:15:21 GMT):
so we need to use the sampleconfig/configtx.yaml and create a new orderer block and a new channel transaction artifact

nickgaski (Wed, 13 Dec 2017 19:15:57 GMT):
and then just park the msp folder in master into the chaincode-docker-devmode folder in fabric samples. Those certs seem to be good until 2027

nickgaski (Wed, 13 Dec 2017 19:16:08 GMT):
so we'll buy ourselves a few years until running into this again

blw (Wed, 13 Dec 2017 21:43:23 GMT):
@yacovm I think the UT's will be done sometime this weekend, then I'll send another code review :)

albert.lacambra (Thu, 14 Dec 2017 07:27:27 GMT):
Hi, someone knows how to restart c chaincode container ion java? When peers restart CC containers stop, and then it is not possible to reboot

albert.lacambra (Thu, 14 Dec 2017 07:27:35 GMT):
2017-12-14 07:25:11.819 UTC [chaincode] HandleMessage -> ERRO 13c0 []Failed to trigger FSM event REGISTER: transition canceled with error: peer will not accepting external chaincode connection name:"DemandChaincode:1" (except in dev mode)

Vadim (Thu, 14 Dec 2017 07:55:02 GMT):
@albert.lacambra after restart, peers should restart containers automatically when the first invoke/query comes

Vadim (Thu, 14 Dec 2017 07:55:08 GMT):
for you it's different?

albert.lacambra (Thu, 14 Dec 2017 08:06:45 GMT):
I will try it like that then

albert.lacambra (Thu, 14 Dec 2017 08:06:58 GMT):
I thought that should happens directly

Jonny (Thu, 14 Dec 2017 09:30:00 GMT):
Hi, anyone is using viper for managing config for chancode? How do you guys import the s file into it? I keep on getting `https://lists.hyperledger.org/pipermail/hyperledger-fabric/2017-June/001252.html`

albert.lacambra (Thu, 14 Dec 2017 10:22:21 GMT):
@Vadim worked perfectly

KangkanBora (Thu, 14 Dec 2017 11:47:06 GMT):
Has joined the channel.

Raghuvamz (Thu, 14 Dec 2017 12:42:55 GMT):
How do I create individual identity for each end user on hyperledger without an admin interference, should i create individual peer for each of them?

Vadim (Thu, 14 Dec 2017 12:46:28 GMT):
@Raghuvamz fabric is not a public network, so adding users must be somehow controlled. It's implemented by requiring admin to register users. In case you still want that the users register themselves, you can develop a backend API which will use admin user to register any request which comes in automatically without human interference.

Vadim (Thu, 14 Dec 2017 12:46:28 GMT):
@Raghuvamz fabric is not a public network, so adding users must be somehow controlled. It's implemented by requiring admin to register users. In case you still want that the users register themselves, you can develop a backend API which will use admin user to register any request which comes in automatically without human intervention.

Raghuvamz (Thu, 14 Dec 2017 12:48:42 GMT):
@Vadim : My doubt is if i have to form individual identity for say 100 users, should i create 100 peers? P.S - the users donot represent any organization and are self sufficient

Raghuvamz (Thu, 14 Dec 2017 12:48:58 GMT):
I am trying to visualize hyperledger for a b2c usecase

Vadim (Thu, 14 Dec 2017 12:49:38 GMT):
no, the users don't need peers, they only need a certificate to be able to invoke a chaincode

Raghuvamz (Thu, 14 Dec 2017 12:50:56 GMT):
say if they are all enrolled on one peer, then is there a way in which you can hide users 1 data from user2 and should be available say user 101 of peer 2

Raghuvamz (Thu, 14 Dec 2017 12:50:56 GMT):
say if they are all enrolled on one peer, then is there a way in which you can hide users 1 data from user2 and should be available with say user 101 of peer 2

Vadim (Thu, 14 Dec 2017 12:52:10 GMT):
fabric privacy admin is channel scoped, so everything within the channel is shared

Vadim (Thu, 14 Dec 2017 12:52:35 GMT):
for what you ask you can consider encryption or employing some other technology

Raghuvamz (Thu, 14 Dec 2017 12:53:23 GMT):
okay is there some place i can refer as to how to make this outside fabric?

Vadim (Thu, 14 Dec 2017 12:54:03 GMT):
I don't understand your question

Raghuvamz (Thu, 14 Dec 2017 12:54:37 GMT):
Is there some example i can follow to encrypt the data and share it with some other user

Vadim (Thu, 14 Dec 2017 12:56:04 GMT):
https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/enccc_example

vdods (Thu, 14 Dec 2017 21:56:04 GMT):
Is there any way to delete chaincode from a peer? Like say I have a bunch of chaincodes installed on a peer but they're no longer being used.

vdods (Thu, 14 Dec 2017 22:21:09 GMT):
Perhaps via this? (temp workaround for lack of stop and start) http://hyperledger-fabric.readthedocs.io/en/release/chaincode4noah.html#stop-and-start

Chalex (Fri, 15 Dec 2017 07:18:10 GMT):
Hi. I want to use the fabric-sdk-go in my chaincode. Is it possible?

Jonny (Fri, 15 Dec 2017 08:59:51 GMT):
Is that possible for chaincode to read yaml file?

Jonny (Fri, 15 Dec 2017 09:00:01 GMT):
for configuration

Vadim (Fri, 15 Dec 2017 09:00:31 GMT):
@Chalex what's the point to use sdk in chaincode?

Vadim (Fri, 15 Dec 2017 09:01:02 GMT):
@Jonny it's possible, but I'd set the config over init function, since it's more flexible

Chalex (Fri, 15 Dec 2017 09:01:24 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=rqoyaRHzBhRcSgsjR) @Vadim I want to invoke a chaincode installed on another peer.

Vadim (Fri, 15 Dec 2017 09:01:54 GMT):
you have `stub.InvokeChaincode()`

Chalex (Fri, 15 Dec 2017 09:02:35 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=y3mKwTwdZThNeXLtc) @Vadim I know this function. But with this function, you have to install the chaincode onto the same peer

Vadim (Fri, 15 Dec 2017 09:03:26 GMT):
@Chalex which identity are you going to use when calling another chaincode?

Chalex (Fri, 15 Dec 2017 09:03:40 GMT):
So i want to connect to another peer via the sdk and call the chaincode installed on another peer

Vadim (Fri, 15 Dec 2017 09:03:56 GMT):
for querying?

Chalex (Fri, 15 Dec 2017 09:04:07 GMT):
query and invoke

Vadim (Fri, 15 Dec 2017 09:04:37 GMT):
how is it going to work with multiple endorsers? I expect that the rwsets are not going to be the same

Vadim (Fri, 15 Dec 2017 09:05:03 GMT):
I also see problems with crypto material which is needed if you use sdk

Vadim (Fri, 15 Dec 2017 09:05:13 GMT):
how are you going to bring it onto chaincode?

Chalex (Fri, 15 Dec 2017 09:05:41 GMT):
I thought about multiple endorsers, but actually it's not very proper for my scenario

Vadim (Fri, 15 Dec 2017 09:06:01 GMT):
what if the peer gets compromised and starts to deliver wrong results?

Vadim (Fri, 15 Dec 2017 09:07:17 GMT):
anyway, you seem to be misusing the standard fabric flow which raises a lot of questions about security and feasibility of such solution

Chalex (Fri, 15 Dec 2017 09:07:45 GMT):
Ah, multiple endorsers can be applied. But currently, I want to invoke a chaincode installed on another peer

Chalex (Fri, 15 Dec 2017 09:07:59 GMT):
Yeah. I agree.

Chalex (Fri, 15 Dec 2017 09:08:27 GMT):
But i didn't come up with other solutions.

Vadim (Fri, 15 Dec 2017 09:09:39 GMT):
well think about that: the sdk sends a proposal to the chaincode, that one is using built-in sdk to call another chaincode, which means it gets a proposal from that chaincode. What are you going to do with proposal in the chaincode? Send it to the orderer? Send it back to the app? But maybe app should just call the other chaincode first?

Chalex (Fri, 15 Dec 2017 09:12:28 GMT):
Is it okay to make the proposal in the chaincode wait for the results from the chaincode calls via built-in sdk?

Chalex (Fri, 15 Dec 2017 09:13:54 GMT):
Sorry, I am not quite familiar with fabric-sdk. I don't know whether i express properly.

Vadim (Fri, 15 Dec 2017 09:15:05 GMT):
why not doing in in client sdk which is not in chaincode?

Chalex (Fri, 15 Dec 2017 09:18:28 GMT):
I will think about that solution. But currently I hope to implement the logic in a chaincode, just like the stub.InvokeChaincode(), but the callee chaincode is not installed on the same peer.

Vadim (Fri, 15 Dec 2017 09:19:15 GMT):
@Chalex which identity are you going to use to call another chaincode?

Chalex (Fri, 15 Dec 2017 09:20:08 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=iN2bsutmhc8QW9Yxr) @Vadim I will use a normal member of the Org that holds the peer?

Vadim (Fri, 15 Dec 2017 09:20:30 GMT):
chaincode does not have access to it

Vadim (Fri, 15 Dec 2017 09:21:16 GMT):
I see the motivation behind that the logic in the chaincode, but I think it creates more problems that it solves

Chalex (Fri, 15 Dec 2017 09:21:44 GMT):
I agree. It makes things more complicated.

Chalex (Fri, 15 Dec 2017 09:22:03 GMT):
Ah, maybe I should think about other solutions

Chalex (Fri, 15 Dec 2017 09:22:28 GMT):
Thank you.

Vadim (Fri, 15 Dec 2017 09:23:22 GMT):
glad to help

Chalex (Fri, 15 Dec 2017 09:23:40 GMT):
:grinning:

ynkumar143 (Fri, 15 Dec 2017 12:49:48 GMT):
Hi Team, Can you please provide me the maximum possible payload size for chaincode in hyperledger fabric 1.0

vdods (Fri, 15 Dec 2017 22:09:40 GMT):
Are there guidelines on how to name the namespace given while installing chaincode? It seems as though while chaincode is specified by name and version, the namespace it's installed into is not subject to the version number you specify, and therefore it's necessary to put the name and version into the namespace. E.g. if my company name is `acme` and my chaincode is called `anvil` and my chaincode version is `1.1`, then the namespace should be something like `acme/anvil-1.1`

vdods (Sat, 16 Dec 2017 00:35:35 GMT):
Also, how is the namespace for a chaincode used? E.g. are all installed chaincodes mounted within the chaincode env docker container, or some such?

didianV5 (Sat, 16 Dec 2017 08:52:05 GMT):
how to use CouchDB in Chaincode for Developers

b9lab-damien (Sat, 16 Dec 2017 22:44:44 GMT):
Has joined the channel.

rockandroll-4w (Sun, 17 Dec 2017 11:21:01 GMT):
view

rockandroll-4w (Sun, 17 Dec 2017 11:21:06 GMT):
view

Jonny (Mon, 18 Dec 2017 06:38:29 GMT):
May I know, how to properly design the chaincode to ensure that getting record based on range by date is easier.

kapilAtrey (Mon, 18 Dec 2017 07:29:07 GMT):
@didianV5 you'll have to modify the docker-compose-simple.yaml like i've done

kapilAtrey (Mon, 18 Dec 2017 07:29:08 GMT):

Clipboard - December 18, 2017 12:58 PM

kapilAtrey (Mon, 18 Dec 2017 07:29:51 GMT):
please do notice the peer CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984

kapilAtrey (Mon, 18 Dec 2017 07:30:20 GMT):
these two variables make the peer able to use the couchdb on the place of leveldb

kapilAtrey (Mon, 18 Dec 2017 07:30:40 GMT):
and dont forget to add

kapilAtrey (Mon, 18 Dec 2017 07:30:42 GMT):
couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

kapilAtrey (Mon, 18 Dec 2017 07:31:06 GMT):
this to your compose file this'll make the couchdb0 container]

kapilAtrey (Mon, 18 Dec 2017 09:46:56 GMT):
hi everyone if i can query from the couchdb with function *GetQueryResult* can i update the document with the same

wanghhao (Mon, 18 Dec 2017 10:06:38 GMT):
Has left the channel.

Vadim (Mon, 18 Dec 2017 10:08:58 GMT):
@kapilAtrey YOu want to update document using the function GetQueryResult?

kapilAtrey (Mon, 18 Dec 2017 10:11:52 GMT):
Yes if i can i tried by using the {"_rev" :the rev id,"color":"redddd"} and use the invoke as i was using cli but i didnt notice any update so i wanted to know if i can ??

Vadim (Mon, 18 Dec 2017 10:12:45 GMT):
you should use stub.PutState()

kapilAtrey (Mon, 18 Dec 2017 10:25:18 GMT):
ok got it ..... and one more question in the fauxton the document appears to be like this *"_id": "mycc\u0000marble1",* *"_rev": "1-2e93e86bfb9a847da94e0131bfaea13d",* *"value": {* * "rev": "1-2e93e86bfb9a847da94e0131bfaea13d"* *},* *"key": "mycc\u0000marble1"* so what i see here that we are only storing _id of the asset that's it ?? we are storing only _id and where are we storing rest of the fields like name color and owner of the marble if talking in respect to marbleschiancode

kapilAtrey (Mon, 18 Dec 2017 10:25:18 GMT):
ok got it ..... and one more question in the fauxton the document appears to be like this *"_id": "mycc\u0000marble1",* *"_rev": "1-2e93e86bfb9a847da94e0131bfaea13d",* *"value": {* * "rev": "1-2e93e86bfb9a847da94e0131bfaea13d"* *},* *"key": "mycc\u0000marble1"* so what i see here that we are only storing _id of the asset that's it ?? we are storing only _id and where are we storing rest of the fields like name color and owner of the marble if talking in respect to marbleschiancode

LeoKotschenreuther (Mon, 18 Dec 2017 18:34:57 GMT):
Has joined the channel.

LeoKotschenreuther (Mon, 18 Dec 2017 18:38:48 GMT):
Does anybody know how one could properly isolate the Chaincode Containers from the outside world? I ran a little test and I was able to resolve URLs and to call external HTTP endpoints from inside the Chaincode. As far as I understand this is a problem because it's no more deterministic if I can call external HTTP endpoints. Shouldn't the Chaincode just be able to communicate with it's Peer node and nothing else?

WalkerLiu (Tue, 19 Dec 2017 08:53:04 GMT):
Has joined the channel.

ranjan008 (Tue, 19 Dec 2017 09:36:40 GMT):
@Vadim I see that for using GetQueryResult method in comments it is told to not use or take precautions while updating so that will apply in the case when I am updating through query string or through stub.putState. If you can explain some cases?

Vadim (Tue, 19 Dec 2017 09:37:24 GMT):
well you should use it only for querying, don't use it when you invoke

ranjan008 (Tue, 19 Dec 2017 09:39:01 GMT):
What if in invoke I have to validate some data for which I have to query then what should I do ? what will be the best approach for these cases?

Vadim (Tue, 19 Dec 2017 09:44:36 GMT):
the comment says that it does not detect phantom reads, so in case the query result gets affected when you invoke, it won't be detected. Whether this is ok for you or not is up to you

ranjan008 (Tue, 19 Dec 2017 10:24:44 GMT):
If I am using this query in invoke what can be the negative consequences and if that will affect the consensus mechanism?

ArvsIndrarys (Tue, 19 Dec 2017 11:03:25 GMT):
Has joined the channel.

NeerajKumar (Tue, 19 Dec 2017 13:07:16 GMT):
Has joined the channel.

NeerajKumar (Tue, 19 Dec 2017 13:07:54 GMT):
hey , somebody plz help, i am unable to deploy java chaincode, error is log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.shim.ChaincodeBase). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "Thread-0" java.lang.NoSuchMethodError: io.grpc.netty.NettyChannelBuilder.build()Lio/grpc/internal/ManagedChannelImpl; at org.hyperledger.fabric.shim.ChaincodeBase.newPeerClientConnection(ChaincodeBase.java:170) at org.hyperledger.fabric.shim.ChaincodeBase.lambda$start$0(ChaincodeBase.java:94) at java.lang.Thread.run(Thread.java:748)

NeerajKumar (Tue, 19 Dec 2017 13:08:20 GMT):
not able to find anything on google

lmars (Wed, 20 Dec 2017 04:03:26 GMT):
Hello. Is it possible to get current channel name? Unfortunately, I couldn't find such function in shim interface :( I need this to invoke QSCC system chaincode.

ankitkamra (Wed, 20 Dec 2017 06:06:33 GMT):
Has joined the channel.

ynkumar143 (Wed, 20 Dec 2017 07:42:31 GMT):
Can someone give explanation of usage of below query.

ynkumar143 (Wed, 20 Dec 2017 07:43:27 GMT):
GetQueryResult performs a "rich" query against a state database. It is only supported for state databases that support rich query, e.g.CouchDB. The query string is in the native syntax of the underlying state database. An iterator is returned which can be used to iterate (next) over the query result set. The query is NOT re-executed during validation phase, phantom reads are not detected. That is, other committed transactions may have added, updated, or removed keys that impact the result set, and this would not be detected at validation/commit time. Applications susceptible to this should therefore not use GetQueryResult as part of transactions that update ledger, and should limit use to read-only chaincode operations. GetQueryResult(query string) (StateQueryIteratorInterface, error)

muralisr (Wed, 20 Dec 2017 13:12:43 GMT):
@ynkumar143 let me direct that to @dave.enyeart

dave.enyeart (Wed, 20 Dec 2017 13:15:39 GMT):
@ynkumar143 Example usage can be found here: https://github.com/hyperledger/fabric/blob/release/examples/chaincode/go/marbles02/marbles_chaincode.go#L456-L562

kapilAtrey (Thu, 21 Dec 2017 06:26:53 GMT):
hi everyone i was trying to use invokeChaincode function of shim and it need util package of shim and when i govendor fetch it , i was successful in making the build but when i am trying to instantiate the chaincode it is showing the following error Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/vendor/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:12:2: cannot find package "plugin" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/vendor/plugin (vendor tree) /opt/go/src/plugin (from $GOROOT) /chaincode/input/src/plugin (from $GOPATH) /opt/gopath/src/plugin

kapilAtrey (Thu, 21 Dec 2017 06:28:14 GMT):
I tried installing chaincode_example02 and it is working fine but there is some problem with util package or something else

Vadim (Thu, 21 Dec 2017 06:31:26 GMT):
@kapilAtrey which fabric version is this? which golang version do you have?

kapilAtrey (Thu, 21 Dec 2017 06:33:48 GMT):
fabric image version : x86_64-1.0.5 golang version : go version go1.6.2 linux/amd64

Vadim (Thu, 21 Dec 2017 06:35:07 GMT):
which util package have you fetched?

Vadim (Thu, 21 Dec 2017 06:35:17 GMT):
is it from master?

Vadim (Thu, 21 Dec 2017 06:35:46 GMT):
and I'm not sure why invokechaincode requires some additional package

kapilAtrey (Thu, 21 Dec 2017 06:35:58 GMT):
git fetch github.com/hyperledger/fabric/common/util i fetched it from here

kapilAtrey (Thu, 21 Dec 2017 06:36:15 GMT):
invoke chaincode expect 1 2d array of byts

Vadim (Thu, 21 Dec 2017 06:36:18 GMT):
ok, you took the package from master branch and that needs golang 1.9

Vadim (Thu, 21 Dec 2017 06:36:26 GMT):
I suggest you take it from the release branch

kapilAtrey (Thu, 21 Dec 2017 06:36:36 GMT):
and how to get it ?

Vadim (Thu, 21 Dec 2017 06:36:55 GMT):
manually copy it, go fetch afaik only fetches from master

kapilAtrey (Thu, 21 Dec 2017 06:37:17 GMT):
ok thank you sir i'll try it

kapilAtrey (Thu, 21 Dec 2017 06:37:19 GMT):
:-)

kapilAtrey (Thu, 21 Dec 2017 06:58:29 GMT):
@Vadim it didnt worked and i do have a doubt when i fetch util ,the folder containing util have 2 files utils.go and net.go and now in release branch it also have 2 files utils.go and utils_test.go and i've pasted both of files....... but it is not working and do i need to put net.go in this or not

Vadim (Thu, 21 Dec 2017 06:59:05 GMT):
you need the same util package as in 1.0.5 codebase

kapilAtrey (Thu, 21 Dec 2017 06:59:53 GMT):
I have the same but it is not working

Vadim (Thu, 21 Dec 2017 07:03:03 GMT):
@kapilAtrey so you vendored the whole fabric? "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/vendor/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:12:2: cannot find package "plugin" in any of:

Vadim (Thu, 21 Dec 2017 07:03:25 GMT):
you should remove chaincode/input/src/github.com/hyperledger/fabric from vendor

Vadim (Thu, 21 Dec 2017 07:04:02 GMT):
sorry, from marbles02/vendor/githup/hyperledger/fabric

Vadim (Thu, 21 Dec 2017 07:04:37 GMT):
and actually, I still don't understand why you need utils, the ccenv supposed to have hyperledger/fabric dependency

kapilAtrey (Thu, 21 Dec 2017 07:05:24 GMT):
i need utils for this *f := "transferMarblesBasedOnColor"* *queryArgs := util.ToChaincodeArgs(f, arg)*

kapilAtrey (Thu, 21 Dec 2017 07:06:01 GMT):
func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response {

kapilAtrey (Thu, 21 Dec 2017 07:06:08 GMT):
cause it need a 2d array of args

Vadim (Thu, 21 Dec 2017 07:06:17 GMT):
you have a mess in your vendor folder, I think

kapilAtrey (Thu, 21 Dec 2017 07:06:45 GMT):
may be

Vadim (Thu, 21 Dec 2017 07:07:18 GMT):
if you remove everything hyperledger/fabric-related, what error do you get?

Vadim (Thu, 21 Dec 2017 07:07:26 GMT):
from marbles/vendor

kapilAtrey (Thu, 21 Dec 2017 07:08:06 GMT):
nothing i made a build outside of cli environment it worked

Vadim (Thu, 21 Dec 2017 07:08:20 GMT):
well deploy it

garima (Thu, 21 Dec 2017 07:13:49 GMT):
hello im getting an error : which cryptogen tool not found ... where as it already exist in the folder, mentioned in the variable $path

RahulSonanis (Thu, 21 Dec 2017 07:15:14 GMT):
Has joined the channel.

kapilAtrey (Thu, 21 Dec 2017 07:22:18 GMT):
@Vadim I didnt get it , let me explain you the question one more maybe i was a little confused ------------ So i am able to make a build of the chaincode with go build on my machine it gives me no error i do have a chaincode executables all good till now............... next when i try to instantiate then it gives me that error that i mentioned ........... now you ask me to deploy the build i made from the go build on my local machine now i didnt get it how to deploy or use the build i made from go build on my machine in docke cli container ..............

kapilAtrey (Thu, 21 Dec 2017 07:23:00 GMT):
@garima can you please type in the command you entered where you get this error

Vadim (Thu, 21 Dec 2017 07:23:06 GMT):
I asked you to remove marbles/vendor/fabric and instantiate it

Vadim (Thu, 21 Dec 2017 07:23:16 GMT):
which error do you get?

kapilAtrey (Thu, 21 Dec 2017 07:26:50 GMT):
't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH)

kapilAtrey (Thu, 21 Dec 2017 07:26:55 GMT):
can't

kapilAtrey (Thu, 21 Dec 2017 07:26:55 GMT):
*can't

Vadim (Thu, 21 Dec 2017 07:29:33 GMT):
ok, now just copy $GOPATH/src/github.com/hyperledger/fabric/common/util to marbles/vendor/github.com/hyperledger/fabric/common/util manually, I also suppose you should have fabric 1.0.5 source code in your $GOPATH since you can build it

kapilAtrey (Thu, 21 Dec 2017 07:36:26 GMT):
the same error i was getting from the vendored util package

kapilAtrey (Thu, 21 Dec 2017 07:36:43 GMT):
rror: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/vendor/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:12:2: cannot find package "plugin" in any of: /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/vendor/plugin (vendor tree) /opt/go/src/plugin (from $GOROOT) /chaincode/input/src/plugin (from $GOPATH) /opt/gopath/src/plugin

Vadim (Thu, 21 Dec 2017 07:46:04 GMT):
why do you vendor github.com/hyperledger/fabric/bccsp/factory?

Vadim (Thu, 21 Dec 2017 07:47:10 GMT):
you are still mixing 1.0.5 and master packages, because pluginfactory.go is only on master

Vadim (Thu, 21 Dec 2017 08:00:43 GMT):
@kapilAtrey I also pulled ccenv-1.0.5 image, the package you util is present in the image in /opt/gopath/src/github.com/hyperledger/fabric/common/util...

Vadim (Thu, 21 Dec 2017 08:00:43 GMT):
@kapilAtrey I also pulled ccenv-1.0.5 image, the package util is present in the image in /opt/gopath/src/github.com/hyperledger/fabric/common/util...

Vadim (Thu, 21 Dec 2017 08:00:50 GMT):
which ccenv version do you have?

garima (Thu, 21 Dec 2017 08:01:07 GMT):
@kapilAtrey I was trying to generate my first network by using script ./byfn.sh -m generate but when im executing this command then it is giving me an error cryptogen file not found exiting . Although the files exist in the directories mentioned in $PATH but still no success further when i tried to run cryptogen file manually im getting the error "cannot execute binary file: Exec format error" - im using git-bash to run these command on windows 10

kapilAtrey (Thu, 21 Dec 2017 09:00:47 GMT):
Do you have cryptogen tool in your bin directory of fabric samples??

kapilAtrey (Thu, 21 Dec 2017 09:01:01 GMT):
@garima

garima (Thu, 21 Dec 2017 09:08:51 GMT):
yes i have

garima (Thu, 21 Dec 2017 09:10:37 GMT):

Untitled.png

garima (Thu, 21 Dec 2017 09:10:49 GMT):
@kapilAtrey please see the image

Vadim (Thu, 21 Dec 2017 09:25:04 GMT):
@garima have you followed this tutorial? http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#prerequisites

kapilAtrey (Thu, 21 Dec 2017 09:26:06 GMT):
@vadim version of ccenv is x86_64-1.0.5

kapilAtrey (Thu, 21 Dec 2017 09:27:56 GMT):
@vadim i'll delete my govendor folder and install *github.com/hyperledger/fabric/protos/peer* and util again and then try let me get out of this vendor mess :-D

Vadim (Thu, 21 Dec 2017 09:28:30 GMT):
@kapilAtrey as I said, the package is supposed to be in the image, so I don't know why it compalins

kapilAtrey (Thu, 21 Dec 2017 09:29:40 GMT):
so what is the solution what should i do now ?? :-(

Vadim (Thu, 21 Dec 2017 09:30:31 GMT):
what does `docker run -it hyperledger/fabric-ccenv:x86_64-1.0.5 ls /opt/gopath/src/github.com/hyperledger/fabric/common/util` show?

kapilAtrey (Thu, 21 Dec 2017 09:31:03 GMT):
utils.go utils_test.go

kapilAtrey (Thu, 21 Dec 2017 09:31:56 GMT):
@vadim it shows

Vadim (Thu, 21 Dec 2017 09:32:13 GMT):
yeah, I see

Vadim (Thu, 21 Dec 2017 09:32:35 GMT):
as you can see, it's there

kapilAtrey (Thu, 21 Dec 2017 09:33:39 GMT):
yeah i got it but why it is complaining then

Vadim (Thu, 21 Dec 2017 09:34:14 GMT):
can you remove this image and see if it complains about the missing image when you try to build?

Vadim (Thu, 21 Dec 2017 09:34:38 GMT):
to deploy*

markthedark (Thu, 21 Dec 2017 11:19:26 GMT):
Has joined the channel.

markthedark (Thu, 21 Dec 2017 11:21:34 GMT):
hello, i'm looking at the high-throughput example and wanna know regarding the composite keys.. if the comp. key is varName~op~value~txID, is there any way to query only by op or value and have a wildacard for varName, or do i have to specify a new composite key for that use?

markthedark (Thu, 21 Dec 2017 11:21:34 GMT):
hello, I'm looking at the high-throughput example and wanna know regarding the composite keys.. if the comp. key is varName~op~value~txID, is there any way to query only by op or value and have a wildcard for varName, or do i have to specify a new composite key for that use?

KangkanBora (Thu, 21 Dec 2017 12:01:12 GMT):
how to manage the updated chaincode instantiatation without editing the -v options via command line

hendry19901990 (Thu, 21 Dec 2017 22:48:58 GMT):
how to deploy dynamically a chaincode ?

ArnabChatterjee (Fri, 22 Dec 2017 00:26:39 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

ranjan008 (Fri, 22 Dec 2017 09:54:48 GMT):
https://chat.hyperledger.org/channel/chaincode-dev?msg=jkNnwWrxPcESMsg2B in this it is stated not to use rich queries when sending update transaction what if I am sending a fresh transaction which is inserting new keys but before inserting it is validating old values for which I am using rich query will that effect my transaction too?

xeonpitar (Mon, 25 Dec 2017 02:11:51 GMT):
Has joined the channel.

rohanagarwal (Mon, 25 Dec 2017 21:31:30 GMT):
Has joined the channel.

Jonny (Tue, 26 Dec 2017 11:39:07 GMT):
Is there any way to use rich query for GetHistoryForKey?

vijay5378 (Tue, 26 Dec 2017 13:44:19 GMT):
Hi, When I try to install my chaincode, I get the following error: 2017-12-26 13:42:08.738 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2017-12-26 13:42:08.738 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing chaincode: rpc error: code = Unimplemented desc = unknown service protos.Endorser Anyone encountered it before?

vijay5378 (Tue, 26 Dec 2017 13:44:27 GMT):
BTW I am not using docker

jrosmith (Tue, 26 Dec 2017 13:56:03 GMT):
hey all, i was under the impression `Init()` gets called whenever the chaincode container comes up. is this true, or is it only called for the chaincode instance on the peer that made the initialize call for the channel?

jrosmith (Tue, 26 Dec 2017 14:02:35 GMT):
https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode according to the docs my impression was correct, but i recently had an instance where multiple containers were coming up but `Init()` was not being called, has anyone run into this issue before?

jrosmith (Tue, 26 Dec 2017 15:04:57 GMT):
woops makes sense, i was populating package level variables in `Init()`, was not using it properly.

muralisr (Tue, 26 Dec 2017 15:10:01 GMT):
@jrosmith right, the "Init" is really "InitAtInstantiate" ... wish it had been named to reflect that.

muralisr (Tue, 26 Dec 2017 15:10:01 GMT):
@jrosmith right, the "Init" is really "InitAtInstantiateAndUpgrade" (of course, a more suitable name) ... wish it had been named to reflect that.

Raghuvamz (Tue, 26 Dec 2017 16:19:56 GMT):
Can i store large files within the couchDb implementation within fabric? I believe it would make the block fat and eventually bloat the network! However if i want to process the files offchain and reference a hash within the block, how do i do it? How is the data of the user secure in this case? If i were to encrypt the file and take a hash such that the file is not visible to anyone in the network.. How do i share the key in this scenario with some other participant within the network who wants to access this file. TIA

Roger (Wed, 27 Dec 2017 03:23:45 GMT):
Has joined the channel.

ranjan008 (Wed, 27 Dec 2017 06:58:03 GMT):
Is invokechaincode function inside chaincodestubinterface working fine?

ranjan008 (Wed, 27 Dec 2017 07:13:34 GMT):
@Vadim I have a chaincode installed on a peer and initialized for 2 different channels but when I am trying to call a chaincode method from one channel initailization to other I am always getting below logs 2017-12-27 06:56:43.321 UTC [shim] func1 -> DEBU dab [4a9cd619]Received message RESPONSE from shim 2017-12-27 06:56:43.321 UTC [shim] handleMessage -> DEBU dac [4a9cd619]Handling ChaincodeMessage of type: RESPONSE(state:ready) 2017-12-27 06:56:43.321 UTC [shim] sendChannel -> DEBU dad [4a9cd619]before send 2017-12-27 06:56:43.321 UTC [shim] handleInvokeChaincode -> DEBU daf [4a9cd619]Received RESPONSE. Successfully invoked chaincode 2017-12-27 06:56:43.321 UTC [shim] handleInvokeChaincode -> ERRO db0 [4a9cd619]Received UNDEFINED. Error from chaincode 2017-12-27 06:56:43.321 UTC [shim] sendChannel -> DEBU dae [4a9cd619]after send 2017-12-27 06:56:43.321 UTC [shim] afterResponse -> DEBU db1 [4a9cd619]Received RESPONSE, communicated (state:ready)

sb2407 (Wed, 27 Dec 2017 12:36:19 GMT):
Has joined the channel.

chaluvadiswamy (Wed, 27 Dec 2017 13:43:50 GMT):
Has joined the channel.

HuyenPK (Wed, 27 Dec 2017 22:35:30 GMT):
Has joined the channel.

vijay5378 (Thu, 28 Dec 2017 07:20:32 GMT):
I have created a chaicode and have tested it using chaincode-dev mode. How do I run the chaincode in production mode? I have started the peer as usual peer node start. The chaincode seems to have been installed and instantiated. Is there any other step that needs to be followed? If I need the chaincode to be installed on all the peers, how should I go about doing it?

vijay5378 (Thu, 28 Dec 2017 07:20:42 GMT):
thanks in advance and happy holidays!!

yacovm (Thu, 28 Dec 2017 13:27:19 GMT):
@vijay5378 just do `peer chaincode install`

Tfabric (Thu, 28 Dec 2017 14:06:02 GMT):
Has joined the channel.

Tfabric (Thu, 28 Dec 2017 14:06:21 GMT):
Hi I am trying to test my chaincode locally

Tfabric (Thu, 28 Dec 2017 14:09:02 GMT):
I am trying to test my chaincode locally but in the script file , path to chaincode must be defined , 'installChaincode cli.peer1.org1.samplenet.com' 'chaincode' '1.0' 'golang' 'path to the chaincode' . where should I start from /users or .

Tfabric (Thu, 28 Dec 2017 14:09:12 GMT):
current directory?

vijay5378 (Fri, 29 Dec 2017 14:23:19 GMT):
Thanks yacovm. I have a setup with two peer nodes on two different machines (I am not using docker/). I installed the chaincode on one node (peer.a.com) and also instantiated it in the same node. However the chaincode is not getting copied into the second node.Will the chaincode automatically be sync'ed to the second node? Or will the chaincode need to be installed and instantiated in the other node separately? Both the nodes belong to the same channel. [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=vPrnztHHZhBEFXsZr) @yacovm

yacovm (Fri, 29 Dec 2017 14:25:17 GMT):
You install in each peer

yacovm (Fri, 29 Dec 2017 14:25:21 GMT):
Instantiate once

vijay5378 (Fri, 29 Dec 2017 14:28:23 GMT):
So the copying of the chaincode is done out of band (In a real world scenario do you expect the chaincode to be sent over email/other means to all the nodes that participate in a channel?[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=7LuYvpjbh2KSAmQSh) @yacovm

yacovm (Fri, 29 Dec 2017 14:32:39 GMT):
I can't say i expect anything. I can only say how stuff work

yacovm (Fri, 29 Dec 2017 14:33:03 GMT):
Whethet yhat is good or bad is a matter of personal opinion

vijay5378 (Fri, 29 Dec 2017 14:34:42 GMT):
I wasn't judging. I was just asking how the chaincode sharing amongst the various peer nodes is expected. My apologies if it sounded wrong.[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=pHagy9L9zTCz528HC) @yacovm

vijay5378 (Fri, 29 Dec 2017 14:36:22 GMT):
@yacovm Thanks and wish you a very happy new year!

vijay5378 (Fri, 29 Dec 2017 14:36:22 GMT):
@yacovm Thanks and wish you a very happy new year!

yacovm (Fri, 29 Dec 2017 14:37:12 GMT):
Well yes you need to share it out of band

vijay5378 (Fri, 29 Dec 2017 14:39:21 GMT):
Thanks! and wishing you a very happy new year[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=9EfidCvLrpcb8Yhuo) @yacovm

yacovm (Fri, 29 Dec 2017 14:45:16 GMT):
Tnx

yacovm (Fri, 29 Dec 2017 14:54:59 GMT):
And no nees to applogize or anything, criticism is always welcome

Kaltrak (Fri, 29 Dec 2017 18:42:12 GMT):
Has joined the channel.

ChrisHart (Fri, 29 Dec 2017 23:32:22 GMT):
Has joined the channel.

Tfabric (Sat, 30 Dec 2017 00:54:55 GMT):
Hi, can anybody advise me for this error ' rror: Error getting chaincode code chaincode: path to chaincode does not exist: github.com/hyperledger/fabric/chaincodes/go/kv_chaincode_go_example01'

dexhunter (Sat, 30 Dec 2017 07:52:35 GMT):
Has joined the channel.

KangkanBora (Sat, 30 Dec 2017 09:04:00 GMT):
Hello All, I have a use case to query block (by number/by hash etc) and I am defining a chincode for that separately and using node sdk to interact with chaincode code which is written in golang . When I am importing the ledger package I am getting this error ``` Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/ledger: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/ledger: cannot find package "github.com/hyperledger/fabric/core/ledger" in any of: /opt/go/src/github.com/hyperledger/fabric/core/ledger (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/ledger (from $GOPATH) ``` , Can anybody help me out on this . Thanks in advance

elias_p (Sat, 30 Dec 2017 10:31:03 GMT):
Has joined the channel.

muralisr (Sun, 31 Dec 2017 16:45:07 GMT):
@KangkanBora you are using the ledger package from a chaincode ? thats not possible as the chaincode is running in a separate container and cannot (and indeed, should not) directly access ledger

muralisr (Sun, 31 Dec 2017 16:45:07 GMT):
@KangkanBora you are attempting to call ledger APIs from a chaincode ? thats not possible as the chaincode is running in a separate container and cannot (and indeed, should not) directly access ledger

muralisr (Sun, 31 Dec 2017 16:46:11 GMT):
there are ways to include external packages via vendoring but does not apply to your usecase

RatikeshMishra (Mon, 01 Jan 2018 09:10:20 GMT):
Has joined the channel.

ranjan008 (Tue, 02 Jan 2018 06:58:48 GMT):
@muralisr does a proposal request generates write as well as read set for a same key if for getting the key in place of GetState method I am using GetStateByRange query and trying to update the values.

Chalex (Tue, 02 Jan 2018 08:18:28 GMT):
Hi. Is it possible to access the key/value created by another chaincode? In my environment, it's impossible. From the official instruction, it should be possible. http://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html

jrosmith (Tue, 02 Jan 2018 14:43:15 GMT):
@Chalex if both chaincodes are running on the same channel then they can communicate: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L64

Chalex (Wed, 03 Jan 2018 07:20:55 GMT):
So [ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=K2mSEGPhCRsXzBaT8) @jrosmith So I have to access the key/value created by another chaincode via calling invokeChaincode instead of GetState directly?

jrosmith (Wed, 03 Jan 2018 17:42:02 GMT):
@Chalex thats how i understand it, because the other chaincode is the one that has access to those key/val pairs.

arner (Wed, 03 Jan 2018 18:12:56 GMT):
Hi, any node chaincode / shim developers here? I love being able to use javascript as chaincode. I was wondering if there already is a mockstub in the making like we have for golang for unit testing..

muralisr (Wed, 03 Jan 2018 20:15:32 GMT):
@arner if it isnt there, opportunity for contribution :-)

mvaibhavshah (Wed, 03 Jan 2018 20:40:34 GMT):
Has left the channel.

arner (Wed, 03 Jan 2018 21:25:16 GMT):
Hi @muralisr, finally a good opportunity. I'm better at this than that go stuff ;). What would be the procedure, create a JIRA ticket like here: http://hyperledger-fabric.readthedocs.io/en/release/CONTRIBUTING.html#making-feature-enhancement-proposals? Or should I discuss the basic design first with you or Jim? It's not in the main repo and I never contributed so I'm not really sure where to start.

muralisr (Wed, 03 Jan 2018 21:35:23 GMT):
@arner sure, I'd say open a proposal ... then we can all talk about the design in the JIRA and capture everything ... on the other hand you could just shortcircuit with a JIRA and a gerritt CR if we are going to use the golang implementation as a reference.

muralisr (Wed, 03 Jan 2018 21:35:37 GMT):
perhaps you have some idea of the approach already ?

arner (Wed, 03 Jan 2018 21:43:41 GMT):
I was thinking of porting the golang version indeed, I guess most parts can be the same. It would implement the interface of the real stub, plus a few extra functions like mockInvoke.

jfobrien29 (Wed, 03 Jan 2018 21:45:56 GMT):
Has joined the channel.

arner (Wed, 03 Jan 2018 22:13:24 GMT):
For the node we may also need to mock the shim (at least the success and error functions), because the real one requires a very specific environment (peer address in the process arguments, some grpc settings) that makes it hard to set up in a test.

arner (Wed, 03 Jan 2018 22:13:24 GMT):
For the node environment we may also need to mock the shim (at least the success and error functions), because the real one requires a very specific environment (peer address in the process arguments, some grpc settings) that makes it hard to set up in a test.

Chalex (Thu, 04 Jan 2018 02:08:23 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jgg5jw2SK7Gkb8gy6) @jrosmith But from the official instruction, it seems other chaincodes should have the access(not write) right http://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html

Chalex (Thu, 04 Jan 2018 03:48:22 GMT):
Hi. I couldn't figure out why GetState(key1) returns nothing while GetStateByRange("", "") returns the key1:value pair.

DarshanBc (Thu, 04 Jan 2018 06:09:28 GMT):
Hi I am trying to use v1.1 preview but I am not able to instantiate getting this 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 "opt/gopath/src/github.com/hyperledger/fabric/msp/idemixmsp.go:15:2: cannot find package "github.com/hyperledger/fabric/idemix" in any of: /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric/idemix (vendor tree) /opt/go/src/github.com/hyperledger/fabric/idemix (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/idemix (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/idemix ```

Varun2887 (Thu, 04 Jan 2018 06:17:08 GMT):
Has joined the channel.

Varun2887 (Thu, 04 Jan 2018 06:17:13 GMT):
hi all

Varun2887 (Thu, 04 Jan 2018 06:17:14 GMT):
is it feasible to query the data on couchdb based on data in it... and not based on key

Varun2887 (Thu, 04 Jan 2018 06:19:52 GMT):
if yes someone can please share an example

charyorde (Thu, 04 Jan 2018 06:27:52 GMT):
Has joined the channel.

Varun2887 (Thu, 04 Jan 2018 06:44:42 GMT):
also is it feasible to perform an invoke a transaction from `channel one` to `channel two`

gen_el (Thu, 04 Jan 2018 08:13:00 GMT):
Good Day. Has anyone compared the performance of Golang chaincode, composer runtime business network and node chaincode? We are really particular about this. Any insight would be much appreciated.

Varun2887 (Thu, 04 Jan 2018 08:36:46 GMT):
any help on using couchdb? i want to make query on data rather then `key` is there any available example fo r the same

markthedark (Thu, 04 Jan 2018 09:09:30 GMT):
@Varun2887 check out the marbles.go chaincode, there are a few examples

markthedark (Thu, 04 Jan 2018 09:10:27 GMT):
as: ```queryString := fmt.Sprintf("{\"selector\":{\"docType\":\"marble\",\"owner\":\"%s\"}}", owner) queryResults, err := getQueryResultForQueryString(stub, queryString)```

kapilAtrey (Thu, 04 Jan 2018 09:16:27 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=LGyDvGcpwFNsaigyt) @Varun2887 go through this

kapilAtrey (Thu, 04 Jan 2018 09:16:34 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/mockstub.go#L266

Chalex (Thu, 04 Jan 2018 09:21:55 GMT):
Hi. I use `peer chaincode invoke -n hospital1 -c '{"Args":["get","org1"]}' -C chainplaza` to query a state on the ledger. But from the logs (shown in the picture), it seems the key "org1" was not in the query args.

Chalex (Thu, 04 Jan 2018 09:22:07 GMT):

捕获3.PNG

Chalex (Thu, 04 Jan 2018 09:23:10 GMT):
the `key` arg is empty, so i failed to query the key/value pairs that I am sure I already wrote into the ledger.

Varun2887 (Thu, 04 Jan 2018 09:32:18 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=eehWaRinCYbEAjMkP) @markthedark thanks will try it

gut (Thu, 04 Jan 2018 10:28:00 GMT):
@Chalex A stupid question: If you test to query every key you have in your channel ledger, do you see "org1" as a key?

gut (Thu, 04 Jan 2018 10:35:28 GMT):
I have one question regarding cc caller ID: If I want to restrict who is able to get certain data, is there any standardized way to get the caller ID from a query? I've seen [this topic](https://jira.hyperledger.org/browse/FAB-3057), but nobody is working yet. I've figured out that using `GetCreator()` function and deserializang the PEM response will do the trick. Any advice?

markthedark (Thu, 04 Jan 2018 11:50:42 GMT):
is there a significant execution time difference querying the state using rich queries on couchDB versus the stub.getState method using indexes&compositeKeys?

sushantdusad (Thu, 04 Jan 2018 12:07:34 GMT):
Has joined the channel.

Vadim (Thu, 04 Jan 2018 13:35:17 GMT):
@gut https://github.com/hyperledger/fabric/tree/master/core/chaincode/lib/cid

arner (Thu, 04 Jan 2018 19:00:23 GMT):
@muralisr @jimthematrix I added a proposal on JIRA for adding the mockstub for nodejs chaincode. Let me know if I'm doing this right.

jimthematrix (Thu, 04 Jan 2018 19:00:23 GMT):
Has joined the channel.

Chalex (Fri, 05 Jan 2018 05:47:19 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8jJnJ6uvP5ZPX3PhE) @gut The picture is the output of GetState("org1"), not the output of GetStateByRange("", "")

gut (Fri, 05 Jan 2018 10:04:43 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=hQ4LT6St6mY2GEymk) @Vadim Do you know if its working with the latest version?

gut (Fri, 05 Jan 2018 10:09:32 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Sp43DxdTs4sHoASE9) @Chalex I mean if you can see the keys if you run a `GetStateByRange("", "")`. Because your log `getting state for chaincode hospital1, key , channel chainplaza` seems to have different info from `No state associated with key: org1.`

Chalex (Fri, 05 Jan 2018 10:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=rxg3hBH7z3fxyKbo8) @gut That's why I posted this question. Because in another case, when I use `GetState("abc")`, the log will be ` getting state for chaincode hospital1, key abc , channel chainplaza`. Why I passed the key `org1`, and the log showed the key as empty. And in another case, it worked well. What kind of setting errors could cause this problem.

zafartm (Sat, 06 Jan 2018 02:25:10 GMT):
Has joined the channel.

zafartm (Sat, 06 Jan 2018 02:27:40 GMT):
I am trying to install my first chaincode but getting this error. "unknown service protos.ChaincodeSupport". someone may help to resolve?

yacovm (Sat, 06 Jan 2018 08:31:53 GMT):
use port 7052

yacovm (Sat, 06 Jan 2018 08:31:58 GMT):
@zafartm

zafartm (Sun, 07 Jan 2018 19:45:39 GMT):
thanks for the tip. looks like it worked. I was following this http://hyperledger-fabric.readthedocs.io/en/release/chaincode4ade.html and it uses port 7051 even the docker-compose files do not map 7052 for external use. I am trying to follow fabric-samples https://github.com/hyperledger/fabric-samples

zafartm (Sun, 07 Jan 2018 19:45:39 GMT):
thanks for the tip. looks like it worked. I was following this http://hyperledger-fabric.readthedocs.io/en/release/chaincode4ade.html and it uses port 7051 even the docker-compose files do not map 7052 for external use. I am trying to follow fabric-samples https://github.com/hyperledger/fabric-samples @yacovm

muralisr (Sun, 07 Jan 2018 21:46:19 GMT):
@zafartm try http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html please

yacovm (Sun, 07 Jan 2018 22:33:51 GMT):
@zafartm it's 7051 in v1.0.x and 7052 in v1.1

CodeReaper (Mon, 08 Jan 2018 05:32:54 GMT):
Hey when I instantiate chaincode its image comes as dev----random string. the dev prefix makes me wonder if i'm instantiating it as devmode only. Can anyone explain?

CodeReaper (Mon, 08 Jan 2018 05:33:02 GMT):

Clipboard - January 8, 2018 11:02 AM

Vadim (Mon, 08 Jan 2018 08:01:14 GMT):
@CodeReaper no, it's not in dev mode

Vadim (Mon, 08 Jan 2018 08:01:58 GMT):
prefix you can change over CORE_PEER_NETWORKID

CodeReaper (Mon, 08 Jan 2018 08:04:35 GMT):
@Vadim Is the variable CORE_PEER_NETWORKID used elsewhere also? Anything I need to mind while changing it?

Vadim (Mon, 08 Jan 2018 08:04:52 GMT):
don't think so, I've just changed it

CodeReaper (Mon, 08 Jan 2018 08:05:00 GMT):
ok thanks

Subramanyam (Mon, 08 Jan 2018 11:06:24 GMT):
@vadim good evening could you please assist how to update and retrieve the data in a blockchain hyperledger fabric

nammn (Tue, 09 Jan 2018 13:18:21 GMT):
Has joined the channel.

sykesm (Tue, 09 Jan 2018 13:43:58 GMT):
Has joined the channel.

sykesm (Tue, 09 Jan 2018 14:08:14 GMT):
Has left the channel.

KathyXu (Tue, 09 Jan 2018 14:21:55 GMT):
Has joined the channel.

albert.lacambra (Tue, 09 Jan 2018 19:32:55 GMT):
Is someone using injection (spring or cdi) for java chaincode?

depengli (Wed, 10 Jan 2018 03:28:50 GMT):
Has joined the channel.

markthedark (Wed, 10 Jan 2018 07:52:27 GMT):
fmt.Printf("...") output should be seen in docker logs of the container on which the chaincode is running, right?

markthedark (Wed, 10 Jan 2018 07:52:27 GMT):
fmt.Printf("...") output should be seen in docker logs of the container on which the chaincode is running, right? I'm having some issues debugging my chaincode, as some printfs are showing in the log, some not..

MariaHenderson (Wed, 10 Jan 2018 08:31:46 GMT):
Has joined the channel.

jrosmith (Wed, 10 Jan 2018 14:13:31 GMT):
@markthedark not sure if it captures Printf but why not use the built in logger? https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewLogger

sasiedu (Wed, 10 Jan 2018 18:21:49 GMT):
Hi all, can the chaincode path be url or always has to be saved on the server:

LeoKotschenreuther (Wed, 10 Jan 2018 19:01:45 GMT):
Hi all, I have an important and urgent question about Chaincode. I wrote a little example chaincode that was able to make outgoing http calls to external services. In the example below I was able to get a response from an external API. Now that I'm able to call external APIs my chaincode is no more deterministic, isn't that a huge problem? Is there anything I could do to stop Chaincode from calling external services? Are there plans to fix that in the Fabric codebase? Here is the example: ``` package main import ( "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer" "net/http" "io/ioutil" "fmt" ) type MyCC struct { } func main() { shim.Start(new(MyCC)) } func (cc *MyCC) Init(stub shim.ChaincodeStubInterface) peer.Response { return shim.Success(nil) } func (cc *MyCC) Invoke(stub shim.ChaincodeStubInterface) peer.Response { function, args := stub.GetFunctionAndParameters() switch function { case "outgoingConnection": return outgoingConnection(stub, args) default: return shim.Error("Valid methods are 'outgoingConnection'!") } } func outgoingConnection(stub shim.ChaincodeStubInterface, args []string) peer.Response { response, err := http.Get("https://api.coindesk.com/v1/bpi/currentprice.json") if err != nil { return shim.Error(fmt.Sprintf("error when calling http.Get: %v", err)) } defer response.Body.Close() contents, err := ioutil.ReadAll(response.Body) if err != nil { return shim.Error(fmt.Sprintf("error when reading response.Body: %v", err)) } return shim.Success(contents) } ```

jbuusao (Wed, 10 Jan 2018 20:07:06 GMT):
Has joined the channel.

vinay_g (Wed, 10 Jan 2018 20:18:43 GMT):
Has joined the channel.

vinay_g (Wed, 10 Jan 2018 20:18:57 GMT):
need help on chaincode instantiation which is dependent on other go packages like golang/protobuf and pkg/errors. Below is the error i am getting in the peer logs, ``` 2018-01-10 19:59:42.040 UTC [endorser] simulateProposal -> ERRO 405 failed to invoke chaincode name:"lscc" on transaction 380f014688cb8638b66cc9e9c8c85f1bf06ba062fbb979442483f7e9ae2139be, error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/Loyalty/loyalty.go:15: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 chaincode/input/src/Loyalty/loyalty.go:18:2: cannot find package "github.com/pkg/errors" in any of: /opt/go/src/github.com/pkg/errors (from $GOROOT) /chaincode/input/src/github.com/pkg/errors (from $GOPATH) /opt/gopath/src/github.com/pkg/errors ```I've already mounted these to the peer docker and are present at these `/opt/gopath/src/github.com/golang/protobuf/proto` locations

jrosmith (Wed, 10 Jan 2018 20:27:47 GMT):
@LeoKotschenreuther if making external calls is a concern, then do not make external calls within the chaincode. if you want to prevent this behavior i'd recommend an out of band solution and locking it down from the network level. @vinay_g you need to vendor your dependencies

vinay_g (Wed, 10 Jan 2018 20:31:20 GMT):
@jrosmith Thanks! I am new to golang can you let me know how to vendor these packages? Currently I just git cloned into the VM and mounted it to the peer's docker process

LeoKotschenreuther (Wed, 10 Jan 2018 22:11:00 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Htr3ojKZ5bsDnErhx) @jrosmith I think there will be situations where one doesn't have control over what other people do with their chaincode that runs in your network. Do you know of any Peer settings that might make it harder for Chaincode to make outgoing calls?

thiago-moreira (Wed, 10 Jan 2018 23:15:10 GMT):
Has joined the channel.

jsrhome (Wed, 10 Jan 2018 23:26:40 GMT):
Has joined the channel.

nachdakwale (Thu, 11 Jan 2018 01:12:46 GMT):
Has joined the channel.

pchaivong (Thu, 11 Jan 2018 02:18:19 GMT):
Has joined the channel.

Harshit.1 (Thu, 11 Jan 2018 05:28:30 GMT):
Has joined the channel.

Apoorva (Thu, 11 Jan 2018 07:02:19 GMT):
Has joined the channel.

CodeReaper (Thu, 11 Jan 2018 14:01:13 GMT):
https://github.com/hyperledger/fabric/tree/master/core/chaincode/lib/cid is this implementation of Access control possible in fabric 1.0 or is it for 1.1 only??

diego88 (Thu, 11 Jan 2018 14:05:51 GMT):
Has joined the channel.

diego88 (Thu, 11 Jan 2018 14:07:07 GMT):
Hi everybody. The ledger is Key/Value. I don't understand how to perform a query based on the Value instead of on the Key, anyone can help me? Thank you in advance!

milliger (Thu, 11 Jan 2018 14:14:13 GMT):
Has joined the channel.

milliger (Thu, 11 Jan 2018 14:18:37 GMT):
@CodeReaper I think this is a new feature in 1.1 (https://www.youtube.com/watch?v=WTW9QVO28l0)

novusopt (Thu, 11 Jan 2018 14:53:25 GMT):
Has joined the channel.

singh.amitkumar (Thu, 11 Jan 2018 17:37:40 GMT):
Has joined the channel.

kuvelky (Fri, 12 Jan 2018 03:30:11 GMT):
Has joined the channel.

CodeReaper (Fri, 12 Jan 2018 05:14:45 GMT):
ok thanks @milliger

SubhodI (Fri, 12 Jan 2018 09:01:02 GMT):
Hi everyone, What is the best way to start building and debugging chaincode?(eg: IDE, execution environment, network setup)

VictoriaH (Fri, 12 Jan 2018 10:15:43 GMT):
Has joined the channel.

sasiedu (Fri, 12 Jan 2018 14:33:35 GMT):
Hi all, can 2 different chaincodes change data on a channel?

sasiedu (Fri, 12 Jan 2018 14:33:35 GMT):
Hi all, can 2 different chaincodes change data on a channel? I mean edit ledger data of the channel

Vadim (Fri, 12 Jan 2018 14:44:11 GMT):
@sasiedu ledger data exists per chaincode, there is no data which does not belong to some existing chaincode on the channel

hemant30 (Fri, 12 Jan 2018 17:32:30 GMT):
Has joined the channel.

SrikanthMS (Fri, 12 Jan 2018 22:31:56 GMT):
Has joined the channel.

sudheesh001 (Sat, 13 Jan 2018 11:55:13 GMT):
Has joined the channel.

kaustavdey (Sat, 13 Jan 2018 18:16:54 GMT):
Has joined the channel.

pkarolis (Sun, 14 Jan 2018 13:07:20 GMT):
Has joined the channel.

pkarolis (Sun, 14 Jan 2018 13:09:57 GMT):
@SubhodI i started by writing unit tests using mocking. see this example https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go

pkarolis (Sun, 14 Jan 2018 13:11:43 GMT):
Hi Everyone. All the examples of chaincode I saw always passes a list of strings as arguments for chaincode execution. I would like to pass json object as argument. Can anyone send me links to examples who do that?

sasiedu (Mon, 15 Jan 2018 06:10:42 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=pP6PzEkK9EGAc6Qjv) @Vadim ok thanks

sasiedu (Mon, 15 Jan 2018 06:11:39 GMT):
@Vadim ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Unknown chaincodeType: NODE)```

sasiedu (Mon, 15 Jan 2018 06:11:39 GMT):
@Vadim ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Unknown chaincodeType: NODE)``` i keep getting this error

JOYELIN (Mon, 15 Jan 2018 06:23:39 GMT):
Has joined the channel.

dsanchezseco (Mon, 15 Jan 2018 14:29:28 GMT):
Has joined the channel.

dsanchezseco (Mon, 15 Jan 2018 14:33:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jG5k5qom8wpQtaMwP) @LeoKotschenreuther I've just thought of doing that(and test it on node). As far as I know it not a problem on Fabric, the chaincodes don't have to be deterministic in opposition to Solidity ones. Here the transaction is not ran on all endorsers, only the RW replica set is check, so as long as they have the same RW there's no problem

dsanchezseco (Mon, 15 Jan 2018 14:33:51 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jG5k5qom8wpQtaMwP) @LeoKotschenreuther I've just thought of doing that(and test it on node). As far as I know it not a problem on Fabric, the chaincodes don't have to be deterministic in opposition to Solidity ones. Here the transaction is not ran on all endorsers, only the RW replica set is check, so as long as they have the same RW there's no problem. EDIT: as long as they have the same READ set.

Derashe (Mon, 15 Jan 2018 16:10:32 GMT):
Has left the channel.

muralisr (Mon, 15 Jan 2018 17:32:59 GMT):
@dsanchezseco `Now that I'm able to call external APIs my chaincode is no more deterministic, isn't that a huge problem?` - short answer, not a problem from "determinism" point of view. We are storing only the transaction with a unique result from the executing endorsers. That result should be signed according to endorsement policy by set of peers and amounts to looking at _what_ they compute to and now _how_ they compute it.

muralisr (Mon, 15 Jan 2018 17:32:59 GMT):
@dsanchezseco @LeoKotschenreuther `Now that I'm able to call external APIs my chaincode is no more deterministic, isn't that a huge problem?` - short answer, not a problem from "determinism" point of view. We are storing only the transaction with a unique result from the executing endorsers. That result should be signed according to endorsement policy by set of peers and amounts to looking at _what_ they compute to and now _how_ they compute it.

muralisr (Mon, 15 Jan 2018 17:33:33 GMT):
having said that, you can get into a situation where different endorsers will keep computing different things and the TX won't make progress

muralisr (Mon, 15 Jan 2018 17:34:20 GMT):
so this a two-edged sword to be wielded carefully

JaishankarGothandaraman (Tue, 16 Jan 2018 05:08:57 GMT):
Has joined the channel.

dockeryounger (Tue, 16 Jan 2018 06:26:46 GMT):
Has joined the channel.

shubhammangla (Tue, 16 Jan 2018 07:17:50 GMT):
Has joined the channel.

dsanchezseco (Tue, 16 Jan 2018 09:52:08 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=HZqcXJuuCTr4Q7rzu) @muralisr nope. the endorsers don't replay the transaction, they only check that the READ replica set versions of the proposal and the stored is the same. So is not a problem being non-deterministic. The function is only called once.

dsanchezseco (Tue, 16 Jan 2018 09:52:34 GMT):
Check this i did just now with a scheduled task

dsanchezseco (Tue, 16 Jan 2018 09:53:02 GMT):

scheduled_task_on_chaincode.png

dsanchezseco (Tue, 16 Jan 2018 09:53:58 GMT):
i've scheduled some console logs on a node chaincode and as the function is only called when creating the proposal the text is only prompted on the called peer, not in all peers/endorsers

dsanchezseco (Tue, 16 Jan 2018 10:36:43 GMT):

externalRandom.png

dsanchezseco (Tue, 16 Jan 2018 11:07:28 GMT):

readConflit.png

dsanchezseco (Tue, 16 Jan 2018 11:07:28 GMT):

readConflit.png

dsanchezseco (Tue, 16 Jan 2018 11:07:28 GMT):

readConflit.png

dsanchezseco (Tue, 16 Jan 2018 11:07:28 GMT):

readConflit.png

dsanchezseco (Tue, 16 Jan 2018 11:22:28 GMT):

Screenshot from 2018-01-16 12-17-31.png

dsanchezseco (Tue, 16 Jan 2018 11:23:53 GMT):
I hope I didn't make any mistake and help clarify this topic :nerd: :woo:

Chalex (Wed, 17 Jan 2018 02:42:38 GMT):
Hi, all. In my chaincode project, I refered the `github.com/miekg/pkcs11" in my chaincode project` and I put it the `vendor` directory. But it seem when the peer node instantiate my chaincode with command like this `GOPATH=/chaincode/input:$GOPATH go build -tags \"\" -ldflags \"-linkmode external -extldflags '-static'\" -o /chaincode/output/chaincode github.my.com/haizi/mychaincode/chaincode/all`, it will report the error `/opt/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-738818963/000003.o: In function `GetSessionInfo': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:184: multiple definition of `GetSessionInfo' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:194: first defined here /tmp/go-link-738818963/000003.o: In function `FindObjects': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:298: multiple definition of `FindObjects' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:320: first defined here /tmp/go-link-738818963/000003.o: In function `VerifyRecover': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:573: multiple definition of `VerifyRecover' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:602: first defined here /tmp/go-link-738818963/000003.o: In function `DecryptInit': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:368: multiple definition of `DecryptInit' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:392: first defined here /tmp/go-link-738818963/000003.o: In function `Decrypt': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:374: multiple definition of `Decrypt' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:398: first defined here /tmp/go-link-738818963/000003.o: In function `DigestFinal'`

Chalex (Wed, 17 Jan 2018 02:43:43 GMT):
Hi, all. In my chaincode project, I refered the `github.com/miekg/pkcs11" in my chaincode project` and I put it the `vendor` directory. But it seem when the peer node instantiate my chaincode with command like this `GOPATH=/chaincode/input:$GOPATH go build -tags \"\" -ldflags \"-linkmode external -extldflags '-static'\" -o /chaincode/output/chaincode github.my.com/haizi/mychaincode/chaincode/all`, it will report the error ```/opt/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-738818963/000003.o: In function `GetSessionInfo': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:184: multiple definition of `GetSessionInfo' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:194: first defined here /tmp/go-link-738818963/000003.o: In function `FindObjects': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:298: multiple definition of `FindObjects' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:320: first defined here /tmp/go-link-738818963/000003.o: In function `VerifyRecover': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:573: multiple definition of `VerifyRecover' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:602: first defined here /tmp/go-link-738818963/000003.o: In function `DecryptInit': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:368: multiple definition of `DecryptInit' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:392: first defined here /tmp/go-link-738818963/000003.o: In function `Decrypt': /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11/pkcs11.go:374: multiple definition of `Decrypt' /tmp/go-link-738818963/000002.o:/chaincode/input/src/github.ibm.com/haizi/mychaincode/chaincode/all/vendor/github.com/miekg/pkcs11/pkcs11.go:398: first defined here /tmp/go-link-738818963/000003.o: In function `DigestFinal'```

Chalex (Wed, 17 Jan 2018 02:44:04 GMT):
How to solve this?

chill37 (Wed, 17 Jan 2018 08:58:33 GMT):
Has joined the channel.

mp (Wed, 17 Jan 2018 12:19:41 GMT):
is it possible to query metadata of transactions from chaincode by txID? I would like to get creator certificate data and timestamp for example.

mp (Wed, 17 Jan 2018 12:19:41 GMT):
Is it possible to query metadata of transactions from chaincode by txID? I would like to get creator certificate data and timestamp for example.

Devender_Singh (Thu, 18 Jan 2018 05:13:08 GMT):
Has joined the channel.

ebullientdrift (Thu, 18 Jan 2018 07:13:11 GMT):
Has joined the channel.

mastersingh24 (Thu, 18 Jan 2018 10:10:19 GMT):
Why exactly are you including the pkcs11 package? (https://chat.hyperledger.org/channel/chaincode-dev?msg=iuFRZqZh9wJTN3v9R) @Chalex

asadhayat (Thu, 18 Jan 2018 10:29:43 GMT):
Can we access membership services or user certs in chaincode. I want to allow some peers to modify some state variables while restrict others. How can i achieve it??

jks3462 (Thu, 18 Jan 2018 11:25:34 GMT):
Has joined the channel.

dsanchezseco (Thu, 18 Jan 2018 11:31:46 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Rfjfj8vLDoWcqk7ks) @asadhayat look here https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim

dsanchezseco (Thu, 18 Jan 2018 11:31:46 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=Rfjfj8vLDoWcqk7ks) @asadhayat look here https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetCreator or here https://fabric-shim.github.io/ChaincodeStub.html#getCreator__anchor (the node version has more info about this one)

jrosmith (Thu, 18 Jan 2018 14:16:32 GMT):
@asadhayat attribute based access control will be rolled out in 1.1, it is currently available in the 1.1 preview: https://wiki.hyperledger.org/projects/fabric/proposedv1_1 you can get cert info from below. notice here i'm just parsing out the common name. ``` import ( "crypto/x509" "encoding/pem" "github.com/golang/protobuf/proto" mspprotos "github.com/hyperledger/fabric/protos/msp" ) func getSigner(stub shim.ChaincodeStubInterface) (string, error) { creator, err := stub.GetCreator() if err != nil { return "", err } id := &mspprotos.SerializedIdentity{} err = proto.Unmarshal(creator, id) if err != nil { return "", err } block, _ := pem.Decode(id.GetIdBytes()) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { return "", err } mspID := id.GetMspid() // if you need the mspID signer := cert.Subject.CommonName return signer, nil } ```

bryancan (Thu, 18 Jan 2018 17:56:40 GMT):
Has joined the channel.

Chalex (Fri, 19 Jan 2018 02:38:34 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=cG6ia3fSnJwwzmR9d) @mastersingh24 I referred another project and it has pkcs11 in its vendor. Thank you. I solved it. It's because of two pkcs11 versions.

bingimanasa (Fri, 19 Jan 2018 04:24:14 GMT):
Has joined the channel.

bingimanasa (Fri, 19 Jan 2018 04:26:11 GMT):
hello im beginner to chaincode development, i need to store a text document to database using chaincode and retreive hashcode of that document, anyone please help to store a text document to database using chaincode.

KangkanBora (Fri, 19 Jan 2018 06:10:48 GMT):
@bingimanasa if you want to store it from chaincode use node/java sdk for storing and retrive data into ledger(statedb). See the fabric-sample examples

EricMcEvoy (Fri, 19 Jan 2018 20:11:29 GMT):
Has joined the channel.

EricMcEvoy (Fri, 19 Jan 2018 20:18:11 GMT):
Hi there. I am running docker-compose -f docker-compose-simple.yaml up -d in the fabric-samples/chaincode-docker-devmode folder which consists of a cli containers. I then want to enter the peers file system with command docker exec -it cli bash and it tells me the containers doesn't exist? It seems the cli container is exiting when I run docker-compose. Anyone have any idea why this would happen?

EricMcEvoy (Fri, 19 Jan 2018 20:18:17 GMT):

Clipboard - January 19, 2018 8:18 PM

EricMcEvoy (Fri, 19 Jan 2018 20:23:58 GMT):

Clipboard - January 19, 2018 8:23 PM

EricMcEvoy (Fri, 19 Jan 2018 20:32:51 GMT):
It seems I can enter the chaincode container successfully but not the cli

EricMcEvoy (Fri, 19 Jan 2018 20:33:00 GMT):

Clipboard - January 19, 2018 8:32 PM

EricMcEvoy (Fri, 19 Jan 2018 21:15:31 GMT):
After stopping and killing all networks and containers it mysteriously starting working

colginpark (Fri, 19 Jan 2018 22:54:50 GMT):
Has joined the channel.

lengyijun (Sat, 20 Jan 2018 06:03:26 GMT):
Has joined the channel.

Toan2211 (Sat, 20 Jan 2018 16:29:46 GMT):
Has joined the channel.

CodeReaper (Sun, 21 Jan 2018 19:37:40 GMT):
Hey, GetStateByRange method says that the startkey and endkey will give iterator of all keys in that lie in between lexically. If my start Key is abc-10 and end key is abc-20, will the iterator also include abc-100 or abc-150 also???

CodeReaper (Sun, 21 Jan 2018 19:37:40 GMT):
Hey, GetStateByRange method says that the startkey and endkey will give iterator of all keys in that lie in between lexically. If my start Key is abc-10 and end key is abc-20, will the iterator also include abc-100 or abc-199 also???

CodeReaper (Sun, 21 Jan 2018 19:37:40 GMT):
Hey, GetStateByRange method says that the startkey and endkey will give iterator of all keys that lie in between lexically. If my start Key is abc-10 and end key is abc-20, will the iterator also include abc-100 or abc-199 also???

VittorioGrassi (Sun, 21 Jan 2018 23:13:05 GMT):
Has joined the channel.

CodeReaper (Mon, 22 Jan 2018 06:33:45 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=aHiG78dqLNMEhzoup) I tried running the chaiancode, this does seems to be the case. Any idea how I could perform listing multiple assets with ranges?? Composite keys dont allow selecting ranges

wanliangbing (Mon, 22 Jan 2018 08:05:43 GMT):
Has joined the channel.

ParveenPandit (Mon, 22 Jan 2018 10:32:02 GMT):
Has joined the channel.

prithveesh (Mon, 22 Jan 2018 11:44:12 GMT):
Has joined the channel.

muralisr (Mon, 22 Jan 2018 14:32:57 GMT):
@CodeReaper do try the question in #fabric-ledger if you need more info

bami0988 (Tue, 23 Jan 2018 02:13:43 GMT):
Has joined the channel.

AnandBanik (Tue, 23 Jan 2018 05:57:20 GMT):
Has joined the channel.

AnandBanik (Tue, 23 Jan 2018 05:58:22 GMT):
Hi team ....can anyone provide me an example of chaincode where we can get the attributes mentioned during the user registration process currently i am using the below chaincode to get name and org var getCreator = func(certificate []byte) (string, string) { data := certificate[strings.Index(string(certificate), "-----") : strings.LastIndex(string(certificate), "-----")+5] block, _ := pem.Decode([]byte(data)) cert, _ := x509.ParseCertificate(block.Bytes) organization := cert.Issuer.Organization[0] commonName := cert.Subject.CommonName logger.Debug("commonName: " + commonName + ", organization: " + organization) organizationShort := strings.Split(organization, ".")[0] return commonName, organizationShort } But I cannot find a way to get the values of attributes i use to register the user I am using the below Node SDK request https://fabric-sdk-node.github.io/global.html#RegisterRequest__anchor Appreciate your help with this

AnandBanik (Tue, 23 Jan 2018 05:58:22 GMT):
Hi team ....can anyone provide me an example of chaincode where we can get the attributes mentioned during the user registration process currently i am using the below chaincode to get name and org var getCreator = func(certificate []byte) (string, string) { data := certificate[strings.Index(string(certificate), "-----") : strings.LastIndex(string(certificate), "-----")+5] block, _ := pem.Decode([]byte(data)) cert, _ := x509.ParseCertificate(block.Bytes) organization := cert.Issuer.Organization[0] commonName := cert.Subject.CommonName logger.Debug("commonName: " + commonName + ", organization: " + organization) organizationShort := strings.Split(organization, ".")[0] return commonName, organizationShort } But I cannot find a way to get the values of attributes i use to register the user I am using the below Node SDK request for user registration https://fabric-sdk-node.github.io/global.html#RegisterRequest__anchor Appreciate your help with this

mna2016 (Tue, 23 Jan 2018 13:41:07 GMT):
Hi All, Is it possible to call the golang chaincode via REST API endpoints? I remember hyperledger v0.6 supported REST.

Vadim (Tue, 23 Jan 2018 13:41:54 GMT):
@mna2016 https://github.com/hyperledger/fabric-sdk-rest

mna2016 (Tue, 23 Jan 2018 13:46:18 GMT):
@Vadim Thanks for the quick response.

mna2016 (Tue, 23 Jan 2018 13:46:59 GMT):
@Vadim I have the blockchain service running on IBM cloud. will I be able to access that with the help of this sdk rest server?

Vadim (Tue, 23 Jan 2018 13:47:14 GMT):
probably

takeo (Wed, 24 Jan 2018 02:41:03 GMT):
Has joined the channel.

takeo (Wed, 24 Jan 2018 02:43:22 GMT):
Hi! I wanna use stub.GetStateByRange method. But I don't know how to return to client. I know the way to use GetState and return String to client though.

takeo (Wed, 24 Jan 2018 02:44:24 GMT):
func (t *AllData) Invoke(stub shim.ChaincodeStubInterface) peer.Response { fn, args := stub.GetFunctionAndParameters() var result string var err error if fn == "set" { result, err = set(stub, args) } else { result, err = get(stub, args) } if err != nil { return shim.Error(err.Error()) } return shim.Success([]byte(result)) } func set(stub shim.ChaincodeStubInterface, args []string) (string, error) { if len(args) != 2 { return "", fmt.Errorf("Incorrect arguments. Expecting a key and a value") } err := stub.PutState(args[0], []byte(args[1])) if err != nil { return "", fmt.Errorf("Failed to set asset: %s", args[0]) } return args[1], nil } func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { value, err := stub.GetStateByRange("0", "9999") if err != nil { return "", fmt.Errorf("Failed to get with error: %s", err) } if value == nil { return "", fmt.Errorf("Asset not found") } return string(value), nil }

takeo (Wed, 24 Jan 2018 02:44:24 GMT):
func (t *AllData) Invoke(stub shim.ChaincodeStubInterface) peer.Response { fn, args := stub.GetFunctionAndParameters() var result string var err error if fn == "set" { result, err = set(stub, args) } else { result, err = get(stub, args) } if err != nil { return shim.Error(err.Error()) } return shim.Success([]byte(result)) } func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { value, err := stub.GetStateByRange("0", "9999") if err != nil { return "", fmt.Errorf("Failed to get with error: %s", err) } if value == nil { return "", fmt.Errorf("Asset not found") } return string(value), nil }

takeo (Wed, 24 Jan 2018 02:44:24 GMT):
```func (t *AllData) Invoke(stub shim.ChaincodeStubInterface) peer.Response { fn, args := stub.GetFunctionAndParameters() var result string var err error if fn == "set" { result, err = set(stub, args) } else { result, err = get(stub, args) } if err != nil { return shim.Error(err.Error()) } return shim.Success([]byte(result)) } func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { value, err := stub.GetStateByRange("0", "9999") if err != nil { return "", fmt.Errorf("Failed to get with error: %s", err) } if value == nil { return "", fmt.Errorf("Asset not found") } return string(value), nil }```

takeo (Wed, 24 Jan 2018 02:47:05 GMT):
compiling blow code showed following error. # chaincode/alldata ./alldata.go:53: cannot convert value (type shim.StateQueryIteratorInterface) to type string

takeo (Wed, 24 Jan 2018 02:49:15 GMT):
I know `string(value)` is wrong. But I don't know how I should write. How should I do?

takeo (Wed, 24 Jan 2018 02:49:15 GMT):
I guess `string(value)` and `shim.Success([]byte(result))` are wrong. But I don't know how I should write. How should I do?

exafox (Wed, 24 Jan 2018 03:19:57 GMT):
Has joined the channel.

exafox (Wed, 24 Jan 2018 03:22:58 GMT):
Hey folks, I would like to know if it is possible to store multiple types of information in the same hyperledger network? I have been looking at the chaincode examples and it seems like they all only track one type in each application. Relationships between these types would also be a requirement. Sorry if this isn't the optimal channel for this question, still figuring things out. Thanks!

takeo (Wed, 24 Jan 2018 04:45:02 GMT):
I resolved by following code ```func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { resultsIterator, err := stub.GetStateByRange("0", "9999") if err != nil { return "", fmt.Errorf("Failed to get with error: %s", err) } defer resultsIterator.Close() var buffer bytes.Buffer buffer.WriteString("["); for resultsIterator.HasNext() { queryResponse, err := resultsIterator.Next() if err != nil { return "", err } buffer.WriteString("{"); buffer.WriteString(queryResponse.Key) buffer.WriteString(":"); buffer.WriteString(string(queryResponse.Value)) buffer.WriteString("}"); if resultsIterator.HasNext() { buffer.WriteString(",") } } buffer.WriteString("]"); return buffer.String(), nil }``` Thank you.

Vadim (Wed, 24 Jan 2018 08:00:00 GMT):
@takeo it's better to use `json.Marshal()`

mna2016 (Wed, 24 Jan 2018 11:13:48 GMT):
@Vadim Hi, I am writing a golang chaincode. How do I implement access control in the chaincode. Is there any document or link for this? Thanks.

Vadim (Wed, 24 Jan 2018 11:34:55 GMT):
@mna2016 https://github.com/hyperledger/fabric/tree/master/core/chaincode/lib/cid works in 1.1

mna2016 (Wed, 24 Jan 2018 17:57:49 GMT):
Hi All, fabric-sdk-rest runs a rest server that connects to a blockchain network with the connection parameters defined in "datasources.json" file. I have used connection_profile.json in past to connect to a blockchain network. However, the format of datasources.json is significantly different from other connection_profiles I have seen so far(specially the ceritificate related parameters). My question is "What are minimum mandatory fields we can fill in datasources.json to connect to an IBM cloud blockchain? If an example is shared, that will be a big help. Thanks.

gesaleh (Wed, 24 Jan 2018 19:45:56 GMT):
Has joined the channel.

Chalex (Thu, 25 Jan 2018 02:45:24 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=XkxxYiSN9RWh439bF) @exafox Yes. You can. You can store any key/value pair on the same network where the value can be the byte array serialized from any types of information.

markthedark (Thu, 25 Jan 2018 08:07:15 GMT):
Anyone else having issues deploying the contracts, if i update the code or add a new function, after deploying it on a clean fabric, the function sometimes doesn't exist or the updates are not deployed..

Chalex (Thu, 25 Jan 2018 08:42:45 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=WxPLYyayR47oKohHR) @markthedark Are you using pure `fabric` or `hyperledger-composer`? If `fabric`, are you using the `development` mode or `normal` mode? If `normal` mode, then check whether you deleted the `old chaincode running environment` which is a docker image created by the peer. You should always confirm that when you deploy new chaincode, there is a image newly built for this chaincode in `normal mode`.

markthedark (Thu, 25 Jan 2018 08:46:14 GMT):
i'm using fabric, running in normal mode.. and i clean the running environment and/or change the name&version of the chaincode.

markthedark (Thu, 25 Jan 2018 08:58:36 GMT):
Another question regarding indexes on couchDB, i managed to set a JSON property as an index using projectFauxton so i can do sorting and paginating in queries. Is there a way to set that index programmaticaly? Either in the chaincode or maybe using the some sdk?

pkarolis (Thu, 25 Jan 2018 10:42:55 GMT):
Hi Guys. I writing Unit Tests for my GO chaincode. My functions use getQueryResult. However, they are not implemented in Shim mock. How can i mock GetQueryResult in my unit tests? Would you know?

reyaansh (Thu, 25 Jan 2018 11:55:49 GMT):
Has joined the channel.

CodeReaper (Thu, 25 Jan 2018 12:43:43 GMT):
Can anyone tell me some major benefits of using system chaincodes??

jrosmith (Thu, 25 Jan 2018 14:05:11 GMT):
@pkarolis in the mockstub you can actually just edit the code and return whatever you want: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/mockstub.go#L256 to my knowledge its not implemented because the stateDB is pluggable and not all stateDB implementations support rich querying

jrosmith (Thu, 25 Jan 2018 14:06:17 GMT):
@CodeReaper what you mean by use system chaincodes? like the lscc and escc?

jrosmith (Thu, 25 Jan 2018 14:10:39 GMT):
@markthedark are you deploying via the command line or one of the sdks? as far as setting indexes, i don't know of a way to do it from within the chaincode, all my indexed i've had to set out of band by writing some javascript that connects to the db and adds the index

markthedark (Thu, 25 Jan 2018 14:11:16 GMT):
i'm deploying via command line

jrosmith (Thu, 25 Jan 2018 14:34:59 GMT):
@markthedark are you sure you're referencing the new chaincode? are you packaging it in a specific way?

CodeReaper (Thu, 25 Jan 2018 15:25:09 GMT):
@jrosmith I saw these two example- https://github.com/hyperledger/fabric/blob/release/core/scc/samplesyscc/samplesyscc.go , https://github.com/hyperledger/fabric/blob/release/core/scc/qscc/query.go

jrosmith (Thu, 25 Jan 2018 15:42:20 GMT):
@CodeReaper to my knowledge the system chaincodes are literally part of the fabric blockchain logic, they do not participate in consensus. i know the escc, lscc, qscc, vscc, and cscc all have logic that is relevant to the life of a network. i think the sample is there in case you would like to implement system logic to extend current fabric capabilities. i have not written or felt the need to write a system chaincode so i am most likely not the best person to ask, perhaps someone with more knowledge of fabric internals could chime in?

CodeReaper (Thu, 25 Jan 2018 15:55:11 GMT):
@jrosmith thanks for response, I just want to know the potential of this feature to understand what capabilities it holds.

CodeReaper (Thu, 25 Jan 2018 15:57:05 GMT):
Supposedly I want to make multiple threads in system chaincode such that it invokes user chaincodes on its own after a period of time. Time triggers basically, wonder if its possible.

jrosmith (Thu, 25 Jan 2018 16:06:08 GMT):
@CodeReaper sounds like it should be but I really don't know :/

CodeReaper (Thu, 25 Jan 2018 16:07:21 GMT):
No issue, Thanks for the response :slight_smile:

george.skrbic (Thu, 25 Jan 2018 20:38:20 GMT):
Has joined the channel.

muralisr (Thu, 25 Jan 2018 20:44:21 GMT):
@CodeReaper system chaincodes respond to invokes just as any chaincode would. If you want to use an invoke as a trigger and start some asynch timer processing, theres nothing to prevent you from doing that ...really depends upon what you mean by "invoke user chaincode". If thats a chaincode-to-chaincode call using chaincode api, then you would lose the context of the original invoke and it woukd fail. If you are mimicking a proposal and doing an external call, you might as well do that from the SDK. Sounds to me taking a step back and doing any orchestration from the SDK woukd be the right approach

muralisr (Thu, 25 Jan 2018 20:44:21 GMT):
@CodeReaper system chaincodes respond to invokes just as any chaincode would. If you want to use an invoke as a trigger and start some asynch timer processing, theres nothing to prevent you from doing that ...really depends upon what you mean by "invoke user chaincode". If thats a chaincode-to-chaincode call using chaincode api, then you could lose the context of the original invoke (after the original invoke returns) and it woukd fail. If you are mimicking a proposal and doing an external call, you might as well do that from the SDK. Sounds to me taking a step back and doing any orchestration from the SDK woukd be the right approach

Gaspard (Sat, 27 Jan 2018 01:10:12 GMT):
Has joined the channel.

joojis (Sat, 27 Jan 2018 06:11:42 GMT):
Has joined the channel.

SjirNijssen (Sun, 28 Jan 2018 09:40:16 GMT):
Has joined the channel.

mogamboizer (Sun, 28 Jan 2018 18:54:37 GMT):

Clipboard - January 28, 2018 1:53 PM

fengfengs (Mon, 29 Jan 2018 05:05:21 GMT):
Has joined the channel.

rake66 (Mon, 29 Jan 2018 11:01:16 GMT):
Has joined the channel.

pkarolis (Mon, 29 Jan 2018 11:23:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=LWiBviEYNpTT7BvED) @mogamboizer as far as I know it is not possible on leveldb

majestade (Mon, 29 Jan 2018 13:18:44 GMT):
Has joined the channel.

majestade (Mon, 29 Jan 2018 13:18:59 GMT):
Hi everyone! I am having a bit of a trouble to make a http request from fabric logic file. any help?

majestade (Mon, 29 Jan 2018 13:29:43 GMT):
basically i'm doing a get. I get the response code 200 everywhere, but when i make the get from my chain code and printo to the console the status....i always get zero

majestade (Mon, 29 Jan 2018 13:29:50 GMT):
instead of 200

robinrob (Mon, 29 Jan 2018 14:27:38 GMT):
Has joined the channel.

CodeReaper (Mon, 29 Jan 2018 15:16:48 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=NbjqPbus6BMuSNqvX) @muralisr Thanks for the response, It sounds interesting to me. What all extra resources are we talking about when we say that the system chaincodes have extra resources available to them(apart from querying blocks and transactions as shown by qscc)?

Amjadnz (Mon, 29 Jan 2018 17:35:24 GMT):
A question. I am using couchdb as my state db, have all the benefits of rich queries. Now need to find out if there is a chance of using aggregate functions of couchdb. Like I have a transactions in my transactions-chaincode: Transaction 1 ---- (-25 Units) ---- FromAccountA ---- ToAccountB Transaction 2 --- (-50 Units) ---- FromAccountA ---- ToAccountC

Amjadnz (Mon, 29 Jan 2018 17:35:24 GMT):
A question. I am using couchdb as my state db, have all the benefits of rich queries. Now need to find out if there is a chance of using aggregate functions of couchdb. Like I have some transactions in my transactions-chaincode: Transaction 1 ---- (-25 Units) ---- FromAccountA ---- ToAccountB Transaction 2 --- (-50 Units) ---- FromAccountA ---- ToAccountC

Amjadnz (Mon, 29 Jan 2018 17:35:32 GMT):
Need to get a SUM of units

Amjadnz (Mon, 29 Jan 2018 17:38:44 GMT):
One way is to iterate through all the units and get the sum - but if that is done via a aggregate function - should be handy.

Amjadnz (Mon, 29 Jan 2018 17:40:33 GMT):
Due to the deterministic nature of all the chaincode calls on all peers - I cannot resort to a running total kind of calc as well.

muralisr (Tue, 30 Jan 2018 02:30:37 GMT):
@CodeReaper as system chaincodes run in the peer process (not in a container) they have access to all peer resources.

ascatox (Tue, 30 Jan 2018 11:21:31 GMT):
Hi All! Is it possible to use an external library in Go chaincodes?

ascatox (Tue, 30 Jan 2018 11:47:22 GMT):
Hi All! How could I get unique IDs in Hyperledger fabric with the GO Chaincode?

Vadim (Tue, 30 Jan 2018 11:48:15 GMT):
e.g. use transaction id

jrosmith (Tue, 30 Jan 2018 14:05:21 GMT):
@Amjadnz it sounds like the issue is the fact that `GetQueryResult` is a read only action and is not included in part of the read/write set. if i remember correctly `GetStateByPartialCompositeKey` does get entered into the r/w set and you'd be able to detect phantom reads/writes, enabling you to write the summation in the chaincode. as far as for doing it on the couchDB side...perhaps you could create a view that sums everything and then query that? i'm fairly certain this is possible but I don't know the specifics

IngoRammer (Wed, 31 Jan 2018 05:42:15 GMT):
Has joined the channel.

NunoEdgarGub1 (Wed, 31 Jan 2018 20:33:51 GMT):
Has joined the channel.

LeDang (Thu, 01 Feb 2018 04:00:38 GMT):
Has joined the channel.

NINIU09 (Thu, 01 Feb 2018 06:56:02 GMT):
Has joined the channel.

Lucifer (Thu, 01 Feb 2018 07:34:50 GMT):
Hi, i am currently working on a chaincode which stores the data into the ledger using encryption, but whenever i try to instantiate the chaincode i get timeout error. I know sometimes we have to instantiate more than once so I tried it many times but it still returns timeout error. Then i tried instantiating the same chaincode without encryption and it got instantiated in first try. It is happening only when i try to instantiate my encryption chaincode. any idea?

Vadim (Thu, 01 Feb 2018 07:49:42 GMT):
@Lucifer have you checked the peer logs? Also, you need to instantiate only once. It's strange when you say "sometimes we have to instantiate more than once"

jackyLee (Thu, 01 Feb 2018 08:55:22 GMT):
Has joined the channel.

Lucifer (Thu, 01 Feb 2018 12:27:30 GMT):
@Vadim it happens sometimes only when timeout occur while instantiation, by sending request again it gets properly instantiated

atishaya11 (Fri, 02 Feb 2018 11:19:28 GMT):
Has joined the channel.

SuperSeiyan (Fri, 02 Feb 2018 18:11:51 GMT):
Has joined the channel.

Amjadnz (Sat, 03 Feb 2018 14:42:54 GMT):
Hi - a question. ``` peer0.broker.ubn.ae | 2018-02-03 14:41:46.299 UTC [endorser] simulateProposal -> ERRO 41a failed to invoke chaincode name:"lscc" on transaction 1641b65db2cb0fd0ac638571da5b10a86e7c7407971925f07afd07f6f1c318fa, error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/tts/ubn/chaincode/accounts/AccountsMaster.go:11:2: cannot find package "github.com/golang/protobuf/proto" in any of: peer0.broker.ubn.ae | /opt/go/src/github.com/golang/protobuf/proto (from $GOROOT) peer0.broker.ubn.ae | /chaincode/input/src/github.com/golang/protobuf/proto (from $GOPATH) peer0.broker.ubn.ae | /opt/gopath/src/github.com/golang/protobuf/proto ```

Amjadnz (Sat, 03 Feb 2018 14:43:50 GMT):
I am setting the path of the golang in the docker container like this ``` volumes: - /var/run/:/host/var/run/ - ./channel/github.com/golang/:/opt/go/src/github.com/golang - ./channel/crypto-config/peerOrganizations/dfm.ubn.ae/peers/peer0.dfm.ubn.ae/:/etc/hyperledger/peer```

Amjadnz (Sat, 03 Feb 2018 18:34:23 GMT):
The strange part is when I login to the container I could see proto in the `/opt/go/src/github.com/golang` location - but still chaincode compilation complains about missing proto defs

Amjadnz (Sat, 03 Feb 2018 18:34:23 GMT):
The strange part is when I login to the peer container I could see proto in the `/opt/go/src/github.com/golang` location - but still chaincode compilation complains about missing proto defs

muralisr (Sat, 03 Feb 2018 20:35:31 GMT):
@Amjadnz the chaincode package does not contain the package (the fabric peer does). You'll have to vendor the dependency

Amjadnz (Sat, 03 Feb 2018 20:35:51 GMT):
Yep - thats what I ended up doing.

muralisr (Sat, 03 Feb 2018 20:36:03 GMT):
ah ok

Amjadnz (Sat, 03 Feb 2018 20:36:20 GMT):
I had to run clone the image and run the go dep updates seperately, retag the docker image and use it afterwards.

Amjadnz (Sat, 03 Feb 2018 20:36:55 GMT):
as this was a fabric-ccenv image issue - I had to manually update the image

Amjadnz (Sat, 03 Feb 2018 20:37:40 GMT):
I hope that is right. So far I was able to go through the installation and instantiation.

Amjadnz (Sat, 03 Feb 2018 20:37:40 GMT):
I hope that is right. So far I was able to go through the installation and instantiation with above change (of docker image update, retag)

Amjadnz (Sat, 03 Feb 2018 20:42:31 GMT):
So any update to go dependencies - on using docker, have to be included in the ccenv image?

Amjadnz (Sat, 03 Feb 2018 20:56:08 GMT):
@muralisr - another question if you can help please?

Amjadnz (Sat, 03 Feb 2018 20:56:12 GMT):
```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8ff1ea12a7b7 dev-peer0.sca.ubn.ae-end2endnodesdk-v0-67a9645fbe79145e251864d6300b2f4ff43bf87aac46056cf9955a81b7648d3d "chaincode -peer.a..." 6 minutes ago Up 6 minutes dev-peer0.sca.ubn.ae-end2endnodesdk-v0 744996c83880 dev-peer0.dfm.ubn.ae-end2endnodesdk-v0-154e627a44323ce8b5e0d06d4dd03393a4665a371d294a2aaaf0dddd28bcab38 "chaincode -peer.a..." 6 minutes ago Up 6 minutes dev-peer0.dfm.ubn.ae-end2endnodesdk-v0 bbe6ba7e09c7 dev-peer0.adx.ubn.ae-end2endnodesdk-v0-01d18ec0c3cf38b0c110d45178d8e378cdc26aeececce25c7369973df991c6ee "chaincode -peer.a..." 6 minutes ago Up 6 minutes dev-peer0.adx.ubn.ae-end2endnodesdk-v0 ```

Amjadnz (Sat, 03 Feb 2018 20:56:44 GMT):
I've installed the chaincode on 3 peers with node-sdk, instantiated with the instantiate command.

Amjadnz (Sat, 03 Feb 2018 20:57:05 GMT):
Now querying - the same using the query.js is giving be the below issue.

muralisr (Sat, 03 Feb 2018 20:57:19 GMT):
@Amjadnz I typically don't create a new image... I just go to my chaincode and do govendor to get the vendor dependencies before installing

Amjadnz (Sat, 03 Feb 2018 20:57:20 GMT):
```'Error: 2 UNKNOWN: could not find chaincode with name \'end2endnodesdk\' - make sure the chaincode end2endnodesdk has been successfully instantiated and try again'```

Amjadnz (Sat, 03 Feb 2018 20:57:50 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=9i4mZGogwy3YXDLak) @muralisr Ah I - see. That is cool.

muralisr (Sat, 03 Feb 2018 20:58:31 GMT):
so my guess would be the instantiate really did not go succeed for some reason

muralisr (Sat, 03 Feb 2018 20:58:42 GMT):
(about the second error I mean..)

muralisr (Sat, 03 Feb 2018 20:59:11 GMT):
the peer logs would likely contain errors to help debug

muralisr (Sat, 03 Feb 2018 21:00:06 GMT):
Oh I see.. you are saying the chaincode is up and rruning

Amjadnz (Sat, 03 Feb 2018 21:00:33 GMT):
Yes - the containers were created

Amjadnz (Sat, 03 Feb 2018 21:00:54 GMT):
https://pastebin.com/rdQdsp8Y - this is the log of my peer0 container.

Amjadnz (Sat, 03 Feb 2018 21:01:05 GMT):
Looks fine with no issues though.

Amjadnz (Sat, 03 Feb 2018 21:01:58 GMT):
Let me clear all and try again - maybe some caching issues.

muralisr (Sat, 03 Feb 2018 21:04:03 GMT):
wonder if your channel id is correct

muralisr (Sat, 03 Feb 2018 21:04:34 GMT):
perhaps you are querying the CC on the wrong channel ?

Amjadnz (Sat, 03 Feb 2018 21:53:33 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ZWYFpH5jZHZauSaCb) @muralisr - actually this was the issue. I had a different channel Id mentioned in the utils.js than the one I created.

Amjadnz (Sat, 03 Feb 2018 21:53:42 GMT):
thanks man - that resolved my issue.

Amjadnz (Sat, 03 Feb 2018 21:57:40 GMT):
Can you please tell me how to do the govendor part in golang (inside my chaincode to have dependecies in place). I could not connect the dots properly.

muralisr (Sat, 03 Feb 2018 23:13:44 GMT):
@Amjadnz this gives you a step by step for that https://www.youtube.com/watch?v=-mlUaJbFHcM&t=205s

Amjadnz (Sun, 04 Feb 2018 05:38:07 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=LvAfjmWA4ZGzYowfG) @muralisr Thanks man - as always very helpful.

hpurmann (Sun, 04 Feb 2018 17:30:29 GMT):
Has joined the channel.

Amjadnz (Mon, 05 Feb 2018 05:09:03 GMT):
A

Amjadnz (Mon, 05 Feb 2018 05:09:03 GMT):
A question

Amjadnz (Mon, 05 Feb 2018 05:09:51 GMT):
How can we deploy vendored chaincode on docker setup?

Amjadnz (Mon, 05 Feb 2018 05:10:34 GMT):
if i use node sdk - the example chaincode gets deployed fine (non vendored as there are no external deps)

Amjadnz (Mon, 05 Feb 2018 05:12:26 GMT):
But for my chaincode a lot of vendor support was needed. So i used the govendor method. Chaincode gets deployed but when instantiated it gives file not found error.

Vadim (Mon, 05 Feb 2018 07:54:21 GMT):
@Amjadnz which file not found?

Vadim (Mon, 05 Feb 2018 07:55:41 GMT):
I've noticed tend to include only *.go files and discard all other

Amjadnz (Mon, 05 Feb 2018 09:39:14 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=MT6ocFXwgPrjZw6MQ) @Vadim

Amjadnz (Mon, 05 Feb 2018 09:39:24 GMT):
the issue is If I use govendor- the output folder is `vendor` - where as If I put it as it is in the folder of my chaincode it gives the following error ```peer0.sca.ubn.ae | 2018-02-04 18:05:54.691 UTC [dev-peer0.sca.ubn.ae-uae-agm-cc-11-v0] func2 -> INFO 950 2018-02-04 18:05:54.691 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to read file content : open : no such file or directory peer0.sca.ubn.ae | 2018-02-04 18:05:54.691 UTC [dev-peer0.sca.ubn.ae-uae-agm-cc-11-v0] func2 -> INFO 951 2018-02-04 18:05:54.691 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: Error trying to read file content : open : no such file or directory ```

Vadim (Mon, 05 Feb 2018 09:57:53 GMT):
@Amjadnz it should be in the vendor folder

Amjadnz (Mon, 05 Feb 2018 10:15:03 GMT):
Yea it is same as the chaincode folder

Amjadnz (Mon, 05 Feb 2018 10:15:24 GMT):
Chaincode folder has a go file and vendor folder

Amjadnz (Mon, 05 Feb 2018 10:42:02 GMT):
`ls -ltr ` on my accounts (chaincode) folder ```Amjads-MacBook-Pro:accounts amjad$ ls -ltr total 64 -rw-r--r-- 1 amjad wheel 28765 Feb 4 21:12 accounts.go drwxr-xr-x 7 amjad wheel 238 Feb 5 14:39 vendor```

Amjadnz (Mon, 05 Feb 2018 10:42:36 GMT):
when I do a go build (it works fine and I get a `accounts` executable)

Vadim (Mon, 05 Feb 2018 10:43:48 GMT):
is there any non-*.go files in the vendored package?

Amjadnz (Mon, 05 Feb 2018 10:44:16 GMT):
and when I run it I get proper message (as I should get out of the codebase)

Amjadnz (Mon, 05 Feb 2018 10:44:19 GMT):
```Amjads-MacBook-Pro:accounts amjad$ ./accounts 2018-02-05 14:43:40.872 GST [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2018-02-05 14:43:40.872 GST [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... Error starting AccountMasters chaincode: error chaincode id not provided```

Amjadnz (Mon, 05 Feb 2018 10:44:38 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=D3g22bCQv7qQNnoje) @Vadim - one vendor.json file is at the vendor root.

Vadim (Mon, 05 Feb 2018 10:44:49 GMT):
no, in the package itself

Vadim (Mon, 05 Feb 2018 10:45:23 GMT):
the clients don't pack all files, so the package might get corrupted when installed

Amjadnz (Mon, 05 Feb 2018 10:46:06 GMT):
actual many

Amjadnz (Mon, 05 Feb 2018 10:46:30 GMT):
there are .s, .pl, .md, .yaml

Amjadnz (Mon, 05 Feb 2018 10:46:36 GMT):
many files of these extensions

Amjadnz (Mon, 05 Feb 2018 10:47:01 GMT):
and ofcourse proto and md files

Vadim (Mon, 05 Feb 2018 10:47:10 GMT):
well .s files are quite important

Vadim (Mon, 05 Feb 2018 10:47:26 GMT):
so I guess they don't get into the chaincode packag

Vadim (Mon, 05 Feb 2018 10:47:26 GMT):
so I guess they don't get into the chaincode package

Vadim (Mon, 05 Feb 2018 10:47:45 GMT):
do you use sdk to install it?

Amjadnz (Mon, 05 Feb 2018 10:47:58 GMT):
Yes - I'm using nodesdk to install the chaincode.

Amjadnz (Mon, 05 Feb 2018 10:48:04 GMT):
example_cc is fine (no vendoring)

Vadim (Mon, 05 Feb 2018 10:49:08 GMT):
you can see that sdk does filtering and leaves only files of these extensions: https://github.com/hyperledger/fabric-sdk-node/blob/master/fabric-client/lib/packager/Golang.js#L31-L34

Amjadnz (Mon, 05 Feb 2018 10:50:02 GMT):
Shall put the .s, .pl and .yaml too in there

Amjadnz (Mon, 05 Feb 2018 10:50:18 GMT):
and try (Golang.js)

Vadim (Mon, 05 Feb 2018 10:50:37 GMT):
I don't think you can

Vadim (Mon, 05 Feb 2018 10:50:46 GMT):
ah, you mean modify the sdk

Vadim (Mon, 05 Feb 2018 10:50:48 GMT):
well try

Vadim (Mon, 05 Feb 2018 10:51:11 GMT):
at least you will know whether this is the reason or not

Amjadnz (Mon, 05 Feb 2018 10:55:19 GMT):
Issue is still there.

Amjadnz (Mon, 05 Feb 2018 10:55:59 GMT):
So I guess "vendored" go packages are not supported still in current fabric. Or may be something in my config is breaking.

Amjadnz (Mon, 05 Feb 2018 10:56:26 GMT):
in the docker mode I mean

Amjadnz (Mon, 05 Feb 2018 10:58:38 GMT):
In here http://hyperledger-fabric.readthedocs.io/en/release/Style-guides/go-style.html it is mentioned that it has to be in fabric/vendor folder

Amjadnz (Mon, 05 Feb 2018 10:59:02 GMT):
I shall map the vendor folder in the container and check if that is working fine.

Vadim (Mon, 05 Feb 2018 11:24:49 GMT):
@Amjadnz I use vendoring, it works for me

Amjadnz (Mon, 05 Feb 2018 12:20:30 GMT):
What also i noticed is this error is possible if the peer in docker cannot get the chaincode itself

Amjadnz (Mon, 05 Feb 2018 12:27:16 GMT):
Would do one round of mapping again with volume and try again

Vadim (Mon, 05 Feb 2018 12:27:41 GMT):
what does it have to do with volumes?

Amjadnz (Mon, 05 Feb 2018 12:28:46 GMT):
In nodesdk im specifying the path to the chain code.

Amjadnz (Mon, 05 Feb 2018 12:28:52 GMT):
what if

Amjadnz (Mon, 05 Feb 2018 12:29:33 GMT):
the path is not accessible to the peer where im deploying

Amjadnz (Mon, 05 Feb 2018 12:38:28 GMT):
The chaincode compiles to executable - at the instantiate level right?

Vadim (Mon, 05 Feb 2018 12:40:22 GMT):
the sdk should compress everything and install it on the peer, so when you instantiating, peer has all necessary chaincode files

Amjadnz (Mon, 05 Feb 2018 12:42:10 GMT):
I see - then its my understanding issue.

Amjadnz (Mon, 05 Feb 2018 12:42:49 GMT):
Is this possuble that I'm running the instantiate very fast after it gets installed and delivered to the peer.

Amjadnz (Mon, 05 Feb 2018 12:43:47 GMT):
Its actually a script I can add a await time to check for that

Vadim (Mon, 05 Feb 2018 12:43:51 GMT):
I guess you wait for install to finish?

Amjadnz (Mon, 05 Feb 2018 12:46:05 GMT):
yes and then I instantiate without waiting further. i can add it too. what I feel the diff is example_cc is non-vendored, footprimt is small. Ans mine has a lot of dependencies

Amjadnz (Mon, 05 Feb 2018 12:46:05 GMT):
yes and then I instantiate without waiting further. i can add it too. what I feel the diff is example_cc is non-vendored, footprimt is small. And mine has a lot of dependencies

Vadim (Mon, 05 Feb 2018 12:46:53 GMT):
well for instantiate you don't need to wait as long as you don't try to invoke it

Amjadnz (Mon, 05 Feb 2018 13:03:40 GMT):
what I did - that worked before (i was not aware of the vendoring process in go) - I modified the fabric-envcc images to manually have these packages vendored as part of go path. And it worked fine.

Amjadnz (Mon, 05 Feb 2018 13:04:24 GMT):
Let me try again - just to make sure vendoring is the key issue.

Amjadnz (Mon, 05 Feb 2018 14:14:09 GMT):
```func userChaincodeStreamGetter(name string) (PeerChaincodeStream, error) { flag.StringVar(&peerAddress, "peer.address", "", "peer address") if comm.TLSEnabled() { keyPath := viper.GetString("tls.client.key.path") certPath := viper.GetString("tls.client.cert.path") data, err1 := ioutil.ReadFile(keyPath) if err1 != nil { chaincodeLogger.Errorf("Error trying to read file content %s: %s", keyPath, err1) return nil, fmt.Errorf("Error trying to read file content %s: %s", keyPath, err1) } key = string(data) data, err1 = ioutil.ReadFile(certPath) if err1 != nil { chaincodeLogger.Errorf("Error trying to read file content %s: %s", certPath, err1) return nil, fmt.Errorf("Error trying to read file content %s: %s", certPath, err1) } cert = string(data) }```

Amjadnz (Mon, 05 Feb 2018 14:14:51 GMT):
Regarding my issue of missin files I'm checking the chaincode.go code. Here it is complaining about the error if it is not able to find the tls.client.key.path or tls.client.cert.path

Vadim (Mon, 05 Feb 2018 14:15:54 GMT):
ehm, then what does it have to do with vendor?

Amjadnz (Mon, 05 Feb 2018 14:17:41 GMT):
yes you are right - that is a bit of confusion. If I use the same setup with example_cc (goes fine). If this is a TLS issue then it should complain there too right?

Amjadnz (Mon, 05 Feb 2018 14:19:07 GMT):
Is this possible that this (userChaincodeStreamGetter) is called only for vendor specific go packages?

Amjadnz (Mon, 05 Feb 2018 14:20:32 GMT):
and for those specific vendor packages my TLS settings are missing.

Vadim (Mon, 05 Feb 2018 14:20:44 GMT):
I don't think that peer cares whether it has vendor folder or not

Vadim (Mon, 05 Feb 2018 14:21:04 GMT):
it just puts your chaincode files into a container and runs "go build" on it

Amjadnz (Mon, 05 Feb 2018 14:21:25 GMT):
yep did that - and all went fine. got the executable.

Amjadnz (Mon, 05 Feb 2018 14:21:54 GMT):
By the way on peer I cannot build it right? I have to instantiate the envcc

Vadim (Mon, 05 Feb 2018 14:22:12 GMT):
I somehow fail to understand how peer-chaincode tls is influenced by the chaincode vendor folder

Vadim (Mon, 05 Feb 2018 14:22:24 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=6bYfuKnHqs4feuXom) yes, ccenv

Amjadnz (Mon, 05 Feb 2018 14:22:47 GMT):
Would do that again - yesterday seems like ages ago :)

Amjadnz (Mon, 05 Feb 2018 14:24:39 GMT):
By the way my containers are getting created.

Amjadnz (Mon, 05 Feb 2018 14:24:39 GMT):
By the way my images are getting created.

Amjadnz (Mon, 05 Feb 2018 14:24:53 GMT):
```REPOSITORY TAG IMAGE ID CREATED SIZE dev-peer0.dfm.ubn.ae-uaeagmcc-v0-1993de2059ed1c56228bea96fe64d1bd82370b729b441757ba6151f8cf7ab05f latest 61a313eaf670 15 minutes ago 146MB dev-peer0.sca.ubn.ae-uaeagmcc-v0-db4d34409612decd0763874cad16b246731e1b45fa69011a293ffc978c182408 latest 785f30843253 15 minutes ago 146MB dev-peer0.online.ubn.ae-uaeagmcc-v0-b50e987c1d9dbab2d03d4727a5a3bcadea4d8e872c9f4d79ff4d310394a74859 latest f787005b3f81 15 minutes ago 146MB```

Vadim (Mon, 05 Feb 2018 14:29:22 GMT):
@Amjadnz but chaincode containers not running?

Amjadnz (Mon, 05 Feb 2018 14:29:31 GMT):
yep

Amjadnz (Mon, 05 Feb 2018 14:29:36 GMT):
they are only images

Amjadnz (Mon, 05 Feb 2018 14:30:23 GMT):
when starting up containers the issue of "file not found" is shown. Doing another round with ccenv now. Let me check if that helps

Vadim (Mon, 05 Feb 2018 14:31:02 GMT):
can bash into the image and check whether you see the chainode binary in /usr/local/bin?

Vadim (Mon, 05 Feb 2018 14:31:02 GMT):
can you bash into the image and check whether you see the chainode binary in /usr/local/bin?

Amjadnz (Mon, 05 Feb 2018 14:31:14 GMT):
Sure thing

Amjadnz (Mon, 05 Feb 2018 14:42:36 GMT):
Yep its there as `chaincode`

Amjadnz (Mon, 05 Feb 2018 14:44:08 GMT):
Shall try the chaincode start?

Amjadnz (Mon, 05 Feb 2018 14:44:12 GMT):
from therE?

Vadim (Mon, 05 Feb 2018 14:44:14 GMT):
and what about content of /etc/hyperledger/fabric/?

Amjadnz (Mon, 05 Feb 2018 14:44:48 GMT):
I have a peer.crt - but this has no permissions

Vadim (Mon, 05 Feb 2018 14:44:59 GMT):
nothing else?

Amjadnz (Mon, 05 Feb 2018 14:45:03 GMT):
```---------- 1 root root 810 Jan 1 1970 peer.crt```

Amjadnz (Mon, 05 Feb 2018 14:45:11 GMT):
nothing else

Vadim (Mon, 05 Feb 2018 14:45:22 GMT):
well, it should also contain more files, the ones, which are missing

Vadim (Mon, 05 Feb 2018 14:45:35 GMT):
CORE_TLS_CLIENT_KEY_PATH=/etc/hyperledger/fabric/client.key

Vadim (Mon, 05 Feb 2018 14:45:41 GMT):
CORE_TLS_CLIENT_CERT_PATH=/etc/hyperledger/fabric/client.crt

Vadim (Mon, 05 Feb 2018 14:45:47 GMT):
CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt

Vadim (Mon, 05 Feb 2018 14:45:56 GMT):
why they are not there I don't know

Amjadnz (Mon, 05 Feb 2018 14:46:23 GMT):
I see. But these are not in the default sdk docker yaml. I have the below: ```- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/msp/peer/keystore/35c98094ef1c4d89c9d6854a30ca71eb5a590abd3de6256dc73047d19845d62b_sk - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/msp/peer/signcerts/peer0.sca.ubn.ae-cert.pem - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/msp/peer/cacerts/ca.sca.ubn.ae-cert.pem```

Vadim (Mon, 05 Feb 2018 14:46:42 GMT):
no, those are defined and set by peer when the image is being built

Amjadnz (Mon, 05 Feb 2018 14:46:43 GMT):
probably that is missing in my side.

Amjadnz (Mon, 05 Feb 2018 14:46:49 GMT):
Oh Isee

Vadim (Mon, 05 Feb 2018 14:46:53 GMT):
they are generated by the peer

Amjadnz (Mon, 05 Feb 2018 14:47:28 GMT):
what I can see in the logs is this ```peer0.online.ubn.ae | FROM hyperledger/fabric-baseos:x86_64-0.3.2 peer0.online.ubn.ae | ADD binpackage.tar /usr/local/bin peer0.online.ubn.ae | LABEL org.hyperledger.fabric.chaincode.id.name="UAEAGMCC" \ peer0.online.ubn.ae | org.hyperledger.fabric.chaincode.id.version="v0" \ peer0.online.ubn.ae | org.hyperledger.fabric.chaincode.type="GOLANG" \ peer0.online.ubn.ae | org.hyperledger.fabric.version="1.0.3" \ peer0.online.ubn.ae | org.hyperledger.fabric.base.version="0.3.2" peer0.online.ubn.ae | ENV CORE_CHAINCODE_BUILDLEVEL=1.0.3 peer0.online.ubn.ae | ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt peer0.online.ubn.ae | COPY peer.crt /etc/hyperledger/fabric/peer.crt```

Amjadnz (Mon, 05 Feb 2018 14:47:50 GMT):
does not have the client keys setup.

Amjadnz (Mon, 05 Feb 2018 14:48:03 GMT):
and the one we have is there in the folder (peer.crt)

Vadim (Mon, 05 Feb 2018 14:48:03 GMT):
yes, I cannot comment on that

Vadim (Mon, 05 Feb 2018 14:48:27 GMT):
perhaps I'd start from updating your fabric to the latest stable

Vadim (Mon, 05 Feb 2018 14:48:53 GMT):
so you use 1.0.3?

Amjadnz (Mon, 05 Feb 2018 14:49:06 GMT):
yes - I can upgrade no issues.

Amjadnz (Mon, 05 Feb 2018 14:49:23 GMT):
Let me check - and thanks @Vadim for having this patience. Really appreciate it.

Vadim (Mon, 05 Feb 2018 14:49:34 GMT):
yeah, just try with 1.0.5

Amjadnz (Mon, 05 Feb 2018 14:49:59 GMT):
Sure thing - should be fine is my feeling. Would update anyway.

Vadim (Mon, 05 Feb 2018 14:51:59 GMT):
@Amjadnz it's actually strange, from the code you posted it also defines only CORE_PEER_TLS_ROOTCERT_FILE. I have a suspicion you have some mix between fabric versions

Vadim (Mon, 05 Feb 2018 14:52:16 GMT):
make sure you remove ALL fabric-related images

Amjadnz (Mon, 05 Feb 2018 14:54:56 GMT):
Yes I will

indirajith (Mon, 05 Feb 2018 16:29:20 GMT):
Can anyone explain a bit about implementation of chaincode in Fabric network. Should we install chaincode on all the peers? But from the docs it says, chaincode runs separately from the peers.

jrosmith (Mon, 05 Feb 2018 16:35:16 GMT):
@indirajith chaincode should be installed on all peers that will be endorsing transactions. peers do not require a chaincode in order to run, but all chaincodes run in a docker container alongside a peer

Amjadnz (Mon, 05 Feb 2018 18:16:12 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=dRTwh6DBQkXdsvxj7) @Vadim - after moving to v1.0.5 - getting this error on instantiate ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/tts/official/src/tts/local.ubn.ae/fabric-sdk-node/node_modules/grpc/src/client.js:65:15)```

AditiChandna (Tue, 06 Feb 2018 07:42:03 GMT):
Has joined the channel.

AditiChandna (Tue, 06 Feb 2018 07:42:07 GMT):
Hello .. I have to install a bna file . I am following the link https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.html . However when I run the command: composer runtime install -c PeerAdmin@fabric-network -n tutorial-network ,, I am getting the error : Error: Error trying install composer runtime. Error: No valid responses from any peers. Response from attempted peer comms was an error: 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").. Any help on this please

Vadim (Tue, 06 Feb 2018 07:55:38 GMT):
@Amjadnz any errors in the peer log?

pathfinder2104 (Tue, 06 Feb 2018 10:37:10 GMT):
Has joined the channel.

indirajith (Tue, 06 Feb 2018 17:58:17 GMT):
@jrosmith Thank you! It cleared few of my doubts.

tkhwang (Wed, 07 Feb 2018 06:00:30 GMT):
Has joined the channel.

AlexisJ 1 (Wed, 07 Feb 2018 10:44:47 GMT):
Has joined the channel.

craik.zhang (Thu, 08 Feb 2018 00:44:34 GMT):
Has joined the channel.

pasimoes (Thu, 08 Feb 2018 06:10:36 GMT):
Has joined the channel.

mkvaghani (Thu, 08 Feb 2018 15:31:49 GMT):
Has joined the channel.

mkvaghani (Thu, 08 Feb 2018 15:31:54 GMT):
Hey

mkvaghani (Thu, 08 Feb 2018 15:31:57 GMT):
any one know

mogamboizer (Thu, 08 Feb 2018 16:27:28 GMT):
I have a composite key in level db the composite key is setup as = marble~owner~color 1. What is the startkey and endkey I need to specify for GetStateByRange function? When I set these to blank strings it does not return any results. 2. Is it possible to look-up a record individually on marbles, owner or color or any combination such as marbles-color, owner-color?

vitorqshr (Thu, 08 Feb 2018 16:55:23 GMT):
Has joined the channel.

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel-n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel-n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I invoking cc1 in cc2 with following command `stub.InvokeChaincode("cc1", ToChaincodeArgs(function,util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I invoking cc1 in cc2 with following command `stub.InvokeChaincode("cc1", ToChaincodeArgs(function,util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I invoking the function of cc1 in cc2 with following command `stub.InvokeChaincode("cc1", ToChaincodeArgs(function,util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I am invoking the function of cc1 in cc2 with following command `stub.InvokeChaincode("cc1", ToChaincodeArgs(function,util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I am invoking the function of cc1 in cc2 with following command `stub.InvokeChaincode(chaincodeID, util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc2 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I am invoking the function of cc1 in cc2 with following command `stub.InvokeChaincode(chaincodeID, util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:03:17 GMT):
Hi, I have a blockchain network running and I installed two chaincodes from the cli by using `peer chaincode install -n cc1 -v 1.0 ` `peer chaincode install -n cc2 -v 1.0 -p cc1` instantiate command: `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc1 -v 1.0 -c '{"Args":["init"]}'` `peer chaincode instantiate -o order.domain.com:7050 -C mychannel -n cc2 -v 1.0 -c '{"Args":["init", "cc1"]}'` as you can see from the parameters, cc2 is invoking a function from cc1. After I instantiated both, I am getting following error: Error: Error endorsing chaincode: rpc error: code = Unknown desc = Transaction returned with failure: could not find chaincode with name '' And I am invoking the function of cc1 in cc2 with following command `stub.InvokeChaincode(chaincodeID, util.ToChaincodeArgs(args...), "")`

novusopt (Fri, 09 Feb 2018 10:05:25 GMT):
Any idea?

Vadim (Fri, 09 Feb 2018 10:05:45 GMT):
@novusopt tried to specify a channel name in InvokeChaincode?

novusopt (Fri, 09 Feb 2018 10:06:46 GMT):
@Vadim will try

dsanchezseco (Fri, 09 Feb 2018 12:51:47 GMT):
@novusopt Why the -p points to cc1? Shouldn't it be the path to get the chaincode from instead? In the invoke you have to provide the channel that is the last "" that you have

novusopt (Fri, 09 Feb 2018 12:54:29 GMT):
@dsanchezseco yes actually it is the path, I shortened the code and I did the mistake

novusopt (Fri, 09 Feb 2018 13:32:42 GMT):
I am observing sth weird on the peer I am receiving following error: *filterError -> DEBU 94b7 Ignoring NoTransitionError: no transition*

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID occ cc2 in cc1 like this: `if err := stub.PutState("key1", []byte(cc2ID)); err != nil { return err }` ``

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID occ cc2 in cc1 like this: ```if err := stub.PutState("key1", []byte(cc2ID)); err != nil { return err }````

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID occ cc2 in cc1 like this: ```if err := stub.PutState("key1", []byte(cc2ID)); err != nil { return err }````

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID of cc2 in cc1 like this: ```if err := stub.PutState("key1", []byte(cc2ID)); err != nil { return err }````

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID of cc2 in cc1 like this: ```if err := stub.PutState("cc2ID", []byte(cc2ID)); err != nil { return err }````

novusopt (Fri, 09 Feb 2018 13:35:22 GMT):
and also I saved the chaincodeID of cc2 in cc1 like this: ```if err := stub.PutState("cc2ID", []byte("cc2")); err != nil { return err }````

novusopt (Fri, 09 Feb 2018 13:37:14 GMT):
and tried to read it immediately afterwards ``` ccID,err := stub.GetState(cc2ID) if err != nil { return err } ```

novusopt (Fri, 09 Feb 2018 13:37:14 GMT):
and tried to read it immediately afterwards ``` ccID,err := stub.GetState("cc2ID") if err != nil { return err } ```

novusopt (Fri, 09 Feb 2018 13:37:21 GMT):
the result is empty

Vadim (Fri, 09 Feb 2018 13:39:28 GMT):
@novusopt you can't read your own writes

novusopt (Fri, 09 Feb 2018 13:39:52 GMT):
@Vadim I dont get that...

Vadim (Fri, 09 Feb 2018 13:41:17 GMT):
when you do "PutState" it only writes that to the proposal's RWset, but not to the state. GetState() reads the state. The state will be updated when orderer builds the block and sends it to peers and the peers commit transactions with RWsets from that block.

novusopt (Fri, 09 Feb 2018 13:52:16 GMT):
ok that means I call the function ini wait for the state transition then I can query it?

novusopt (Fri, 09 Feb 2018 13:52:16 GMT):
ok that means I call the function init wait for the state transition then I can query it?

Vadim (Fri, 09 Feb 2018 13:53:00 GMT):
can you explain what you want to do?

novusopt (Fri, 09 Feb 2018 13:55:23 GMT):
sure, my plan is the following. I have 2 chaincodes cc1 & cc2, cc1 is invoking a function of cc2. cc1 gets via the init function the id of cc2. In the cc1 init function I am persisting(PutState) the id of cc2 in order to make it available for the function of cc1 which calls the function off cc2

Vadim (Fri, 09 Feb 2018 13:56:22 GMT):
ok, makes sense

novusopt (Fri, 09 Feb 2018 13:58:10 GMT):
so I can not make a GetState?

Vadim (Fri, 09 Feb 2018 13:58:25 GMT):
you can, but not immediately after PutState

Vadim (Fri, 09 Feb 2018 13:58:34 GMT):
it should be in a separate transaction

novusopt (Fri, 09 Feb 2018 13:58:52 GMT):
ok I see now I understand

novusopt (Fri, 09 Feb 2018 14:46:56 GMT):
thx

Amjadnz (Sat, 10 Feb 2018 16:41:00 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=wCJrdhG23pEf6Grwg) @Vadim ```2018-02-10 16:30:57.839 UTC [chaincode-platform] generateDockerfile -> DEBU 5ff FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="accounts" \ org.hyperledger.fabric.chaincode.id.version="v0" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt COPY peer.crt /etc/hyperledger/fabric/peer.crt 2018-02-10 16:30:57.845 UTC [util] DockerBuild -> DEBU 600 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-02-10 16:31:15.642 UTC [dockercontroller] deployImage -> DEBU 601 Created image: dev-peer0.dfm.local.ubn.ae-accounts-v0-7b634bb514780b750bcf93fae568d29a7a7b89a064f56a15f7a4da361d5657de 2018-02-10 16:31:15.643 UTC [dockercontroller] Start -> DEBU 602 start-recreated image successfully 2018-02-10 16:31:15.643 UTC [dockercontroller] createContainer -> DEBU 603 Create container: dev-peer0.dfm.local.ubn.ae-accounts-v0 2018-02-10 16:31:15.868 UTC [dockercontroller] createContainer -> DEBU 604 Created container: dev-peer0.dfm.local.ubn.ae-accounts-v0-7b634bb514780b750bcf93fae568d29a7a7b89a064f56a15f7a4da361d5657de 2018-02-10 16:31:16.518 UTC [dev-peer0.dfm.local.ubn.ae-accounts-v0] func2 -> INFO 605 Error starting AccountMasters chaincode: Error trying to read file content : open : no such file or directory2018-02-10 16:31:16.518 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to read file content : open : no such file or directory 2018-02-10 16:31:16.530 UTC [dockercontroller] Start -> DEBU 606 Started container dev-peer0.dfm.local.ubn.ae-accounts-v0 2018-02-10 16:31:16.530 UTC [container] unlockContainer -> DEBU 607 container lock deleted(dev-peer0.dfm.local.ubn.ae-accounts-v0) 2018-02-10 16:31:16.654 UTC [dockercontroller] func2 -> INFO 608 Container dev-peer0.dfm.local.ubn.ae-accounts-v0 has closed its IO channel 2018-02-10 16:32:57.777 UTC [eventhub_producer] validateEventMessage -> DEBU 609 ValidateEventMessage starts for signed event 0xc4214b7cb0 2018-02-10 16:32:57.778 UTC [eventhub_producer] deRegisterHandler -> DEBU 60a deregistering event type: BLOCK 2018-02-10 16:32:57.778 UTC [eventhub_producer] Chat -> DEBU 60b Received EOF, ending Chat 2018-02-10 16:36:16.532 UTC [chaincode] launchAndWaitForRegister -> DEBU 60c stopping due to error while launching Timeout expired while starting chaincode accounts:v0(networkid:dev,peerid:peer0.dfm.local.ubn.ae,tx:a0a6269fe0907264e4952b9c35709843ee04847382177db18527d3e75acf8b9a) 2018-02-10 16:36:16.532 UTC [container] lockContainer -> DEBU 60d waiting for container(dev-peer0.dfm.local.ubn.ae-accounts-v0) lock 2018-02-10 16:36:16.533 UTC [container] lockContainer -> DEBU 60e got container (dev-peer0.dfm.local.ubn.ae-accounts-v0) lock 2018-02-10 16:36:16.536 UTC [dockercontroller] stopInternal -> DEBU 60f Stop container dev-peer0.dfm.local.ubn.ae-accounts-v0(Container not running: dev-peer0.dfm.local.ubn.ae-accounts-v0) 2018-02-10 16:36:16.539 UTC [dockercontroller] stopInternal -> DEBU 610 Kill container dev-peer0.dfm.local.ubn.ae-accounts-v0 (API error (500): {"message":"Cannot kill container dev-peer0.dfm.local.ubn.ae-accounts-v0: Container 317eeae4c827a50e5afe08e96ab5070537394d8d558e315e7fcf9da6acd55019 is not running"} ) 2018-02-10 16:36:16.584 UTC [dockercontroller] stopInternal -> DEBU 611 Removed container dev-peer0.dfm.local.ubn.ae-accounts-v0 2018-02-10 16:36:16.584 UTC [container] unlockContainer -> DEBU 612 container lock deleted(dev-peer0.dfm.local.ubn.ae-accounts-v0) 2018-02-10 16:36:16.584 UTC [chaincode] func1 -> DEBU 613 chaincode accounts:v0 launch seq completed 2018-02-10 16:36:16.584 UTC [chaincode] Launch -> ERRO 614 launchAndWaitForRegister failed Timeout expired while starting chaincode accounts:v0(networkid:dev,peerid:peer0.dfm.local.ubn.ae,tx:a0a6269fe0907264e4952b9c35709843ee04847382177db18527d3e75acf8b9a) 2018-02-10 16:36:16.584 UTC [endorser] callChaincode -> DEBU 615 Exit 2018-02-10 16:36:16.584 UTC [endorser] simulateProposal -> ERRO 616 failed to invoke chaincode name:"lscc" on transaction a0a6269fe0907264e4952b9c35709843ee04847382177db18527d3e75acf8b9a, error: Timeout expired while starting chaincode accounts:v0(networkid:dev,peerid:peer0.dfm.local.ubn.ae,tx:a0a6269fe0907264e4952b9c35709843ee04847382177db18527d3e75acf8b9a) 2018-02-10 16:36:16.584 UTC [endorser] simulateProposal -> DEBU 617 Exit 2018-02-10 16:36:16.584 UTC [lockbasedtxmgr] Done -> DEBU 618 Done with transaction simulation / query execution [acbb0899-6c52-4aa1-ae78-aa5967359f3a] 2018-02-10 16:36:16.584 UTC [endorser] ProcessProposal -> DEBU 619 Exit ```

Amjadnz (Sat, 10 Feb 2018 16:41:57 GMT):
I tried with example_cc and it is working fine.

Amjadnz (Sat, 10 Feb 2018 16:41:57 GMT):
I tried with example_cc and it is the same issue there too.

Amjadnz (Sat, 10 Feb 2018 16:42:29 GMT):
But with my vendored chaincode - it has some issues.

Amjadnz (Sat, 10 Feb 2018 16:42:29 GMT):
So is with my vendored chaincode - seems to be some kind of issue with my crypto.

Amjadnz (Sat, 10 Feb 2018 16:43:09 GMT):
Still the ENV Variables for tls client key and part are not set while creating the container

Amjadnz (Sat, 10 Feb 2018 16:43:17 GMT):
I'm on v 1.0.5 now.

tittuvarghese (Sat, 10 Feb 2018 16:55:06 GMT):
Has joined the channel.

tittuvarghese (Sat, 10 Feb 2018 16:55:16 GMT):
Hey guys, Maybe this one is off topic. I'm trying to implement the Fabric Go SDK but I'm stuck at a point. I wanted to get block info, Like block height, Hash and all. Is there any way to get that info?

Amjadnz (Sat, 10 Feb 2018 21:38:58 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=pnfin4tev2yM7BbSo) - Also when I login to the container (docker run) - I cannot see all the certs in the fabric folder.

Amjadnz (Sat, 10 Feb 2018 21:39:21 GMT):
```root@1a54bcf7c8a5:/etc/hyperledger/fabric# pwd /etc/hyperledger/fabric```

Amjadnz (Sat, 10 Feb 2018 21:39:40 GMT):
```root@1a54bcf7c8a5:/etc/hyperledger/fabric# ls -ltr total 4 ---------- 1 root root 847 Jan 1 1970 peer.crt```

Amjadnz (Sun, 11 Feb 2018 05:17:11 GMT):
@Vadim - it turns out the vendor folder was the issue. I had disabled the vendor support (by removing the vendor folder) and disabling the code that were depending on the vendor support. And all code went fine.

Amjadnz (Sun, 11 Feb 2018 05:17:11 GMT):
@Vadim - it turns out the vendor folder was the issue. I had to disable the vendor support (by removing the vendor folder) and disable the code that were depending on the vendor support. And all code went fine.

Amjadnz (Sun, 11 Feb 2018 05:17:41 GMT):
Now with test cases in front of me - the code with vendor support is not working, where as without vendor support is going through.

Amjadnz (Sun, 11 Feb 2018 05:17:45 GMT):
Anyone faced this issue/

Amjadnz (Sun, 11 Feb 2018 05:17:45 GMT):
Anyone faced this issue?

ohmeraka (Sun, 11 Feb 2018 08:48:27 GMT):
Has joined the channel.

vitorqshr (Sun, 11 Feb 2018 21:14:49 GMT):
@tittuvarghese you mean the current block height or the height of the whole blockchain state?

tittuvarghese (Mon, 12 Feb 2018 04:48:06 GMT):
@vitorqshr Yes exactly.

argman (Mon, 12 Feb 2018 09:15:21 GMT):
Has left the channel.

Amjadnz (Mon, 12 Feb 2018 14:00:21 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=5c2TKrAxMsqG23rQa) - just to add to it - I'm using the below line to get the CERT for the invoking client `c, err := stub.GetCreator()`

Amjadnz (Mon, 12 Feb 2018 14:02:13 GMT):
And it gives me this error ```peer0.sca.ubn.ae | 2018-02-04 18:05:54.691 UTC [dev-peer0.sca.ubn.ae-uae-agm-cc-11-v0] func2 -> INFO 951 2018-02-04 18:05:54.691 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: Error trying to read file content : open : no such file or directory```

marek5050 (Mon, 12 Feb 2018 14:06:07 GMT):
Has joined the channel.

DongSuIBM (Mon, 12 Feb 2018 17:07:00 GMT):
Has joined the channel.

DongSuIBM (Mon, 12 Feb 2018 17:16:29 GMT):
Hello, I have one question on CreateTable in the Fabric shim. Has the CreateTable API been removed in the Fabric v1.1 shim? If so, is there any equivalent API in the Fabric v1.1 shim? I am now using the Fabric 1.1 binary, but I got compilation error when doing `go build` on the chaincode which is developed in Fabric v0.6. I got the following error `stub.CreateTable undefined (type shim.ChaincodeStubInterface has no field or method CreateTable)` Thank you!

jrrt (Tue, 13 Feb 2018 10:28:14 GMT):
Has joined the channel.

muralisr (Tue, 13 Feb 2018 14:47:56 GMT):
@DongSuIBM CreateTable has been removed for a while. There is no direct equivalent but using range queries and iterator functions you should be able to get the same functionality (but will let @dave.enyeart expand/correct).

dave.enyeart (Tue, 13 Feb 2018 14:57:40 GMT):
Tables were a misnomer in 0.6 since you could only query fields left to right rather than any column as you would expect from a table. The equivalent as of 1.0 is to utilize composite keys, which can be queried left to right in a similar way. See:

dave.enyeart (Tue, 13 Feb 2018 14:57:40 GMT):
@DongSuIBM Tables were a misnomer in 0.6 since you could only query fields left to right rather than any column as you would expect from a table. The equivalent as of 1.0 is to utilize composite keys, which can be queried left to right in a similar way. See:

dave.enyeart (Tue, 13 Feb 2018 14:57:41 GMT):
https://github.com/hyperledger/fabric-samples/blob/master/first-network/byfn.sh#L34-L63

dave.enyeart (Tue, 13 Feb 2018 14:58:03 GMT):
https://github.com/hyperledger/fabric/blob/release/core/chaincode/shim/interfaces.go#L114-L124

DongSuIBM (Tue, 13 Feb 2018 17:08:19 GMT):
@muralisr and @dave.enyeart Thanks for the answers and suggestions! I also find an example chaincode for using these new State operation APIs. https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/marbles02/marbles_chaincode.go#L419-L477.

sanchezl (Tue, 13 Feb 2018 17:24:04 GMT):
If I accidentally skipped deleting the chaincode containers when following the docs on upgrading the peer binaries (http://hyperledger-fabric.readthedocs.io/en/latest/upgrade_to_one_point_one.html#upgrade-peer-binaries), what is the proper procedure to do this after the fact? For example: Do I need to shut down the peer first, delete the chaincode container and then restart the peer OR do I simply delete the chaincode container without shutting down the peer?

muralisr (Tue, 13 Feb 2018 18:42:08 GMT):
@sanchezl you could simply delete the container...it should get rebuilt on the next proposal.

Koki_Sugawara (Wed, 14 Feb 2018 07:42:06 GMT):
Has joined the channel.

Koki_Sugawara (Wed, 14 Feb 2018 07:43:52 GMT):
Hi! how to deploy dynamically chaincode ?

shalinigpt (Wed, 14 Feb 2018 09:09:13 GMT):
Has joined the channel.

angelsuarez (Wed, 14 Feb 2018 11:16:02 GMT):
Has joined the channel.

masanchez (Wed, 14 Feb 2018 11:24:06 GMT):
Has joined the channel.

Ryan2 (Thu, 15 Feb 2018 06:48:26 GMT):
Has joined the channel.

eirlis (Thu, 15 Feb 2018 10:04:51 GMT):
Hi guys! Recently I've faced a problem that my chaincode is too 'heavy' to instantiate on multiple channels, and it takes really long time (with timeouts and so on) compile it. Maybe someone may suggest how to improve it or another solution?

eirlis (Thu, 15 Feb 2018 10:04:51 GMT):
Hi guys! Recently I've faced a problem that my chaincode is too 'heavy' to instantiate on multiple channels, and it takes really long time (with timeouts and so on) compile it. Maybe someone may suggest how to improve it or another solution? (Chaincode is written in Go and installed\instantiated via NodeJS SDK)

yacovm (Thu, 15 Feb 2018 10:06:00 GMT):
How much does the package weight?

yacovm (Thu, 15 Feb 2018 10:06:13 GMT):
Does it have lots of dependencies?

yacovm (Thu, 15 Feb 2018 10:06:54 GMT):
How much does the init method take to run? Is it computationally heavy? Does network io?

melwindmello (Thu, 15 Feb 2018 10:10:53 GMT):
Has joined the channel.

yacovm (Thu, 15 Feb 2018 10:13:19 GMT):
@eirlis ^

delphine (Thu, 15 Feb 2018 10:14:47 GMT):
Has joined the channel.

melwindmello (Thu, 15 Feb 2018 10:15:47 GMT):
Hello, I am trying to setup a custom network inline as shown in : https://hyperledger-fabric.readthedocs.io/en/release/build_network.html My Network has a Orderer and 2 Orgs having one peer each. I have been able to reach till the point of installing the chaincode. However, I am stuck at the step of Instantiating Chaincode (https://hyperledger-fabric.readthedocs.io/en/release/build_network.html#install-instantiate-chaincode) Command executed from cli: peer chaincode instantiate -o orderer.companyName.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/companyName.com/orderers/orderer.companyName.com/msp/tlscacerts/tlsca.companyName.com-cert.pem -C vehicletrackerchannel1 -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('ManufacturerOrg1MSP.member','DealerOrg1MSP.member','ServiceCenterOrg1MSP.member')" On checking docker ps -a (in another terminal), I can see that a new container is exiting with below logs: 018-02-14 14:28:08.260 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: context deadline exceeded Error starting Simple chaincode - Error trying to connect to local peer: context deadline exceeded. Stuck on this for this for the past couple days!!!

DmitryNovenkykh (Thu, 15 Feb 2018 10:44:15 GMT):
Has joined the channel.

eirlis (Thu, 15 Feb 2018 10:50:03 GMT):
@yacovm actually chaincode build is about 15Mb and contains some fabric default packages like shim and protobuf. But it also contains lots of, you know, parsing funcs for structs with about ~20 fields. I use balance-transfer network (a little bit modified to kafka) and it's nodejs scripts for installing\instantiating. Install goes fine (obviously) and during instantiation it takes up to 10 or more mins actually. Including retries.

yacovm (Thu, 15 Feb 2018 10:50:37 GMT):
Hmmm we have a timeout parameter in the config of the peer

yacovm (Thu, 15 Feb 2018 10:50:53 GMT):
In core.yaml

eirlis (Thu, 15 Feb 2018 11:00:01 GMT):
We've tried same and played around with timeout param (increasing\decreasing) but it did nothing. Maybe it's an SDK error, but I don't know if there any timeout params for peer inside the SDK itself

delphine (Thu, 15 Feb 2018 11:25:23 GMT):
B!55e55ur

yacovm (Thu, 15 Feb 2018 11:40:07 GMT):
@eirlis can you toggle this https://github.com/hyperledger/fabric/blob/master/sampleconfig/core.yaml#L410 to true

yacovm (Thu, 15 Feb 2018 11:40:10 GMT):
and see what is the output?

yacovm (Thu, 15 Feb 2018 11:40:13 GMT):
of the peer log

eirlis (Thu, 15 Feb 2018 11:51:28 GMT):
@yacovm thank you, I'll try it if there would be such problems again. I think we handled this situation it by increasing SDK timeout param :)

yacovm (Thu, 15 Feb 2018 11:57:49 GMT):
oh cool

MartinKrmer (Thu, 15 Feb 2018 14:33:48 GMT):
Has joined the channel.

Shivshankar (Fri, 16 Feb 2018 05:33:31 GMT):
Has joined the channel.

Shivshankar (Fri, 16 Feb 2018 05:35:04 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.

asadhayat (Fri, 16 Feb 2018 11:12:42 GMT):
I am trying to build a simple car tracking blockchain app on hyperledger fabric v1.0, much like IBM Carlease demo built back with v0.6. An overview of my app is - Manufacturer build the car and sell it to dealer - dealer sell it to user - user can use it throughout its life or can sell it to another user - Manufacturer can track all the cars they manufactured, from start to its current status - Dealer can only track the cars that he bought from various manufacturers to its current status. - User can only track car/s he bought, from its manufacturer to the user he sold to, but must not have access to view transactions afterwards. - And also there is a regulatory authority that can track any car from manufacturer to its current user. I am having trouble restricting user to view transactions that is performed after he sell the car to another user. How can i achieve this? And where can i implement these restrictions, in chaincode or SDK?

MartinKrmer (Fri, 16 Feb 2018 15:38:57 GMT):
Hi, what does define: type SimpleChaincode struct { } because I always get an error in my function because of it? 'cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start: *Info does not implement shim.Chaincode (wrong type for Init method) have Init(*shim.ChaincodeStub, string, []string) ([]byte, error) want Init(shim.ChaincodeStubInterface) peer.Response' at: '90,2' source: '' code: 'undefined'

KGiou (Fri, 16 Feb 2018 17:25:31 GMT):
@MartinKrmer SimpleChaincode collects all the data from your CC, its the main struct. To resolve the error just do what the error says. Instead of `Init(*shim.ChaincodeStub, string, []string) ([]byte, error)` write `Init(shim.ChaincodeStubInterface) peer.Response`

tmciver (Fri, 16 Feb 2018 20:46:13 GMT):
Has joined the channel.

tmciver (Fri, 16 Feb 2018 20:52:11 GMT):
Hey folks. This page: http://hyperledger-fabric.readthedocs.io/en/release/Fabric-FAQ.html says "Chaincode can be written in any programming language and executed in containers." Does this mean that I can right now write chaincode in any language or is it true only after support for that language has been added?

AnandBanik (Fri, 16 Feb 2018 21:15:37 GMT):
@tmciver as of now.....node, golang and *java(u have to build the container) is supported.

AnandBanik (Fri, 16 Feb 2018 21:21:14 GMT):
@asadhayat...need more details like, to which Org does the "user" or "buyer" belongs to....basically...u have to put 2 conditions....one to check the user's org (from cert) and if its the same org as the "user" belongs to, then the second condition is the compare it to the current owner of the car...PM me if u need more help with it

tmciver (Fri, 16 Feb 2018 21:53:08 GMT):
@AnandBanik How can one add support for their favorite language?

AnandBanik (Fri, 16 Feb 2018 22:03:36 GMT):
@tmciver you can raise a JIRA request @ https://jira.hyperledger.org/projects/FAB/

AnandBanik (Fri, 16 Feb 2018 22:04:01 GMT):
Out of curiosity....what's ur fav lang?

tmciver (Fri, 16 Feb 2018 22:04:29 GMT):
@AnandBanik Hyperledger is OSS, right? I could create a ticket but I also wanted to try my hand at implementing it.

tmciver (Fri, 16 Feb 2018 22:04:43 GMT):
I want to add support for Haskell.

tmciver (Fri, 16 Feb 2018 22:06:19 GMT):
I was hoping there was a wiki or something describing how this could be done. Otherwise, I'd need a bit of hand-holding - at least in the beginning.

AnandBanik (Fri, 16 Feb 2018 22:11:35 GMT):
@tmciver well...if your familiar with java....you can take a look at the java chaincode implementation and start from there

AnandBanik (Fri, 16 Feb 2018 22:11:36 GMT):
git clone https://gerrit.hyperledger.org/r/fabric-chaincode-java

AnandBanik (Fri, 16 Feb 2018 22:12:59 GMT):
Sorry....I don't know Haskell, so can't help you further

tmciver (Fri, 16 Feb 2018 22:13:03 GMT):
@AnandBanik Sure, that works.

tmciver (Fri, 16 Feb 2018 22:13:09 GMT):
Thanks!

tmciver (Fri, 16 Feb 2018 22:13:26 GMT):
Oops, bad link.

AnandBanik (Fri, 16 Feb 2018 22:14:36 GMT):
@tmciver ...its won't open in a browser maybe....you have to clone it in you local machine

tmciver (Fri, 16 Feb 2018 22:14:42 GMT):
https://gerrit.hyperledger.org/r/#/admin/projects/fabric-chaincode-java ?

tmciver (Fri, 16 Feb 2018 22:15:14 GMT):
I see.

tmciver (Fri, 16 Feb 2018 22:15:38 GMT):
Yup, it shows your link on the page I linked.

AnandBanik (Fri, 16 Feb 2018 22:15:57 GMT):
:thumbsup:

xhan2018 (Fri, 16 Feb 2018 22:30:22 GMT):
Has joined the channel.

tmciver (Sat, 17 Feb 2018 15:03:23 GMT):
@sanchezl Hello. I've been looking at the Java chaincode implementation and I see that you're one of the authors. I'm trying to educate myself so that I can create an implementation for another language (Haskell). I'm new to hyperledger and my main question at the moment is: what effects on the outside world is chaincode supposed to have? What part(s) of the Java implementation do this? Is it the `ChatStream` stuff? Also, are there docs that describe things at this level so that a dev could implement a new chaincode language?

M4rcelNo4ck (Sat, 17 Feb 2018 18:05:19 GMT):
Has joined the channel.

muralisr (Sat, 17 Feb 2018 21:30:23 GMT):
@tmciver at a high level, you'd create a new "platform" (see `fabric/core/chaincode/platforms`) for haskell. The most recent language implementation was `node` which could also serve as a good guide (see FAB-2331 and FAB-5371) in addition to java... `what effects on the outside world is chaincode supposed to have? ` - the stream support to the fabric's chaincode listener is the only external dependency. every other interaction - for example, with the ledger maintained by the fabric - is via that stream.

wbhagan (Sat, 17 Feb 2018 22:15:16 GMT):
Has joined the channel.

tmciver (Sat, 17 Feb 2018 22:17:03 GMT):
@muralisr Awesome! Thanks for the pointers.

kakuzu (Sun, 18 Feb 2018 00:34:08 GMT):
Has joined the channel.

JonathanJones (Sun, 18 Feb 2018 10:39:55 GMT):
Has joined the channel.

punit 4 (Sun, 18 Feb 2018 11:24:52 GMT):
Has joined the channel.

Thinh 2 (Sun, 18 Feb 2018 11:45:18 GMT):
Has joined the channel.

alexsvecencu (Sun, 18 Feb 2018 20:40:45 GMT):
Has joined the channel.

beylerian (Mon, 19 Feb 2018 05:43:57 GMT):
Has joined the channel.

vitiko (Mon, 19 Feb 2018 11:43:41 GMT):
Has joined the channel.

MartinKrmer (Mon, 19 Feb 2018 14:11:36 GMT):
Hi, I created my own chaincode and tested it in devmode, however, can someone tell me how to set the right path chaincode if you want to install it in a network?

tmciver (Mon, 19 Feb 2018 14:17:55 GMT):
@MartinKrmer I'm new to hyperledger so I can't help directly but have you tried following the instructions here: http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#install-instantiate-chaincode?

MartinKrmer (Mon, 19 Feb 2018 14:20:43 GMT):
well, yes but this example takes the chaincode from github.com which is not applicable to my case

tmciver (Mon, 19 Feb 2018 14:29:22 GMT):
@MartinKrmer What about the Node example just below the Go example? It seems to be installing from a local directory.

MartinKrmer (Mon, 19 Feb 2018 14:35:37 GMT):
Yes thanks, sorry I ignored everything regarding node

MartinKrmer (Mon, 19 Feb 2018 15:13:04 GMT):
Does someone know what could be the cause of this error: Error: Invalid policy OR ('Org0MSP.peer','Org1MSP.peer') ?

MartinKrmer (Mon, 19 Feb 2018 15:13:04 GMT):
Does someone know what could be the cause of this error: Error: Invalid policy OR ('Org0MSP.peer','Org1MSP.peer') ? This is the result when I try to instantiate my chaincode. My command:

MartinKrmer (Mon, 19 Feb 2018 15:13:04 GMT):
Does someone know what could be the cause of this error: Error: Invalid policy OR ('Org0MSP.peer','Org1MSP.peer') ? This is the result when I try to instantiate my chaincode. My command:

MartinKrmer (Mon, 19 Feb 2018 15:13:04 GMT):
Does someone know what could be the cause of this error: Error: Invalid policy OR ('Org0MSP.peer','Org1MSP.peer') ? This is the result when I try to instantiate my chaincode. My command: peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C phr -n msh -v 1.0 -c '{"Args":["init"]}' -P "OR ('Org0MSP.peer','Org1MSP.peer')"

silliman (Mon, 19 Feb 2018 15:29:27 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=jCEQ6gmsom3Lsc8cf) @MartinKrmer I suspect either your Org names are invalid, or, the code doesn't like using _peer_, that is, _Org0MSP.member_ might work better.

MartinKrmer (Mon, 19 Feb 2018 18:50:29 GMT):
Thank you @silliman I solved that issue. However, althhough my invoke init function worked in the devmode I face now this error: UTC [grpc] Printf -> DEBU 0cd grpc: addrConn.transportMonitor exits due to: context canceled when I try to invoke a new transaction. Could it be that the content is to big or how would you interpret it?

tmciver (Mon, 19 Feb 2018 19:12:00 GMT):
Apologies if this is not the correct channel to ask this but: is the chaincode language used by channel set for life? In other words, can the language used for chaincode be changed at some point?

tmciver (Mon, 19 Feb 2018 19:12:00 GMT):
Apologies if this is not the correct channel to ask this but: is the chaincode language used by a channel set for life? In other words, can the language used for chaincode be changed at some point?

silliman (Mon, 19 Feb 2018 19:15:12 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=dMmuQjPsMMnx5aapi) @MartinKrmer If all you are seeing is DEBUG messages but no errors than this may be noise. I believe these sorts of messages can occur if grpc connections are not terminated "cleanly", so it may be an indication of less than perfect teardown of a connection, but not necessarily a problem to worry about.

MartinKrmer (Mon, 19 Feb 2018 19:31:17 GMT):
Hm ok, but when I try read what I init I get this: Error: Error getting broadcast client: Error connecting to orderer.example.com:7050 due to rpc error: code = Internal desc = transport: write tcp 172.21.0.11:55134->172.21.0.5:7050: write: broken pipe

MartinKrmer (Mon, 19 Feb 2018 19:32:50 GMT):
@silliman do you think I have to change some parameter?

silliman (Mon, 19 Feb 2018 19:43:53 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=wehL2uCcD85KGgAnr) @MartinKrmer Okay, now that's a problem. I don't know the cause. I'd recommend looking at your orderer logs and if you can't figure it out or nobody else jumps in here to help, I suggest searching on StackOverflow with tag hyperledger-fabric or maybe opening up an issue there.

MartinKrmer (Mon, 19 Feb 2018 20:25:28 GMT):
@silliman I wonder could it be caused by the orderering service (solo)?

silliman (Mon, 19 Feb 2018 20:33:54 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=2Ti5oj8YNehEjMhfA) @MartinKrmer i doubt if it is due to solo. it could be a lot of different things. `broken pipe` is a pretty generic error that is being returned from the networking stack. Are you following one of the documented tutorials or are you working in a custom environment. It could be something specific to your network configuration.

MartinKrmer (Mon, 19 Feb 2018 20:35:50 GMT):
Well I first tried to combine custom network with custom chaincode, but then I decided to maybe use "first-network" as example network

MartinKrmer (Mon, 19 Feb 2018 20:36:22 GMT):
So I basically followed steps as I would use marbles02 chaincode

silliman (Mon, 19 Feb 2018 20:43:01 GMT):
@MartinKrmer Have you successfully run the _first-network_ tutorial, from start to finish, without modifications, on the same system on which you are now having the issue, in order to know that you have a baseline working environment? If not, I recommend doing so

MartinKrmer (Mon, 19 Feb 2018 20:43:33 GMT):
Yes yes I did so several days ago

silliman (Mon, 19 Feb 2018 20:51:57 GMT):
@MartinKrmer Ok, so _first-network_ runs with two organizations in a single Docker network inside a single server, using TLS... is this the same topology that your custom network uses?

douglasthiel (Mon, 19 Feb 2018 23:17:49 GMT):
ah, broken pipe. I have a one of those too when trying to invoke my chaincode for the first time. > 2018-02-19 23:14:18.697 UTC [grpc] Printf -> DEBU 0c6 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: failed to write window update: write tcp 172.18.0.18:46630->172.18.0.10:7050: write: broken pipe"; Reconnecting to {orderer.finixn.com:7050 }

douglasthiel (Mon, 19 Feb 2018 23:34:13 GMT):
looking at the orderer logs I see: > 2018-02-19 23:14:19.696 UTC [grpc] Printf -> DEBU 1c36 grpc: Server.Serve failed to complete security handshake from "172.18.0.18:46632": tls: first record does not look like a TLS handshake

douglasthiel (Mon, 19 Feb 2018 23:34:43 GMT):
which is weird because TLS is enabled on all my peers and orderer, sigh

yacovm (Mon, 19 Feb 2018 23:36:51 GMT):
that probably means a client tried to connect without TLS

yacovm (Mon, 19 Feb 2018 23:36:54 GMT):
@douglasthiel

douglasthiel (Mon, 19 Feb 2018 23:37:14 GMT):
which client?

yacovm (Mon, 19 Feb 2018 23:37:21 GMT):
no idea

yacovm (Mon, 19 Feb 2018 23:37:28 GMT):
172.18.0.18 ?

douglasthiel (Mon, 19 Feb 2018 23:37:43 GMT):
maybe, trying to inspect to find that one

douglasthiel (Mon, 19 Feb 2018 23:39:55 GMT):
would a dev-peer instance not have TLS enabled by default?

yacovm (Mon, 19 Feb 2018 23:40:21 GMT):
a dev-peer?

yacovm (Mon, 19 Feb 2018 23:40:33 GMT):
usually that's a prefix of a chaincode container

yacovm (Mon, 19 Feb 2018 23:40:41 GMT):
chaincode containers don't talk with orderers...

yacovm (Mon, 19 Feb 2018 23:40:48 GMT):
if they do, something is horrible wrong

yacovm (Mon, 19 Feb 2018 23:40:48 GMT):
if they do, something is horribly wrong

yacovm (Mon, 19 Feb 2018 23:41:01 GMT):
in your chaincode

yacovm (Mon, 19 Feb 2018 23:41:42 GMT):
it's pretty simple - either you use TLS everywhere, of you don't

yacovm (Mon, 19 Feb 2018 23:41:59 GMT):
if you use TLS in the peer, that means the chaincode also uses TLS

douglasthiel (Mon, 19 Feb 2018 23:43:05 GMT):
ok, and yes I'm talking about the prefix of a chaincode container

douglasthiel (Mon, 19 Feb 2018 23:43:26 GMT):
trying to rule out something there

douglasthiel (Mon, 19 Feb 2018 23:47:34 GMT):
Here are the rest of the error messages I'm getting after the one I posted above (looks like a cascade): > 2018-02-19 23:14:19.697 UTC [grpc] Printf -> DEBU 0c7 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF. Error: Error getting broadcast client: Error connecting to orderer.finixn.com:7050 due to rpc error: code = Internal desc = transport is closing 2018-02-19 23:14:19.698 UTC [grpc] Printf -> DEBU 0c8 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: operation was canceled"; Reconnecting to {orderer.finixn.com:7050 } 2018-02-19 23:14:19.699 UTC [grpc] Printf -> DEBU 0c9 grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing

douglasthiel (Mon, 19 Feb 2018 23:47:34 GMT):
Here are the rest of the error messages I'm getting after the one I posted above (looks like a cascade): > 2018-02-19 23:14:19.697 UTC [grpc] Printf -> DEBU 0c7 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF. Error: Error getting broadcast client: Error connecting to orderer.finixn.com:7050 due to rpc error: code = Internal desc = transport is closing > 2018-02-19 23:14:19.698 UTC [grpc] Printf -> DEBU 0c8 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: operation was canceled"; Reconnecting to {orderer.finixn.com:7050 } > 2018-02-19 23:14:19.699 UTC [grpc] Printf -> DEBU 0c9 grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing

yacovm (Mon, 19 Feb 2018 23:48:04 GMT):
you're using the peer CLI?

douglasthiel (Mon, 19 Feb 2018 23:48:08 GMT):
yes

yacovm (Mon, 19 Feb 2018 23:48:27 GMT):
are you using the --tls flag?

douglasthiel (Mon, 19 Feb 2018 23:48:34 GMT):
I mean, I using the peer CLI to run the scripts, if that's what you mean

yacovm (Mon, 19 Feb 2018 23:49:06 GMT):
and are you using the --cafile flag?

douglasthiel (Mon, 19 Feb 2018 23:49:29 GMT):
no, you got me

yacovm (Mon, 19 Feb 2018 23:49:52 GMT):
look at https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/scripts/script.sh for reference...

douglasthiel (Tue, 20 Feb 2018 00:04:53 GMT):
I got farther. > 2018-02-20 00:05:47.251 UTC [chaincodeCmd] InitCmdFactory -> INFO 0c5 Get chain(investorapplicationchannel) orderer endpoint: orderer.finixn.com:7050 > 2018-02-20 00:05:47.267 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 0c6 Using default escc > 2018-02-20 00:05:47.267 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 0c7 Using default vscc > 2018-02-20 00:05:47.269 UTC [msp/identity] Sign -> DEBU 0c8 Sign: plaintext: 0AD1070A7F08031A0C08DBCCADD40510...720A035061740A01470A054C796F6E73 > 2018-02-20 00:05:47.269 UTC [msp/identity] Sign -> DEBU 0c9 Sign: digest: 04CA22A58CB73580692973A2BAC8D6A107EF6BAF2933A96EE4E7465E60553DA3 > Error: Error endorsing invoke: rpc error: code = Unknown desc = Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) - I'm using: > CORE_CHAINCODE_STARTUPTIMEOUT=60000 If it makes any difference.

douglasthiel (Tue, 20 Feb 2018 00:12:13 GMT):
Is that error pointing to an issue with my chaincode? Or is this still an external to chaincode issue?

zajanksk (Tue, 20 Feb 2018 05:05:17 GMT):
Has joined the channel.

zajanksk (Tue, 20 Feb 2018 05:05:35 GMT):
hi guys, i have a question about chaincode what happens if RANDOM logic (like rand(100)) in the chaincode? As i know, Chaincode is each of peers and excute independently. So i think if the random method is chaincode, each peer has different value. Then they can't reach consensus. I think

mastersingh24 (Tue, 20 Feb 2018 11:27:21 GMT):
@zajanksk - chaincode is executed during the endorsement phase. Each endorsing peer runs the chaincode and if there is no error responds with a signed endorsement response. The endorsement response contains the actual state changes (they have not yet been committed) and the signature is over the entire response. After the transaction along with collected endorsements is sent to the orderer and then sent to the peers, each peer than validates the transaction. Part of the validation is to make sure that the transaction meets the endorsement policy. As part of this check, the peer makes sure that enough signatures were collected over the SAME response. So let's say the endorsement policy required 2 out of Org1,Org2,Org3. If peers from Org1,Org2 and Org3 all returned different results, then the transaction would not be committed. If the Org1 and Org2 return the same results, then the transaction would be committed

tomislav (Tue, 20 Feb 2018 15:41:01 GMT):
Has joined the channel.

douglasthiel (Tue, 20 Feb 2018 15:49:27 GMT):
so my chaincode is returning 200 OK. How are people debugging their chaincode? What approach to you use?

douglasthiel (Tue, 20 Feb 2018 15:49:27 GMT):
so my chaincode is returning 200 OK. How are people debugging their chaincode? What approach do you use?

yacovm (Tue, 20 Feb 2018 15:51:23 GMT):
unit tests?

douglasthiel (Tue, 20 Feb 2018 15:56:01 GMT):
Yes, I'm talking about running chaincode from the CLI to start. Then trying to understand how to look at the data. I'm looking into Fauxton at the moment but was hoping there was a println way of doing this too. I don't see any of my golang printlns in docker logs —since 5m orderer.domain.com so I'm wondering out loud

muralisr (Tue, 20 Feb 2018 19:38:24 GMT):
@douglasthiel adding `CORE_LOGGING_LEVEL=debug CORE_CHAINCODE_LOGGING_LEVEL=debug CORE_VM_DOCKER_ATTACHSTDOUT=true` to peer should get you the printlns into the peer's log

zajan.ksk (Wed, 21 Feb 2018 00:42:38 GMT):
Has joined the channel.

douglasthiel (Wed, 21 Feb 2018 02:29:13 GMT):
@muralisr Thanks, I'll give that a whirl.

DongkyuPark98 (Wed, 21 Feb 2018 06:48:39 GMT):
Has joined the channel.

janbols (Wed, 21 Feb 2018 08:09:03 GMT):
Has joined the channel.

donald86trung (Wed, 21 Feb 2018 14:10:01 GMT):
Has joined the channel.

douglasthiel (Wed, 21 Feb 2018 15:07:40 GMT):
@muralisr That worked. My printlns are showing up

novusopt (Wed, 21 Feb 2018 19:06:40 GMT):
Hi, is there any guideline how to structure the chaincode for high throughput? I used this approach https://github.com/hyperledger/fabric-samples/tree/release/high-throughput, but I am facing following issue: TxValidationCode_PHANTOM_READ_CONFLICT

novusopt (Wed, 21 Feb 2018 19:08:14 GMT):
I am trying to do some performance tests, but this approach is failing with 20 tps

novusopt (Wed, 21 Feb 2018 19:09:51 GMT):
I am wondering how performance tests have been conducted

jrosmith (Wed, 21 Feb 2018 19:41:19 GMT):
@novusopt it sounds like your read/write sets are conflicting: http://hyperledger-fabric.readthedocs.io/en/release/readwrite.html

novusopt (Wed, 21 Feb 2018 19:51:07 GMT):
@jrosmith yes, is there any guideline in order to avoid it...? I would like to run some performance tests.

jrosmith (Wed, 21 Feb 2018 19:53:04 GMT):
in order to avoid it you should not attempt to update a record before it has successfully been committed to the ledger. as of now commitment seems to be the bottleneck within fabric, with our systems we've noticed we can get ~3 txns/s reliably with the 1.0 build, there are promises of performance upgrades in 1.1

novusopt (Wed, 21 Feb 2018 19:56:51 GMT):
@jrosmith thx

marksta (Wed, 21 Feb 2018 19:57:12 GMT):
Has left the channel.

Er1ck (Wed, 21 Feb 2018 21:45:29 GMT):
Has joined the channel.

eugenluft (Wed, 21 Feb 2018 21:48:59 GMT):
Has joined the channel.

eugenluft (Wed, 21 Feb 2018 21:51:46 GMT):
@here Hi all, i´m trying to attach delve to a running chaincode process but it ends - unfortunately - with `could not launch process: decoding dwarf section info at offset 0x0: too short` Any idea? (Btw, it works with sample go-code. As soon as i add shim in main i get the error)

eugenluft (Wed, 21 Feb 2018 21:51:46 GMT):
Hi all, i´m trying to attach delve to a running chaincode process but it ends - unfortunately - with `could not launch process: decoding dwarf section info at offset 0x0: too short` Any idea? (Btw, it works with sample go-code. As soon as i add shim in main i get the error)

Asara (Wed, 21 Feb 2018 21:53:27 GMT):
Please don't use (@)here

Asara (Wed, 21 Feb 2018 21:53:40 GMT):
Just ask the question and you'll eventually get a response.

yacovm (Wed, 21 Feb 2018 21:55:44 GMT):
what do you mean by delve?

eugenluft (Wed, 21 Feb 2018 21:56:58 GMT):
the go debugger ;) And it make no differences between `dlv deploy`and `dlv attach`

yacovm (Wed, 21 Feb 2018 21:59:02 GMT):
hmm, the chaincode is running in a container though

yacovm (Wed, 21 Feb 2018 21:59:06 GMT):
perhaps it messes things up?

eugenluft (Wed, 21 Feb 2018 22:00:11 GMT):
no, not really. I have activated the dev mode and i see in my running process my invoke and query log statements.

eugenluft (Wed, 21 Feb 2018 22:00:55 GMT):
so there is no running docker container. (this will be the next step :-))

yacovm (Wed, 21 Feb 2018 22:01:37 GMT):
I don't know sorry

eugenluft (Wed, 21 Feb 2018 22:02:42 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ZC7ZW5ucgJAyADwTa) @yacovm Don´t worry about it ;)

tmciver (Thu, 22 Feb 2018 00:34:12 GMT):
For the *deploy* transactions described here: http://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html#transactions does the chaincode become part of the blockchain as Ethereum bytecode is added to the Ethereum blockchain?

tmciver (Thu, 22 Feb 2018 00:34:12 GMT):
For the _deploy_ transactions described here: http://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html#transactions does the chaincode become part of the blockchain as Ethereum bytecode is added to the Ethereum blockchain?

knagware9 (Thu, 22 Feb 2018 18:43:03 GMT):

Screenshot from 2018-02-23 00-10-24.png

knagware9 (Thu, 22 Feb 2018 18:43:31 GMT):
[2018-02-23 00:06:23.569] [DEBUG] Query - Successfully got the fabric client for the organization "Org1" [2018-02-23 00:06:23.569] [DEBUG] Helper - [NetworkConfig101.js]: getChannel - name mychannel [2018-02-23 00:06:23.569] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2018-02-23 00:06:23.569] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com [2018-02-23 00:06:23.570] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org3.example.com [2018-02-23 00:06:23.570] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com [2018-02-23 00:06:23.571] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2018-02-23 00:06:23.576] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid invoke function name.) at /home/kem/work/src/github.com/hyperledger/blockchain_rc/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 [2018-02-23 00:06:25.903] [INFO] Query - a now has Error: chaincode error (status: 500, message: Invalid invoke function name.) after the move ^[[1;2B

knagware9 (Thu, 22 Feb 2018 18:44:26 GMT):
[2018-02-22 23:35:46.495] [DEBUG] invoke-chaincode - Successfully got the fabric client for the organization "Org1" [2018-02-22 23:35:46.495] [DEBUG] Helper - [NetworkConfig101.js]: getChannel - name mychannel [2018-02-22 23:35:46.495] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2018-02-22 23:35:46.495] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com [2018-02-22 23:35:46.496] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org3.example.com [2018-02-22 23:35:46.496] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com [2018-02-22 23:35:46.497] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com [2018-02-22 23:35:46.497] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com [2018-02-22 23:35:46.497] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org3.example.com [2018-02-22 23:35:46.504] [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: Invalid invoke function name.) at /home/kem/work/src/github.com/hyperledger/blockchain_rc/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid invoke function name.) at /home/kem/work/src/github.com/hyperledger/blockchain_rc/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Invalid invoke function name.) at /home/kem/work/src/github.com/hyperledger/blockchain_rc/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15 [2018-02-22 23:35:51.478] [ERROR] invoke-chaincode - invoke chaincode proposal was bad [2018-02-22 23:35:51.478] [ERROR] invoke-chaincode - invoke chaincode proposal was bad [2018-02-22 23:35:51.478] [ERROR] invoke-chaincode - invoke chaincode proposal was bad [2018-02-22 23:35:51.478] [DEBUG] invoke-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-02-22 23:35:51.478] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Failed to send Proposal and receive all good ProposalResponse (node:9834) UnhandledPromiseRejectionWarning: Error: Failed to invoke chaincode. cause:Failed to send Proposal and receive all good ProposalResponse at Object.invokeChaincode (/home/kem/work/src/github.com/hyperledger/blockchain_rc/balance-transfer/app/invoke-transaction.js:179:9) at (node:9834) 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)

kakuzu (Thu, 22 Feb 2018 20:15:28 GMT):
Has left the channel.

zajan.ksk (Fri, 23 Feb 2018 01:15:18 GMT):
hey, guys. I want to know how to query in Ledger not just shim.getState() more complicate things. So i want to know GetQueryResult Method in shim interface, is there any usescase? not just document.

zajan.ksk (Fri, 23 Feb 2018 01:16:58 GMT):
And is it possible that query to Ledger in chaincode like MongoDB Query statement? (like find() or regex )

zajan.ksk (Fri, 23 Feb 2018 01:25:19 GMT):

Clipboard - 2018년 2월 23일 오전 10시 24분

zajan.ksk (Fri, 23 Feb 2018 01:26:35 GMT):
i saw the document about GetQueryResult(), but i don't know how to write query(parameter).

silliman (Fri, 23 Feb 2018 01:50:54 GMT):
@zajan.ksk You can find an example of GetQueryResult(), among other ledger interaction patterns, in `fabric/examples/chaincode/go/marbles02/marbles_chaincode.go`

zajan.ksk (Fri, 23 Feb 2018 02:32:00 GMT):
thanks @silliman. i have already read that but it is helpful.

zajan.ksk (Fri, 23 Feb 2018 02:36:02 GMT):
Then Is there a way to test chaincode without fabric network? It's to hard to test cause every time when i rewrite to code, i have done all process again like install and instantiate. is there other way to test chaincode more fast?

silliman (Fri, 23 Feb 2018 02:41:07 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=doPetiu2SYw4bdghq) @zajan.ksk I am not aware of anything faster than this: https://hyperledger-fabric.readthedocs.io/en/release/chaincode4ade.html

RodrigoAcosta (Fri, 23 Feb 2018 04:30:25 GMT):
Has joined the channel.

RodrigoAcosta (Fri, 23 Feb 2018 04:30:27 GMT):
hi all, I'm unable to install chaincode in node js, the peer install command with -l node flag is giving me Error: Error getting chaincode code chaincode: Failed to determine platform type: Unknown chaincodeType: NODE Peer version is 1.0.6, has support been disabled or I'm doing something wrong?

subbu165 (Fri, 23 Feb 2018 09:26:57 GMT):
configtx

KGiou (Fri, 23 Feb 2018 10:52:47 GMT):
@RodrigoAcosta v1.0.6 doesn't support node, but v1.1.0-alpha does

eugenluft (Fri, 23 Feb 2018 16:13:05 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=35XDKuYokywmhuHXr) Good news (more or less) It´s an OSX issue but it works as a charm with a headless vagrant and a headless delve debugging server together with Visual Code.

eugenluft (Fri, 23 Feb 2018 16:13:05 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=35XDKuYokywmhuHXr) Good news (more or less) It´s an OSX issue but it works as a charm with a headless vagrant (Ubuntu) and a headless delve debugging server together with Visual Code.

eugenluft (Fri, 23 Feb 2018 16:15:26 GMT):
this setup allows me now to debug my running cc with breakpoints

sisea.hu (Fri, 23 Feb 2018 16:53:52 GMT):
Has joined the channel.

malaxiangguo (Sat, 24 Feb 2018 05:48:00 GMT):
Has joined the channel.

yoko (Sun, 25 Feb 2018 01:35:34 GMT):
Has joined the channel.

yoko (Sun, 25 Feb 2018 01:50:39 GMT):
anyone know what this error means? happens after i submit a bunch of transactions ``` { "message": "Error: Error: Error trying to query business network. Error: 8 RESOURCE_EXHAUSTED: received trailing metadata size exceeds limit" } ```

jeffprestes (Sun, 25 Feb 2018 16:16:41 GMT):
Has joined the channel.

zajan.ksk (Mon, 26 Feb 2018 01:58:19 GMT):
hi, guys. I have a question. Is it possible to separate permission(authority) for each function of chaincode?

zajan.ksk (Mon, 26 Feb 2018 02:07:37 GMT):
For example, The tutorial Fabcar chaincode has several invoke method, User A has authority of queryCar and queryAllCars but can't generate transaction about changeCarOwner. is it possiple?

AnandBanik (Mon, 26 Feb 2018 02:17:15 GMT):
@zajan.ksk if i understand your question, you are asking for attribute-based access control. Its available in fabric 1.1 natively, but if you want to achieve the same in fabric 1.0, you will have to, for example, add an attribute like OU to the certificate and then pull the attribute value in your chaincode and use it for accessing or restricting certain methods.

RodrigoAcosta (Mon, 26 Feb 2018 02:18:06 GMT):
thanks @KGiou !

zajan.ksk (Mon, 26 Feb 2018 02:19:44 GMT):
@AnandBanik is it cid(Client Identity Chaincode Libaraty) you say?

AnandBanik (Mon, 26 Feb 2018 02:20:32 GMT):
yes....but its available in 1.1 only..for 1...you have to use GoLangs lib to get this value from the certificate

zajan.ksk (Mon, 26 Feb 2018 02:21:21 GMT):
oh, okay. thanks @AnandBanik

zajan.ksk (Mon, 26 Feb 2018 04:31:47 GMT):
what's the different between register and enroll? in the fabcar sample chaincode, there is no register admin process. but there is process to register and enroll step by step process when user1 settings

zajan.ksk (Mon, 26 Feb 2018 05:26:08 GMT):

Clipboard - 2018년 2월 26일 오후 2시 25분

zajan.ksk (Mon, 26 Feb 2018 05:27:02 GMT):
when i build abac.go chaincode, i got this error. i have built with fabric-ccenv.

zajan.ksk (Mon, 26 Feb 2018 05:27:25 GMT):
anyone knows ?

kapilAtrey (Mon, 26 Feb 2018 09:08:42 GMT):
Hi i was tryimg to implement the couchDB with marbles chaincode and tried running the following query _ peer chaincode query -C myc1 -n marbles -c '{"Args":["queryMarbles","{\"selector\":{\"docType\":{\"$eq\":\"marble\"},\"owner\":{\"$eq\":\"tom\"},\"size\":{\"$gt\":0}},\"fields\":[\"docType\",\"owner\",\"size\"],\"sort\":[{\"size\":\"desc\"}],\"use_index\":\"_design/indexSizeSortDoc\"}"]}'_ and in return i got this error in response _Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: http: read on closed response body) _ has anyone have any idea about it

kapilAtrey (Mon, 26 Feb 2018 09:08:42 GMT):
Hi i was tryimg to implement the couchDB with marbles chaincode and tried running the following query _ peer chaincode query -C myc1 -n marbles -c '{"Args":["queryMarbles","{\"selector\":{\"docType\":{\"$eq\":\"marble\"},\"owner\":{\"$eq\":\"tom\"},\"size\":{\"$gt\":0}},\"fields\":[\"docType\",\"owner\",\"size\"],\"sort\":[{\"size\":\"desc\"}]}"]}'_ and in return i got this error in response _Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: http: read on closed response body) _ has anyone have any idea about it

kapilAtrey (Mon, 26 Feb 2018 09:08:42 GMT):
Hi i was tryimg to implement the couchDB with marbles chaincode and tried running the following query _ peer chaincode query -C myc1 -n marbles -c '{"Args":["queryMarbles","{\"selector\":{\"docType\":{\"$eq\":\"marble\"},\"owner\":{\"$eq\":\"tom\"},\"size\":{\"$gt\":0}},\"fields\":[\"docType\",\"owner\",\"size\"],\"sort\":[{\"size\":\"desc\"}]}"]}'_ and in return i got this error in response _Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: http: read on closed response body) _ has anyone have any idea about it and one more thing i noticed that the sort and limit are not working

gen_el (Mon, 26 Feb 2018 09:24:53 GMT):
Hello Guys, what is the best practice or recommended project structure for a chaincode, with regards to managing models and invocation functions? I am coming from Hyperledger composer. Thanks

markthedark (Mon, 26 Feb 2018 11:11:07 GMT):
does the peer somehow cache old chaincodes? I'm trying to deploy a new version of my chaincode, but even if i clean old docker images and all, the chaincode deployed still has some old functions in it instead of new ones..

sakoula (Mon, 26 Feb 2018 13:11:54 GMT):
Has joined the channel.

sakoula (Mon, 26 Feb 2018 13:12:46 GMT):
Hello! Is there a way for the code to be aware of the peer that it is running on? (such as the GetCreator call for the proposal?) Thanks!

jtrayfield (Mon, 26 Feb 2018 18:03:02 GMT):
Hi, I'm having a problem with 1.0.5 - the chaincode starts and completes Init(), but the peer flags an error: 2018-02-26 16:41:29.126 UTC [escc] Invoke -> DEBU 44a ESCC starts: 8 args 2018-02-26 16:41:29.126 UTC [escc] Invoke -> DEBU 44b ESCC exits successfully 2018-02-26 16:41:29.127 UTC [shim] func1 -> DEBU 44c [1a028118]Transaction completed. Sending COMPLETED 2018-02-26 16:41:29.127 UTC [shim] func1 -> DEBU 44d [1a028118]Move state message COMPLETED 2018-02-26 16:41:29.127 UTC [shim] handleMessage -> DEBU 44e [1a028118]Handling ChaincodeMessage of type: COMPLETED(state:ready) 2018-02-26 16:41:29.127 UTC [shim] func1 -> DEBU 44f [1a028118]send state message COMPLETED 2018-02-26 16:41:29.127 UTC [chaincode] processStream -> DEBU 450 [1a028118]Received message COMPLETED from shim 2018-02-26 16:41:29.127 UTC [chaincode] HandleMessage -> DEBU 451 [1a028118]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready 2018-02-26 16:41:29.127 UTC [chaincode] HandleMessage -> DEBU 452 [1a028118da0294a4f218c97689c12ca51d1d161630e04ed8f012faf659679770]HandleMessage- COMPLETED. Notify 2018-02-26 16:41:29.127 UTC [chaincode] notify -> DEBU 453 notifying Txid:1a028118da0294a4f218c97689c12ca51d1d161630e04ed8f012faf659679770 2018-02-26 16:41:29.127 UTC [chaincode] Execute -> DEBU 454 Exit 2018-02-26 16:41:29.127 UTC [endorser] callChaincode -> DEBU 455 Exit 2018-02-26 16:41:29.127 UTC [endorser] endorseProposal -> DEBU 456 Exit 2018-02-26 16:41:29.127 UTC [lockbasedtxmgr] Done -> DEBU 457 Done with transaction simulation / query execution [2533f3e9-cef3-4a70-a4c6-d31957fa1655] 2018-02-26 16:41:29.127 UTC [endorser] ProcessProposal -> DEBU 458 Exit 2018-02-26 16:41:41.999 UTC [eventhub_producer] Chat -> ERRO 459 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-02-26 16:41:41.999 UTC [eventhub_producer] deRegisterHandler -> DEBU 45a deregistering event type: BLOCK error: 2018-02-26 16:41:41.999 UTC [eventhub_producer] Chat -> ERRO 459 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled this is RHEL 7. the same code run on osx (both on docker)

muralisr (Tue, 27 Feb 2018 02:39:35 GMT):
@zajan.ksk you need to vendor the package before deploying (its not part of fabric-ccenv)

muralisr (Tue, 27 Feb 2018 02:40:48 GMT):
@sakoula currently the "peer context" is not passed to the chaincode

muralisr (Tue, 27 Feb 2018 02:41:38 GMT):
@jtrayfield the error is from the events subsystem .. could be because the client side stopped for some reason (just guessing)

ghindle (Tue, 27 Feb 2018 04:32:54 GMT):
Has joined the channel.

debutinfotech (Tue, 27 Feb 2018 05:54:14 GMT):
Has joined the channel.

sakoula (Tue, 27 Feb 2018 05:57:53 GMT):
@muralisr is this something that will be included in future releases?

kapilAtrey (Tue, 27 Feb 2018 06:43:21 GMT):
hi all i was trying to use couchDB for my use case but sort and limit are not working can anyone help

kapilAtrey (Tue, 27 Feb 2018 06:43:42 GMT):

NOtWorkingMarbleExactQuery.png

kapilAtrey (Tue, 27 Feb 2018 06:43:42 GMT):

NOtWorkingMarbleExactQuery.png

kapilAtrey (Tue, 27 Feb 2018 06:44:40 GMT):

workingWithoutSort.png

kapilAtrey (Tue, 27 Feb 2018 06:53:20 GMT):
now i came to know that i need to store indexes in the couchDB so is there any standard way of doing this or i can simply use curl

zajan.ksk (Tue, 27 Feb 2018 08:16:16 GMT):
anybody here?

zajan.ksk (Tue, 27 Feb 2018 08:19:36 GMT):
how retrieve the invoker of chaincode in the chaincode?

zajan.ksk (Tue, 27 Feb 2018 08:20:38 GMT):
i use the CID(Attribute based access control), but the getID and getMSPID is hard to know who is.

zajan.ksk (Tue, 27 Feb 2018 08:21:16 GMT):
is there any way to configure the invoker's id.name(like admin) ?

jrosmith (Tue, 27 Feb 2018 13:43:30 GMT):
@zajan.ksk you can access the common name of the certificate: https://hastebin.com/arisikaleg.go

cuevrob (Tue, 27 Feb 2018 15:47:34 GMT):
Has joined the channel.

debutinfotech (Tue, 27 Feb 2018 15:51:35 GMT):
What is the difference between user & a peer in cryto-config.yaml file?

ArvsIndrarys (Tue, 27 Feb 2018 16:17:24 GMT):
@debutinfotech I think the peer defines the number of peers (validators or not) and the users define the number of clients. At least that is how I used it

debutinfotech (Tue, 27 Feb 2018 16:55:54 GMT):
@ArvsIndrarys I think the orderer is the validator?

ArvsIndrarys (Tue, 27 Feb 2018 16:58:43 GMT):
`validate` means several things : not all peers validate that transactions are ok. The one doing it are the peer validators. And orderers participate in the consensus, so they are an other kind of 'validators', the way that I see things

debutinfotech (Tue, 27 Feb 2018 17:00:26 GMT):
@ArvsIndrarys I have personally messaged you.

debutinfotech (Tue, 27 Feb 2018 17:00:30 GMT):
Can you see it?

TBiehn (Tue, 27 Feb 2018 17:49:43 GMT):
Has joined the channel.

TBiehn (Tue, 27 Feb 2018 17:50:19 GMT):
Hey folks - where can I find patterns for AuthN/AuthZ in chaincode - are system chaincodes my best resource?

parsiya (Tue, 27 Feb 2018 18:05:39 GMT):
Has joined the channel.

CodeReaper (Tue, 27 Feb 2018 19:06:56 GMT):
Hi, what is the purpose of chaincode packing?

0xSEGFAULT (Tue, 27 Feb 2018 22:43:48 GMT):
Has joined the channel.

0xSEGFAULT (Tue, 27 Feb 2018 22:45:21 GMT):
is there a way to remove existing chaincodes for dev purposes? I've been playing around with the samples for a while and I was wondering where they are being stored? what path? I found a reference to /var/hyperledger but it's empty. Thanks!

debutinfotech (Wed, 28 Feb 2018 04:47:55 GMT):
@here Does anyone implemented HyperLedger Fabric & Chaincode in Java?

debutinfotech (Wed, 28 Feb 2018 06:17:05 GMT):
What is Endorser, Committer & Consenters? What are their roles?

debutinfotech (Wed, 28 Feb 2018 06:17:09 GMT):
@here

DarshanBc (Wed, 28 Feb 2018 06:17:47 GMT):
@debutinfotech can you please stop using here

DarshanBc (Wed, 28 Feb 2018 06:19:23 GMT):
@debutinfotech post your questions but don't use here it notifies everyone

debutinfotech (Wed, 28 Feb 2018 06:19:30 GMT):
Ok

debutinfotech (Wed, 28 Feb 2018 06:19:33 GMT):
Thanks

debutinfotech (Wed, 28 Feb 2018 06:19:40 GMT):
Do you have answer for my question?

DarshanBc (Wed, 28 Feb 2018 06:20:10 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=zBhAybxxfc2ScvN6b) @debutinfotech No

DarshanBc (Wed, 28 Feb 2018 06:20:59 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=8FTXGFbFxmeLKPnN5) @debutinfotech go through this doc https://hyperledger-fabric.readthedocs.io/en/release/

chandrakanthm (Wed, 28 Feb 2018 09:52:43 GMT):
Has joined the channel.

chandrakanthm (Wed, 28 Feb 2018 10:17:01 GMT):
Hello, I am working on fabric composer for a POC in which i need to implement assetB in an assetA while both assets have different owners . How can we write .ACL for such implementation? I have tried by Denying owner of assetA to modify assetB but as assetB is part of assetA he can able to bypass that rule and able to modify assetB which is present in assetA.

akshay.lawange (Wed, 28 Feb 2018 11:04:22 GMT):
Hi..Getting error while running network for chaincode instantiation. is there any change docker-compose files for fabric 1.1.0-preview or alpha?

akshay.lawange (Wed, 28 Feb 2018 11:04:34 GMT):

Clipboard - February 28, 2018 4:34 PM

MonnyClara (Wed, 28 Feb 2018 13:11:34 GMT):
Has joined the channel.

jrosmith (Wed, 28 Feb 2018 13:56:54 GMT):
@debutinfotech please do not use @ here. it pings every on the channel. you spammed several different channels, pinging over 5000 people overnight.

0xSEGFAULT (Wed, 28 Feb 2018 20:10:42 GMT):
Is there a way to handle a network reset? What happens if the machine running the docker containers fails for some reason? Currently, I have to reset the whole system and I lose everything. Obviously, that won't work for a production env.

0xSEGFAULT (Wed, 28 Feb 2018 20:11:26 GMT):
When I try to bring down the docker containers and bring them back up the whole thing crashes. It can't seem to reconnect. I added volumes to each of the containers.

0xSEGFAULT (Wed, 28 Feb 2018 20:11:37 GMT):
```version: '2' services: orderer: container_name: orderer image: hyperledger/fabric-orderer:x86_64-1.0.6 environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LISTENADDRESS=orderer - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=orderer.block - ORDERER_GENERAL_LOCALMSPID=DEFAULT - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp - GRPC_TRACE=all=true, - GRPC_VERBOSITY=debug working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer volumes: - ./msp:/etc/hyperledger/msp - ./orderer.block:/etc/hyperledger/fabric/orderer.block - /home/ubuntu/peer0:/var/hyperledger/production ports: - 7050:7050 peer: container_name: peer image: hyperledger/fabric-peer:x86_64-1.0.6 environment: - CORE_PEER_ID=peer - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp - /home/ubuntu/peer0:/var/hyperledger/production working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start --peer-chaincodedev=true -o orderer:7050 ports: - 7051:7051 - 7053:7053 depends_on: - orderer chaincode: container_name: chaincode image: hyperledger/fabric-ccenv:x86_64-1.0.6 tty: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=example02 - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp working_dir: /opt/gopath/src/chaincode command: /bin/bash -c 'sleep 6000000' volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp - ./../chaincode:/opt/gopath/src/chaincode - /home/ubuntu/peer0:/var/hyperledger/production depends_on: - orderer - peer cli: container_name: cli image: hyperledger/fabric-tools:x86_64-1.0.6 tty: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=cli - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp working_dir: /opt/gopath/src/chaincodedev command: /bin/bash -c './script.sh' volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp - ./../chaincode:/opt/gopath/src/chaincodedev/chaincode - ./:/opt/gopath/src/chaincodedev/ - /home/ubuntu/peer0:/var/hyperledger/production depends_on: - chaincode - orderer - peer ```

SashiKanth (Thu, 01 Mar 2018 10:23:27 GMT):
Has joined the channel.

SashiKanth (Thu, 01 Mar 2018 10:24:00 GMT):
does fabric v1.1.0-alpha support chaincodes in java

SashiKanth (Thu, 01 Mar 2018 10:24:13 GMT):
i mean can i write chaincodes in java

wlahti (Thu, 01 Mar 2018 16:08:53 GMT):
@SashiKanth Not yet. Follow this JIRA to stay up to date on its progress: https://jira.hyperledger.org/browse/FAB-8063

jrosmith (Thu, 01 Mar 2018 16:16:14 GMT):
@akshay.lawange the error being returned is from not being able to find the dependencies for your chaincode. you need to vendor your dependencies

SKDHANUKA (Thu, 01 Mar 2018 17:20:55 GMT):
Has joined the channel.

muralisr (Thu, 01 Mar 2018 17:27:23 GMT):
@jrosmith although its complaining of protos/peer ...shouldn't have to vendor that as its in the ccenv ( chaincode_example02 has it and works without need to vendor). something else is happening I think

SethiSaab (Thu, 01 Mar 2018 19:13:25 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

jrosmith (Thu, 01 Mar 2018 19:16:16 GMT):
@SethiSaab this is probably a better question for #fabric-sdk-node or #fabric-questions, but it looks like your server isnt running.

ArnabChatterjee (Fri, 02 Mar 2018 01:31:35 GMT):
Dear Fabric Experts. I am inviting you to please review my document on Chaincode writing guidelines. https://github.com/arnabkaycee/fabric-tools. Please feel free to comment and let me know your feedback. Thank you.

longphan (Fri, 02 Mar 2018 04:30:58 GMT):
Has joined the channel.

yacovm (Fri, 02 Mar 2018 07:58:06 GMT):
\[ {1}\frac{2} \]

codestone (Fri, 02 Mar 2018 10:12:49 GMT):
Has joined the channel.

codestone (Fri, 02 Mar 2018 10:14:24 GMT):
Hello everyone! when i instantiate myself chaincode, it return "Promise is rejected: Error: 2 UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# jd-ca/vendor/golang.org/x/sys/unix"

codestone (Fri, 02 Mar 2018 10:15:32 GMT):
Just like this link http://slack-archive.hyperledger.org/html/chaincode.html

codestone (Fri, 02 Mar 2018 10:15:39 GMT):
as lbonniot says

codestone (Fri, 02 Mar 2018 10:16:38 GMT):
is some body have the same error with me?

asadhayat (Fri, 02 Mar 2018 10:58:31 GMT):
Can i update or delete key from world state, in GO chaincode??

janbols (Fri, 02 Mar 2018 11:01:41 GMT):
@ArnabChatterjee , I'm just starting to know fabric and took a look at your guidelines. They look good to me. The only thing I'm not sure is the deterministic thing. You only need to be deterministic between different endorsing peers for the duration of the transaction. This means you can rely on external services as long as they give the same response to all endorsing peers during that limited timeframe. Correct me if I'm completely wrong in my assumptions.

SashiKanth (Fri, 02 Mar 2018 11:53:45 GMT):
does fabric v1.1.0-rc1 support chaincode in nodejs

ArnabChatterjee (Fri, 02 Mar 2018 12:07:21 GMT):
@janbols - Thank you for your time. Yes, you can rely on an (*TRUSTED*) external service as long as it returns same value to all the endorsing peers. The reason why I bolded out the TRUST is that on a contradictory opinion, blockchains are solutions applied, where there is absolute lack of trust. :wink:

ArnabChatterjee (Fri, 02 Mar 2018 12:07:21 GMT):
@janbols - Thank you for your time. Yes, you can rely on an *TRUSTED* external service as long as it returns same value to all the endorsing peers. The reason why I bolded out the TRUST is that on a contradictory opinion, blockchains are solutions applied, where there is absolute lack of trust. :wink:

tom.appleyard (Fri, 02 Mar 2018 15:42:01 GMT):
Does anyone have experience using this: https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode

tom.appleyard (Fri, 02 Mar 2018 15:42:13 GMT):
I'm trying to mock call some chaincode that would be on another channel

tom.appleyard (Fri, 02 Mar 2018 15:42:27 GMT):
But so far this isn't working, does anyone have an example of working code?

jrosmith (Fri, 02 Mar 2018 15:59:19 GMT):
@asadhayat yes, using `PutState` or `DelState`

yghazi (Fri, 02 Mar 2018 16:02:40 GMT):
Has joined the channel.

igetgames (Fri, 02 Mar 2018 17:38:25 GMT):
Has joined the channel.

gen_el (Fri, 02 Mar 2018 18:05:27 GMT):
Can how do i package external packages along with chaincode app?

gen_el (Fri, 02 Mar 2018 18:06:25 GMT):
As they are not found in the container's $GOPATH

saritta3 (Fri, 02 Mar 2018 20:22:26 GMT):
Has joined the channel.

saritta3 (Fri, 02 Mar 2018 20:22:32 GMT):
Hi all...looking for devs to join our team www.trustabit.io if interested contact me at saritta@trustabit.io We are in the last stages of working out a joint venture deal with a tier 1 US well known airline

lsbardel (Sat, 03 Mar 2018 10:57:21 GMT):
Has joined the channel.

vmuravyev (Sat, 03 Mar 2018 11:39:10 GMT):
Has joined the channel.

brendonakay (Sat, 03 Mar 2018 14:31:17 GMT):
Has joined the channel.

CodeReaper (Sun, 04 Mar 2018 16:14:54 GMT):
Hi, I went through the high throughput chaincode in fabric samples and I dont understand the how prunesafe safer than prunefast when the transaction itself is atomic, will either commit fully or will be rejected all together.

CodeReaper (Sun, 04 Mar 2018 16:14:54 GMT):
Hi, I went through the high throughput chaincode in fabric samples and I dont understand the how prunesafe is safer than prunefast when the transaction itself is atomic, will either commit fully or will be rejected all together.

basudev070893 (Mon, 05 Mar 2018 08:46:59 GMT):
Has joined the channel.

CodeReaper (Mon, 05 Mar 2018 14:05:30 GMT):
Hi, I went through the high throughput chaincode in fabric samples and I dont understand the how prunesafe is safer than prunefast when the transaction itself is atomic, will either commit fully or will be rejected all together.

tom.appleyard (Mon, 05 Mar 2018 15:00:01 GMT):
Hey All, Does anyone have any experience in using chaincode with local dependencies, say I have (on my local machine) this: ``` src \ common cc1 cc2 ``` Both `cc1` and `cc2` (both chaincode apps) use libraries in common, however when I go to instantiate them, I get this error: ``` Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for common: : failed with error: "exit status 1" can't load package: package commonLib: cannot find package "common" in any of: /opt/go/src/common (from $GOROOT) /opt/gopath/src/common (from $GOPATH) ``` How do I ensure that `common` is included?

tom.appleyard (Mon, 05 Mar 2018 15:00:01 GMT):
Hey All, Does anyone have any experience in using chaincode with local dependencies, say I have (on my local machine) this: ``` src \ common cc1 cc2 ``` Both `cc1` and `cc2` (both chaincode apps) use libraries in common, however when I go to instantiate them, I get this error: ``` Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for common: : failed with error: "exit status 1" can't load package: package commonLib: cannot find package "common" in any of: /opt/go/src/common (from $GOROOT) /opt/gopath/src/common (from $GOPATH) ``` How do I ensure that `common` is included? Thanks!

tom.appleyard (Mon, 05 Mar 2018 15:00:01 GMT):
Hey All, Does anyone have any experience in using chaincode with local dependencies, say I have (on my local machine) this: ```src \ common cc1 cc2 ``` Both `cc1` and `cc2` (both chaincode apps) use libraries in common, however when I go to instantiate them, I get this error: ```Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for common: : failed with error: "exit status 1" can't load package: package commonLib: cannot find package "common" in any of: /opt/go/src/common (from $GOROOT) /opt/gopath/src/common (from $GOPATH) ``` How do I ensure that `common` is included? Thanks!

tom.appleyard (Mon, 05 Mar 2018 15:02:28 GMT):
Quick follow up question on a similar note, where _is_ is the code on the peer? I was under the impression it was in `/var/hyperledger/production/chaincodes/` but these appear to be binaries...

tom.appleyard (Mon, 05 Mar 2018 15:02:28 GMT):
Quick follow up question on a similar note, where _is_ is the code on the peer? (after you run `peer chaincode install` I was under the impression it was in `/var/hyperledger/production/chaincodes/` but these appear to be binaries...

tom.appleyard (Mon, 05 Mar 2018 15:02:28 GMT):
Quick follow up question on a similar note, where _is_ is the code on the peer? (after you run `peer chaincode install`) I was under the impression it was in `/var/hyperledger/production/chaincodes/` but these appear to be binaries...

jeffprestes (Mon, 05 Mar 2018 15:21:02 GMT):
@tom.appleyard how is your import statement at top of your .go source files at cc1 and cc2? Would you mind to share a code snippet with us in order to help you?

tom.appleyard (Mon, 05 Mar 2018 15:21:40 GMT):
@jeffprestes ``` import ( "commonLib" "encoding/json" "fmt" "strconv" "strings" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) ```

tom.appleyard (Mon, 05 Mar 2018 15:21:40 GMT):
@jeffprestes ```import ( "commonLib" "encoding/json" "fmt" "strconv" "strings" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) ```

jeffprestes (Mon, 05 Mar 2018 15:24:44 GMT):
What if @tom.appleyard you change your directory name from common to commonLib ?

jeffprestes (Mon, 05 Mar 2018 15:24:51 GMT):
Could you try?

tom.appleyard (Mon, 05 Mar 2018 15:25:06 GMT):
sorry, that's a typo - it is called `common`

jeffprestes (Mon, 05 Mar 2018 15:27:18 GMT):
"commonLib" --> "common" ?

tom.appleyard (Mon, 05 Mar 2018 15:27:29 GMT):
yes

jeffprestes (Mon, 05 Mar 2018 15:36:07 GMT):
And after fix this typo, does it work?

jeffprestes (Mon, 05 Mar 2018 15:38:40 GMT):
In general @tom.appleyard in Go Applications your source stay at: $GOPATH/src/<>/<>/ and then you have your packages.

jeffprestes (Mon, 05 Mar 2018 15:39:34 GMT):
In projects for instance I have: $GOPATH/src/bitbucket.org/novatrix/lawchaincode/

jeffprestes (Mon, 05 Mar 2018 15:40:18 GMT):
Then, for instance, my imports are: ```import "bitbucket.org/novatrix/lawchaincode/common"```

jeffprestes (Mon, 05 Mar 2018 15:40:43 GMT):
And at my code I use: ```common.MyFunction()```

tom.appleyard (Mon, 05 Mar 2018 15:41:15 GMT):
@jeffprestes Managed to fix the issue, basically issue was a bit what you are saying - issues with things not being in the gopath

tom.appleyard (Mon, 05 Mar 2018 15:41:19 GMT):
but thanks!

jeffprestes (Mon, 05 Mar 2018 15:41:34 GMT):
Anytime ;)

tom.appleyard (Mon, 05 Mar 2018 15:41:39 GMT):
On a somewhat related note

tom.appleyard (Mon, 05 Mar 2018 15:41:42 GMT):
I was under the impression it was in `/var/hyperledger/production/chaincodes/` but these appear to be binaries

tom.appleyard (Mon, 05 Mar 2018 15:41:42 GMT):
I was under the impression go code on the peer was in `/var/hyperledger/production/chaincodes/` but these appear to be binaries

tom.appleyard (Mon, 05 Mar 2018 15:41:56 GMT):
Do you know where the go code is actually copied to in the peer container?

jeffprestes (Mon, 05 Mar 2018 15:42:32 GMT):
TBH, I am not sure.

tom.appleyard (Mon, 05 Mar 2018 15:43:13 GMT):
:/

tom.appleyard (Mon, 05 Mar 2018 15:43:32 GMT):
no worries, thanks a lot for the help anyway!

tom.appleyard (Mon, 05 Mar 2018 15:43:42 GMT):
(incidentally if anyone knows the answer to this I'd be grateful!)

CodeReaper (Mon, 05 Mar 2018 17:03:18 GMT):
@tom.appleyard Look for govendor.

CodeReaper (Mon, 05 Mar 2018 17:03:53 GMT):
Helps in packaging of your packages, custom or externally available

CodeReaper (Mon, 05 Mar 2018 17:03:53 GMT):
Helps in packaging of your golang packages, custom or externally available

muralisr (Mon, 05 Mar 2018 17:23:08 GMT):
@tom.appleyard `Do you know where the go code is actually copied to in the peer container?` - the actual code is not copied to the container. A chaincode exe is built and copied to the container

CodeReaper (Mon, 05 Mar 2018 21:57:46 GMT):
[ ](https://chat.hyperledger.org/channel/chaincode-dev?msg=ftsMfoinhBxe87gtS) Hi, any thoughts on this?

tom.appleyard (Tue, 06 Mar 2018 08:35:54 GMT):
@muralisr I've since been told that what's in `/var/hyperledger/production/chaincodes/` are chaincode deploy specs, is this not the case? Who does the building of the code, is it built then sent to the peer or does the peer build it?

frankz (Tue, 06 Mar 2018 10:51:23 GMT):
Has joined the channel.

muralisr (Tue, 06 Mar 2018 12:14:06 GMT):
@tom.appleyard the binary under `/var/hyperledger/production/chaincodes/` is the chaincode deployment spec. It is sent to the peer. The exe is built by the peer using the deployment spec

jeffprestes (Tue, 06 Mar 2018 12:27:27 GMT):
@muralisr so, Fabric nodes only executes an exe. Is that correct?

muralisr (Tue, 06 Mar 2018 12:27:50 GMT):
correct

jeffprestes (Tue, 06 Mar 2018 12:30:24 GMT):
So, just to confirm the entire process: I can compile the chaincode externally - in test or developer machine - and then deploy it to this folder ```/var/hyperledger/production/chaincodes/``` and done, It will work. Is that correct?

muralisr (Tue, 06 Mar 2018 12:31:09 GMT):
correct

jeffprestes (Tue, 06 Mar 2018 12:31:56 GMT):
Thank you very much @muralisr

muralisr (Tue, 06 Mar 2018 12:32:10 GMT):
anytime @jeffprestes

nirro (Tue, 06 Mar 2018 13:43:26 GMT):
Has joined the channel.

NikolaSologub (Tue, 06 Mar 2018 14:48:13 GMT):
Has joined the channel.

pd93 (Tue, 06 Mar 2018 14:58:40 GMT):
Has joined the channel.

pd93 (Tue, 06 Mar 2018 15:00:14 GMT):
When using `dep` as a vendoring tool for my chaincode, do I need to commit my `vendor` folder so that it is copied into the container with my other files? Or is Fabric smart enough to detect the `Gopkg…` files and run dep itself?

jeffprestes (Tue, 06 Mar 2018 17:04:24 GMT):
If I understood correctly @pd93 , based on @muralisr explanation, Fabric only see the executable file. So your dependencies are only needed at compile time not at execution time.

rjones (Tue, 06 Mar 2018 17:12:39 GMT):
Room name changed to: fabric-chaincode-dev by rjones

rjones (Tue, 06 Mar 2018 17:12:51 GMT):
dave.enyeart

tom.appleyard (Tue, 06 Mar 2018 17:14:22 GMT):
@muralisr if `/var/hyperledger/production/chaincodes/` are binaries, where can I find the chaincode deployment specs? (thanks!)

hendry19901990 (Tue, 06 Mar 2018 17:15:43 GMT):
Anyone know how to use the interface ChaincodeStub.GetStateByPartialCompositeKey

hendry19901990 (Tue, 06 Mar 2018 17:15:46 GMT):
?

tom.appleyard (Tue, 06 Mar 2018 17:24:30 GMT):
@achenette ```resultsIterator, err := stub.GetStateByPartialCompositeKey("type~location~value", []string{"key1", "key2"}) defer resultsIterator.Close() var i int for i = 0; resultsIterator.HasNext(); i++ { responseRange, err := resultsIterator.Next() _, compositeKeyParts, err := stub.SplitCompositeKey(responseRange.Key) } ```

achenette (Tue, 06 Mar 2018 17:24:30 GMT):
Has joined the channel.

tom.appleyard (Tue, 06 Mar 2018 17:25:17 GMT):
In the above say you had a composite key with the structure `type~location~value`, you can use each key to narrow it down

tom.appleyard (Tue, 06 Mar 2018 17:25:45 GMT):
e.g. "all records of type x with any location or value" or "all records of type y in location b with any value"

tom.appleyard (Tue, 06 Mar 2018 17:25:52 GMT):
(you can only filter in order)

hendry19901990 (Tue, 06 Mar 2018 17:26:50 GMT):
:thumbsup:

muralisr (Tue, 06 Mar 2018 17:43:19 GMT):
@jeffprestes @tom.appleyard I didn't mean to imply the chaincode under /var/hyperledger/production/chaincodes are "exe" binaries. They _are_ deployment spec (per the earlier comment ` the binary under /var/hyperledger/production/chaincodes/ is the chaincode deployment spec. It is sent to the peer. The exe is built by the peer using the deployment spec`)

muralisr (Tue, 06 Mar 2018 17:45:16 GMT):
I think the confusion - a bit my fault - was in interpreting your comment `So, just to confirm the entire process: I can compile the chaincode externally - in test or developer machine - and then deploy it to this folder ` @jeffprestes ....from the contexted, I assumed "compile the chaincode externally" to mean generate the deployment spec

jeffprestes (Tue, 06 Mar 2018 17:46:41 GMT):
Oh, I see @muralisr , thank you very much for your detailed explanation

muralisr (Tue, 06 Mar 2018 17:46:47 GMT):
(sorry about that)

dave.enyeart (Tue, 06 Mar 2018 20:02:19 GMT):
muralisr

mohebz (Wed, 07 Mar 2018 07:53:58 GMT):
Has joined the channel.

mohebz (Wed, 07 Mar 2018 08:01:16 GMT):
Hi everyone, I'm new to Fabric. Elementary question, do/should all peers in a channel have the same chaincode? Does it make sense to have multiple chaincodes in one channel?

longphan (Wed, 07 Mar 2018 09:05:36 GMT):
hello. when i run peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem in BUILD YOUR FIRST NETWORK . error: Error: got unexpected status: BAD_REQUEST . thank me. thank you

csati (Wed, 07 Mar 2018 14:14:53 GMT):
Has joined the channel.

csati (Wed, 07 Mar 2018 14:16:19 GMT):
Hello - I am using the GetHistoryForKey() GO SDK API for getting history of transactions for a particular key. Is there a way to get more information about the transactions, i.e. which chaincode was executed, which participants were involved in it, etc.?

vishwasbalakrishna (Wed, 07 Mar 2018 21:35:17 GMT):
Has joined the channel.

devchaud (Thu, 08 Mar 2018 06:16:51 GMT):
Has joined the channel.

muralisr (Thu, 08 Mar 2018 14:20:10 GMT):
@mohebz chaincode is identified by its name and all peers which needs to endorse requests for a chaincode must have the same chancode. We can have multiple chaincodes in a channel

muralisr (Thu, 08 Mar 2018 14:22:48 GMT):
@longphan we need to see the errorlog from the orderer ...but before that, perhaps try cleaning up (see "Bring down the network" here http://hyperledger-fabric.readthedocs.io/en/release/build_network.html)

jrosmith (Thu, 08 Mar 2018 14:33:04 GMT):
@csati it sounds like you want the actual block info. i know the the nodesdk has methods for that but i'm not sure about how the go sdk implements it. #fabric-sdk-go would be able to help

GiorgiBlockchain (Fri, 09 Mar 2018 03:11:40 GMT):
Hello everyone. I'm testing high-throughput example https://github.com/hyperledger/fabric-samples/tree/release/high-throughput . When I'm instantiating chaincode getting the error: `Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) ` Any suggestions what I'm missing?

DarshanBc (Fri, 09 Mar 2018 07:12:06 GMT):
Is there any sample or code snippet to call one chaincode from another preferably latter ones is in different channel

DarshanBc (Fri, 09 Mar 2018 07:23:55 GMT):
I got it here `fabric/examples/chaincode/go/chaincode_example04/chaincode_example04.go`

DarshanBc (Fri, 09 Mar 2018 09:38:24 GMT):
Hi I am invoking a chaincode from another chaincode in different channel I am using this chaincode `fabric/examples/chaincode/go/chaincode_example04/chaincode_example04.go` But I am getting this error ```Promise is rejected: Error: error executing chaincode: transaction returned with failure: Failed to get policy manager for channel [channel2]```

DarshanBc (Fri, 09 Mar 2018 09:39:12 GMT):
errror corresponds to `https://jira.hyperledger.org/browse/FAB-4721` but issue is closed

ajay_konda (Fri, 09 Mar 2018 09:45:02 GMT):
Has joined the channel.

DarshanBc (Fri, 09 Mar 2018 10:15:59 GMT):
@muralisr can you help me

AndrewRy 1 (Fri, 09 Mar 2018 13:32:07 GMT):
Has joined the channel.

AndrewRy 1 (Fri, 09 Mar 2018 13:32:48 GMT):
Hi, I install chaincode on the peer, and got the error "Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/satori/go.uuid: : failed with error: "exit status 1" can't load package: package github.com/satori/go.uuid: cannot find package "github.com/satori/go.uuid" in any of: /usr/local/go/src/github.com/satori/go.uuid (from $GOROOT) /opt/gopath/src/github.com/satori/go.uuid (from $GOPATH) "

AndrewRy 1 (Fri, 09 Mar 2018 13:32:48 GMT):
Hi, I install chaincode on the peer, and got the error "Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/satori/go.uuid: : failed with error: "exit status 1" can't load package: package github.com/satori/go.uuid: cannot find package "github.com/satori/go.uuid" in any of: /usr/local/go/src/github.com/satori/go.uuid (from $GOROOT) /opt/gopath/src/github.com/satori/go.uuid (from $GOPATH) " How to fix this one?

mastersingh24 (Fri, 09 Mar 2018 14:29:27 GMT):
@AndrewRy 1 - you need to use something like `govendor` to vendor external dependencies before packaging and installing the chaincode on the peer

mastersingh24 (Fri, 09 Mar 2018 14:29:27 GMT):
@AndrewRy 1 - you need to use something like `govendor` to vendor external dependencies before packaging and installing the chaincode on the peer

mastersingh24 (Fri, 09 Mar 2018 14:29:27 GMT):
@AndrewRy 1 - you need to use something like `govendor` to vendor external dependencies before packaging and installing the chaincode on the peer

muralisr (Fri, 09 Mar 2018 16:04:45 GMT):
@DarshanBc has the peer joined channel2 ?

DarshanBc (Fri, 09 Mar 2018 17:09:46 GMT):
Yes I can invoke txn on both the channels separately

SethiSaab (Sat, 10 Mar 2018 19:46:55 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")

ArnabChatterjee (Sun, 11 Mar 2018 11:53:26 GMT):
Dear Fabric Experts. I am inviting you to please review my document on Chaincode writing guidelines. https://gist.github.com/arnabkaycee/d4c10a7f5c01f349632b42b67cee46db. Please feel free to comment and let me know your feedback. Thank you.

Ryan2 (Sun, 11 Mar 2018 13:00:01 GMT):
Hi, if I have the endorsement policy is -P "AND ('Org0MSP.member')" Does this mean that any peer in the org0 organization endorse the TX is considered valid?

richardsun (Mon, 12 Mar 2018 06:19:48 GMT):
Has joined the channel.

arunkarri (Mon, 12 Mar 2018 14:43:17 GMT):
Has joined the channel.

muralisr (Mon, 12 Mar 2018 17:22:19 GMT):
@Ryan2 yes

muralisr (Mon, 12 Mar 2018 17:28:45 GMT):
@ArnabChatterjee its got several good directives ... have some suggestions. Perhaps DM me directly so as to not take up space here ?

doowb (Mon, 12 Mar 2018 20:47:41 GMT):
Has joined the channel.

doowb (Mon, 12 Mar 2018 20:52:07 GMT):
Hi, I'm trying to use node.js for chaincode and I have the latest images and the network started using the fabric-samples `chaincode-docker-devmode` example, but the example README only says how to start and run the go chaincode. Is there anyplace with the instructions on how to start and run the node.js chaincode? I'm getting an error saying that the `peer.address` program argument must be set to a legitimate value (I had tried setting the environment variables like in the go example, but I got the same error)

doowb (Mon, 12 Mar 2018 21:35:29 GMT):
I figured it out... I had to change the command to this: `CORE_CHAINCODE_ID_NAME=mycc:0 node chaincode_example02.js --peer.address="peer:7052"`

GopalPanda (Tue, 13 Mar 2018 01:34:57 GMT):
Has joined the channel.

pd93 (Tue, 13 Mar 2018 10:26:21 GMT):
Hey, When using `dep` as a vendoring tool for my chaincode, do I need to commit my `vendor` folder so that it is copied into the container with my other chaincode files? Or is Fabric smart enough to detect the `Gopkg…` files and run dep itself?

zimabry (Tue, 13 Mar 2018 12:43:11 GMT):
Has joined the channel.

nolimitkun (Tue, 13 Mar 2018 12:54:04 GMT):
Has joined the channel.

jspark84 (Tue, 13 Mar 2018 13:13:18 GMT):
Has joined the channel.

muralisr (Tue, 13 Mar 2018 13:47:10 GMT):
@pd93 you have to bundle the vendor with the chaincode.. fabric will not add those dependencies automatically

pd93 (Tue, 13 Mar 2018 13:50:28 GMT):
@muralisr Great thanks. Is this something that might be considered in the future? After all, you'd just have to run `dep ensure` during the creation of the chaincode image. Some might say that this step should be done anyway to guarantee (ensure) that everything is valid

muralisr (Tue, 13 Mar 2018 13:57:23 GMT):
@pd93 only CLI uses the fabric to package the chaincode for install. SDKs use there own mechanisms to create the chaincode package. So there are some difficulties. Also, dependencies are tricky..we have to make sure the dependency computed is the right one you want.... But you raise a good point about finding a way to have it generated so users don't have to worry about it (

pd93 (Tue, 13 Mar 2018 14:24:56 GMT):
@muralisr I hadn't considered that the SDKs would need to be able to do this too. If you like, I'm happy to open a JIRA for this for further discussion

muralisr (Tue, 13 Mar 2018 14:27:22 GMT):
@pd93 certainly, please do. It might be useful information in general regardless of where it leads us

pd93 (Tue, 13 Mar 2018 14:45:37 GMT):
@muralisr No problem, see FAB-8841

mikail 2 (Wed, 14 Mar 2018 07:06:49 GMT):
Has joined the channel.

junhwanchoi (Wed, 14 Mar 2018 08:36:50 GMT):
Has joined the channel.

Snixells (Wed, 14 Mar 2018 11:31:16 GMT):
Has joined the channel.

jonathanlopez500 (Wed, 14 Mar 2018 13:29:15 GMT):
Has joined the channel.

Antiarchitect (Wed, 14 Mar 2018 14:56:53 GMT):
Has joined the channel.

Antiarchitect (Wed, 14 Mar 2018 14:57:09 GMT):
Guys, need help. I have this error on my network: https://github.com/hyperledger/fabric/blob/da14b6bae4a843dfb3fcece5a08ae0ea18488a7a/core/scc/vscc/validator_onevalidsignature.go#L153 And do not know what does it mean. I suspect that could be related to the fact i'm recreating admin card each time I update my network.

brian038 (Wed, 14 Mar 2018 15:28:08 GMT):
Has joined the channel.

patelan (Wed, 14 Mar 2018 15:36:39 GMT):
Has joined the channel.

patelan (Wed, 14 Mar 2018 15:37:18 GMT):
Hi Team, I am part of one finance company and using hyperledger 1.0.3. We deployed all services in Docker UCP (Enterprise Edition). After 15 mins call is timing out from peer to smart contracts. Need help to configure hyper ledger applications to enable keep-alive on the socket and send TCP keep alive packets at regular intervals (less than 900 seconds ) Your assistance in this matter is greatly appreciated. Can you suggest proper channel for my question.

muralisr (Wed, 14 Mar 2018 15:50:13 GMT):
@Antiarchitect it just means that there were more endorsements than required

Antiarchitect (Wed, 14 Mar 2018 15:52:06 GMT):
But more is better than less. I'm started to get this error trying to improve my .bna

Antiarchitect (Wed, 14 Mar 2018 15:52:27 GMT):
Old version works, new one doesn't. And I cannot understand the reason.

muralisr (Wed, 14 Mar 2018 15:54:49 GMT):
@patelan not sure what you are running into... the chaincode keepalive can be set on the peer via the env variable CORE_CHAINCODE_KEEPALIVE=x where x is the keepalive in seconds, The default is no keepalive

muralisr (Wed, 14 Mar 2018 15:55:16 GMT):
@Antiarchitect ".bna" is composer artifact correct ?

Antiarchitect (Wed, 14 Mar 2018 15:55:26 GMT):
Yes.

Antiarchitect (Wed, 14 Mar 2018 15:55:36 GMT):
I'm just doing composer network update

Antiarchitect (Wed, 14 Mar 2018 15:55:53 GMT):
* without card recreation already

Antiarchitect (Wed, 14 Mar 2018 15:56:08 GMT):
And the old one works, but the new one says

Antiarchitect (Wed, 14 Mar 2018 15:56:34 GMT):
``` ``` { "error": { "statusCode": 500, "name": "Error", "message": "Error trying invoke business network. Error: Peer has rejected transaction '50965bdcde3bde5a1e48e04c3783237396d6bc1764213ae87f0dcd0fc8fbf3f0' with code ENDORSEMENT_POLICY_FAILURE", "stack": "Error: Error trying invoke business network. Error: Peer has rejected transaction '50965bdcde3bde5a1e48e04c3783237396d6bc1764213ae87f0dcd0fc8fbf3f0' with code ENDORSEMENT_POLICY_FAILURE\n at _initializeChannel.then.then.then.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:916:34)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" } }

muralisr (Wed, 14 Mar 2018 15:56:55 GMT):
Please check on composer channel for help on this

Antiarchitect (Wed, 14 Mar 2018 15:57:03 GMT):
OK

muralisr (Wed, 14 Mar 2018 15:57:06 GMT):
not sure what you are running into

samdeir (Thu, 15 Mar 2018 11:14:08 GMT):
hi, i have a setup of two channels deployed on them same chaincode, channel A deployed on it chaincode (chX) and channel B deployed on it same chaincode (chX)

samdeir (Thu, 15 Mar 2018 11:14:48 GMT):
when i try to invoke a method on chX from channel A its works

samdeir (Thu, 15 Mar 2018 11:15:10 GMT):
when I try to invoke a method on chX from channel B it works

samdeir (Thu, 15 Mar 2018 11:16:15 GMT):
when i try to invoke from one channel a method on the other channel using InvokeChaincode, it fails with error 500

samdeir (Thu, 15 Mar 2018 11:18:05 GMT):
if i deployed different chaincode on each channel, as Channel A deployed on it chaincode (chX) and Channel B deployed on it chaincode (chY) and call InvokeChaincode from channel A to channel B this will work

samdeir (Thu, 15 Mar 2018 11:18:20 GMT):
any explanation why?

papegaaij (Thu, 15 Mar 2018 11:52:48 GMT):
Has joined the channel.

zimabry (Thu, 15 Mar 2018 13:30:29 GMT):
Hi all, I am trying to use shim.getCreator to get the owner of who submitted that transaction. How can I get the creator and store it in a variable in GOLang?

zimabry (Thu, 15 Mar 2018 13:30:29 GMT):
Hi all, I am trying to use shim.getCreator to get the owner of who submitted that transaction. How can I get the creator and store it in a variable as a String in GOLang?

jrosmith (Thu, 15 Mar 2018 14:08:36 GMT):
@zimabry you can get the common name from the cert using the following: ```import ( "crypto/x509" "encoding/pem" "github.com/golang/protobuf/proto" mspprotos "github.com/hyperledger/fabric/protos/msp" ) func getSigner(stub shim.ChaincodeStubInterface) (string, error) { creator, err := stub.GetCreator() if err != nil { return "", err } id := &mspprotos.SerializedIdentity{} err = proto.Unmarshal(creator, id) if err != nil { return "", err } block, _ := pem.Decode(id.GetIdBytes()) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { return "", err } signer := cert.Subject.CommonName return signer, nil } ```

zimabry (Thu, 15 Mar 2018 14:11:16 GMT):
@jrosmith Thank you! will these imports work with fabric 1.0?

jrosmith (Thu, 15 Mar 2018 14:12:04 GMT):
@zimabry yep! i have not tested the code snippet on 1.1, waiting for the official release (tentatively today?) before upgrading

zimabry (Thu, 15 Mar 2018 14:12:41 GMT):
@jrosmith great, let me test and re-build my chaincode!

zimabry (Thu, 15 Mar 2018 14:13:37 GMT):
@jrosmith is there a way I can test this in "The Go Playground"?

jrosmith (Thu, 15 Mar 2018 14:14:47 GMT):
@zimabry you can test from the `pem.Decode` and below if you have a cert lying around that you can decode

zimabry (Thu, 15 Mar 2018 14:22:39 GMT):
@jrosmith great it worked and verified the code, Thanks!!

RahulSonanis (Thu, 15 Mar 2018 14:49:42 GMT):
Hello everyone.. I found a problem while invoking chaincode requests through node sdk following some endorsement policy. Can you please help? Link of the detailed question - https://stackoverflow.com/questions/49302463/endorsement-policy-failure-for-invoke-chaincode-request-even-when-sufficient-end

jrosmith (Thu, 15 Mar 2018 15:19:27 GMT):
@RahulSonanis have you ensured that the sdk is pointing to a peer from both org1 and org2? it's possible you are getting valid endorsements of the proposal from only one organization

RahulSonanis (Thu, 15 Mar 2018 15:45:15 GMT):
yes I have set the targets as peer0.org1.example.com and peer0.org2.example.com

RahulSonanis (Thu, 15 Mar 2018 15:48:49 GMT):
These are my request targets `[ Peer { _options: { 'grpc.ssl_target_name_override': 'peer0.org1.example.com', 'grpc.default_authority': 'peer0.org1.example.com', 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.primary_user_agent': 'grpc-node/1.10.0' }, _url: 'grpcs://localhost:7051', _endpoint: Endpoint { addr: 'localhost:7051', creds: ChannelCredentials {} }, _request_timeout: 45000, _endorserClient: ServiceClient { '$channel': Channel {} }, _name: null }, Peer { _options: { 'grpc.ssl_target_name_override': 'peer0.org2.example.com', 'grpc.default_authority': 'peer0.org2.example.com', 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.primary_user_agent': 'grpc-node/1.10.0' }, _url: 'grpcs://localhost:9051', _endpoint: Endpoint { addr: 'localhost:9051', creds: ChannelCredentials {} }, _request_timeout: 45000, _endorserClient: ServiceClient { '$channel': Channel {} }, _name: null } ]`

RahulSonanis (Thu, 15 Mar 2018 15:48:49 GMT):
These are my request targets

RahulSonanis (Thu, 15 Mar 2018 15:51:28 GMT):
@jrosmith These are my request targets - `[ Peer { _options: { 'grpc.ssl_target_name_override': 'peer0.org1.example.com', 'grpc.default_authority': 'peer0.org1.example.com', 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.primary_user_agent': 'grpc-node/1.10.0' }, _url: 'grpcs://localhost:7051', _endpoint: Endpoint { addr: 'localhost:7051', creds: ChannelCredentials {} }, _request_timeout: 45000, _endorserClient: ServiceClient { '$channel': Channel {} }, _name: null }, Peer { _options: { 'grpc.ssl_target_name_override': 'peer0.org2.example.com', 'grpc.default_authority': 'peer0.org2.example.com', 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.primary_user_agent': 'grpc-node/1.10.0' }, _url: 'grpcs://localhost:9051', _endpoint: Endpoint { addr: 'localhost:9051', creds: ChannelCredentials {} }, _request_timeout: 45000, _endorserClient: ServiceClient { '$channel': Channel {} }, _name: null }]`

JuanSilva (Thu, 15 Mar 2018 15:55:30 GMT):
Has joined the channel.

JuanSilva (Thu, 15 Mar 2018 15:59:00 GMT):
Help! anybody knows what can be causing this: endPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]

JuanSilva (Thu, 15 Mar 2018 15:59:15 GMT):
log in the peer: 2018-03-15 13:58:38.644 UTC [protoutils] ValidateProposalMessage -> WARN 041 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority 2018-03-15 13:58:54.552 UTC [protoutils] ValidateProposalMessage -> WARN 042 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority 2018-03-15 14:11:44.963 UTC [protoutils] ValidateProposalMessage -> WARN 043 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority

zimabry (Thu, 15 Mar 2018 16:05:31 GMT):
@jrosmith one more question :smile: my chaincode function returns a array String( []array ). But my invoke function is supposed to return a peer.response so my code is throwing an error. Any way around this?

jrosmith (Thu, 15 Mar 2018 16:40:58 GMT):
@zimabry at some point you will have to convert any information you want to return from the chaincode into the form of a `peer.Response`. its easiest to use the shim functions, in your case `shim.Success()` but that only accepts one argument in the form of a byte array, so you will either need to convert.

jrosmith (Thu, 15 Mar 2018 16:41:15 GMT):
ive found the shim docs to be really helpful: https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim

zimabry (Thu, 15 Mar 2018 17:21:12 GMT):
@jrosmith So I will need to convert the string array to byte array and pass it into shim.success()?

jrosmith (Thu, 15 Mar 2018 17:21:34 GMT):
@zimabry yes that is correct

zimabry (Thu, 15 Mar 2018 17:23:20 GMT):
@jrosmith can I use []byte() and pass in to that my array?

jrosmith (Thu, 15 Mar 2018 17:24:16 GMT):
@zimabry unfortunately it is not that simple. take a look at the answer here: https://stackoverflow.com/questions/13573269/convert-string-to-byte

zimabry (Thu, 15 Mar 2018 17:26:39 GMT):
@jrosmith yes I was actually reading this one earlier today. Will "encoding/gob" import work with go version go1.7.6 linux/amd64?

jrosmith (Thu, 15 Mar 2018 17:27:07 GMT):
@zimabry absolutely!

zimabry (Thu, 15 Mar 2018 17:27:52 GMT):
@jrosmith great, thanks alot for the help. Will let you know if I run into more issues :smiley:

caseybecking (Thu, 15 Mar 2018 20:06:25 GMT):
Has joined the channel.

caseybecking (Thu, 15 Mar 2018 20:06:46 GMT):
Is the only way (as of right now) to write chain code is to write it in go?

jrosmith (Thu, 15 Mar 2018 20:44:02 GMT):
@caseybecking as of the 1.1 release (happening later tonight or tomorrow) chaincode in node.js will be supported. to my knowledge chaincode in java is also supported but requires specific build options

caseybecking (Thu, 15 Mar 2018 20:44:21 GMT):
WHAAAAAA I WANT!!!!!

caseybecking (Thu, 15 Mar 2018 20:44:27 GMT):
sorry that made me happy to read!

jrosmith (Thu, 15 Mar 2018 20:45:03 GMT):
keep an eye on #fabric-release, the announcement will first be posted there

caseybecking (Thu, 15 Mar 2018 20:45:55 GMT):
Will do!

caseybecking (Thu, 15 Mar 2018 20:46:01 GMT):
Thank you

yopep (Fri, 16 Mar 2018 05:58:03 GMT):
Has joined the channel.

papegaaij (Fri, 16 Mar 2018 12:39:06 GMT):
hi, i'm trying to setup a chaincode development env for java, using the instructions at http://hyperledger-fabric.readthedocs.io/en/release-1.1/peer-chaincode-devmode.html

papegaaij (Fri, 16 Mar 2018 12:39:32 GMT):
i can register my chaincode application with the peer (running in dev mode), but instantiation fails

papegaaij (Fri, 16 Mar 2018 12:39:58 GMT):
```root@93a2a353c91e:/opt/gopath/src/github.com/java# peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n fabcarj10 -l java -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" 2018-03-16 12:37:31.654 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-16 12:37:31.654 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-16 12:37:31.655 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-03-16 12:37:31.655 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-03-16 12:37:31.656 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode enabled 2018-03-16 12:37:31.656 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AA7070A6708031A0C088BF5AED50510...324D53500A04657363630A0476736363 2018-03-16 12:37:31.656 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 5170C5F6CD5E719F8D0EC1E2B1B5AB0081EFBF129FAE6F71DAA6975A72B4A9EF Error: Error endorsing chaincode: rpc error: code = Unknown desc = failed to init chaincode: handler not found for chaincode fabcarj10:1.0 ```

papegaaij (Fri, 16 Mar 2018 12:41:51 GMT):
i'm running a slightly modified version of the basic network from the samples, with the peer started with `peer node start --peer-chaincodedev=true` and some other minor changes to exposed ports and mounted paths

papegaaij (Fri, 16 Mar 2018 12:45:17 GMT):
ah, i've found the problem, you have to use name:version as id for the chaincode

muralisr (Fri, 16 Mar 2018 13:17:56 GMT):
@papegaaij note that Java CC is not fully supported @sanchezl would know more

sanchezl (Fri, 16 Mar 2018 13:23:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iw3FDZHuaynX3WyjK) @papegaaij You will need to compile fabric from source, making sure that the `EXPERIMENTAL` variable is set to `true` (this is the default on non-releases).

papegaaij (Fri, 16 Mar 2018 13:24:01 GMT):
@muralisr that part is hard to miss :)

muralisr (Fri, 16 Mar 2018 13:24:19 GMT):
haha :-)

papegaaij (Fri, 16 Mar 2018 13:25:01 GMT):
it would be nice though if builds with the experimental flag enabled would also be available as docker containers

papegaaij (Fri, 16 Mar 2018 13:25:12 GMT):
that would have saved me a day :)

papegaaij (Fri, 16 Mar 2018 13:30:14 GMT):
so now i've got my chaincode running in eclipse and can put breakpoints, however i need to finish debugging within just a few seconds, otherwise a timeout occurs

papegaaij (Fri, 16 Mar 2018 13:30:29 GMT):
is there a way to increase this timeout for chaincode invoke?

sanchezl (Fri, 16 Mar 2018 13:35:33 GMT):
I believe there are some timeout values in `core.yaml`.

sanchezl (Fri, 16 Mar 2018 13:37:21 GMT):
`CORE_CHAINCODE_STARTUPTIMEOUT` `CORE_CHAINCODE_EXECUTETIMEOUT`

papegaaij (Fri, 16 Mar 2018 13:40:34 GMT):
ah, i think found it: chaincode.executetimeout, currently set to 30s

patelan (Fri, 16 Mar 2018 14:11:34 GMT):
@muralisr Thanks a lot for help. We will try with CORE_CHAINCODE_KEEPALIVE and let you the results.

ascatox (Fri, 16 Mar 2018 14:31:25 GMT):
Hi All!I'd like to start programming Chaincodes for Fabric, using Node. Someone is developing with this technology at the moment

ascatox (Fri, 16 Mar 2018 14:31:25 GMT):
Hi All!I'd like to start programming Chaincodes for Fabric, using Node. Someone is developing with this technology at the moment?

ascatox (Fri, 16 Mar 2018 14:31:48 GMT):
Do you use Typescript or plain Javascript?

ascatox (Fri, 16 Mar 2018 14:32:06 GMT):
Thanks in advance for the help!!!

fkrzewinski (Fri, 16 Mar 2018 14:34:40 GMT):
Has joined the channel.

mastersingh24 (Fri, 16 Mar 2018 17:01:19 GMT):
@ascatox - there is a typescript API there, but most people are writing in pure JavaScript

patelan (Fri, 16 Mar 2018 18:59:05 GMT):
patelan

manasshk (Sat, 17 Mar 2018 07:54:31 GMT):
Has joined the channel.

matthewehoward (Sat, 17 Mar 2018 12:08:07 GMT):
Has joined the channel.

VinayChaudhary (Sat, 17 Mar 2018 15:45:38 GMT):
Has joined the channel.

samdeir (Sun, 18 Mar 2018 13:41:12 GMT):
hi, i have a setup of two channels deployed on them same chaincode, channel A deployed on it chaincode (chX) and channel B deployed on it same chaincode (chX) when i try to invoke a method on chX from channel A its works when I try to invoke a method on chX from channel B it works when i try to invoke from one channel a method on the other channel using InvokeChaincode, it fails with error 500 if i deployed different chaincode on each channel, as Channel A deployed on it chaincode (chX) and Channel B deployed on it chaincode (chY) and call InvokeChaincode from channel A to channel B this will work any explanation why?

shiyj93 (Mon, 19 Mar 2018 08:59:50 GMT):
Has joined the channel.

crissi (Mon, 19 Mar 2018 09:21:13 GMT):
Has joined the channel.

umaparam (Mon, 19 Mar 2018 10:04:08 GMT):
Has joined the channel.

umaparam (Mon, 19 Mar 2018 11:13:56 GMT):
Hi, I m new to chaincode, I've tried to deploy one sample chaincode. It is throwing error when I run this command "docker exec -it cli bash", I m getting error like this "*Error response from daemon: Container 0a294a8d0f5ccf7bd7dd1fa26bbfd1837730112313a6133a37d60a5c8fa0d333 is not running"* Can anyone pls help me to resolve this.

anrgbndhu (Mon, 19 Mar 2018 13:42:17 GMT):
Has joined the channel.

zimabry (Mon, 19 Mar 2018 13:42:30 GMT):
Hi All!!!, I am getting the following chaincode compile error since I am importing it in my chaincode... - cannot find package "github.com/hyperledger/fabric/protos/msp".. BUT, this import(from same protos path..) - "github.com/hyperledger/fabric/protos/peer" works with no issue. NEED to fix this

jrosmith (Mon, 19 Mar 2018 13:45:59 GMT):
@umaparam you installed and instantiated the chaincode? for a peers chaincode container to come up and transaction must be run through it

zimabry (Mon, 19 Mar 2018 14:54:44 GMT):
@jrosmith Hi, any understanding on why I am getting above error?

razik29 (Mon, 19 Mar 2018 14:56:03 GMT):
Has joined the channel.

razik29 (Mon, 19 Mar 2018 14:58:41 GMT):
Hi All, 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.

jrosmith (Mon, 19 Mar 2018 15:06:46 GMT):
@zimabry yep, usually means you need vendor your dependencies

jrosmith (Mon, 19 Mar 2018 15:07:06 GMT):
i believe fabric currently uses govendor to handle, with plans to switch to godep

zimabry (Mon, 19 Mar 2018 15:12:44 GMT):
@jrosmith I ran the following in the CLI container and still the same error. Should I run this locally or on the CLI container? go get -u github.com/kardianos/govendor govendor init govendor fetch github.com/hyperledger/fabric/protos/msp

jrosmith (Mon, 19 Mar 2018 15:20:47 GMT):
@zimabry actually a bit out of my depth on that one, i usually handle all chaincode installation and instantiation via one of the sdks. @muralisr would have a better idea

zimabry (Mon, 19 Mar 2018 18:41:32 GMT):
@jrosmith I actually figured it out, thank you though!

gewing (Mon, 19 Mar 2018 19:15:31 GMT):
Has joined the channel.

freddyisaac (Tue, 20 Mar 2018 04:15:05 GMT):
Has joined the channel.

kai_den (Tue, 20 Mar 2018 06:07:53 GMT):
Has joined the channel.

kai_den (Tue, 20 Mar 2018 06:14:21 GMT):
Hi, every! I have a question. Is it possible to develop using node.js? Please help me and please forgive my poor English...

freddyisaac (Tue, 20 Mar 2018 08:20:12 GMT):
I have a question about running chaincode with a peer in dev mode

freddyisaac (Tue, 20 Mar 2018 08:22:29 GMT):
anyone have any success with this

freddyisaac (Tue, 20 Mar 2018 08:33:09 GMT):
kai_den - yes you can develop with node.js

freddyisaac (Tue, 20 Mar 2018 08:33:15 GMT):
see herr https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

freddyisaac (Tue, 20 Mar 2018 08:33:15 GMT):
see here https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

freddyisaac (Tue, 20 Mar 2018 08:33:35 GMT):
I have never used node.js though

freddyisaac (Tue, 20 Mar 2018 08:34:34 GMT):
also try download the fabric samples from here https://github.com/hyperledger/fabric-samples

freddyisaac (Tue, 20 Mar 2018 08:34:59 GMT):
althoug I am not sure if you are asking if chaincode can be written in node.js - if that is your question I am not sure

freddyisaac (Tue, 20 Mar 2018 08:34:59 GMT):
although I am not sure if you are asking if chaincode can be written in node.js - if that is your question I am not sureh

freddyisaac (Tue, 20 Mar 2018 08:34:59 GMT):
although I am not sure if you are asking if chaincode can be written in node.js - if that is your question I am not sure

crissi (Tue, 20 Mar 2018 08:44:12 GMT):
How can we write chaincode using node.js??

crissi (Tue, 20 Mar 2018 08:44:18 GMT):
Any samples to learn

freddyisaac (Tue, 20 Mar 2018 10:03:45 GMT):
I am not sure you can - although you can write them in java

crissi (Tue, 20 Mar 2018 10:25:41 GMT):
You also have the option of running this tutorial against chaincode written in Node.js. If you’d like to pursue this route, issue the following command instead: ./startFabric.sh node https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

crissi (Tue, 20 Mar 2018 10:25:41 GMT):
You also have the option of running this tutorial against chaincode written in Node.js. If you’d like to pursue this route, issue the following command instead: ```./startFabric.sh node `` https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

crissi (Tue, 20 Mar 2018 10:25:41 GMT):
You also have the option of running this tutorial against chaincode written in Node.js. If you’d like to pursue this route, issue the following command instead: ``./startFabric.sh node `` https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html

crissi (Tue, 20 Mar 2018 10:26:42 GMT):
@freddyisaac I have seen this in their tutorial..

crissi (Tue, 20 Mar 2018 10:27:14 GMT):
If you got any refereces,please do share.

freddyisaac (Tue, 20 Mar 2018 10:57:01 GMT):
what about this https://github.com/hyperledger/fabric-chaincode-node

freddyisaac (Tue, 20 Mar 2018 11:01:24 GMT):
anyways I am still having problems with chaincode in dev mode

freddyisaac (Tue, 20 Mar 2018 11:01:54 GMT):
anyone tried this and run into problems with the chaincode not being regiestered with the lscc ?

freddyisaac (Tue, 20 Mar 2018 11:01:54 GMT):
anyone tried this and run into problems with the chaincode not being registered with the lscc

dsanchezseco (Tue, 20 Mar 2018 11:17:30 GMT):
@crissi i recommend you to get the byfn and with a bit of tweaking make it install your chaincode instead the chaincode_example02 (playing with the docker-compose volumes :wink: ), then just `.byfn.sh -m up -l node`. the -l it's to choose the language, for now it's only node or golang (default).

freddyisaac (Tue, 20 Mar 2018 11:18:29 GMT):
is that about the node question or the instantiate question ?

dsanchezseco (Tue, 20 Mar 2018 11:19:37 GMT):
both, i'd started with the node chaincodes looking at the node version of chaincode_example02 and https://fabric-shim.github.io/ChaincodeStub.html

freddyisaac (Tue, 20 Mar 2018 11:20:05 GMT):
my code is golang and I am unable to get chaincode to instantiate properly when in dev mode

dsanchezseco (Tue, 20 Mar 2018 11:20:36 GMT):
btw, check something about the new async/await in node if you don't already now

dsanchezseco (Tue, 20 Mar 2018 11:20:36 GMT):
btw, check something about the new async/await in node if you don't already know

dsanchezseco (Tue, 20 Mar 2018 11:21:13 GMT):
@freddyisaac ah sorry, i misunderstood you, i didn't play with lscc (yet) sorry

freddyisaac (Tue, 20 Mar 2018 11:21:49 GMT):
in fact the install doesn't give any errors and the instantiate actually executes the Init() on the chaincode but then it fails on an invoke by saying the "could not find chaincode with name mycc"

dsanchezseco (Tue, 20 Mar 2018 11:22:18 GMT):
wait you're in dev right?

freddyisaac (Tue, 20 Mar 2018 11:22:25 GMT):
and the errors in the peer log start when looking up the chaincode name on the lscc namespace

dsanchezseco (Tue, 20 Mar 2018 11:22:53 GMT):
cause i can recall some differences in the install/instantiate between dev and prod...

freddyisaac (Tue, 20 Mar 2018 11:22:58 GMT):
the peer is started with --peer-chaincodedev-true

freddyisaac (Tue, 20 Mar 2018 11:23:47 GMT):
I don't do a package (I think) I just start the chaincode with the CORE_CHAINCODE_ID_NAME set

dsanchezseco (Tue, 20 Mar 2018 11:23:51 GMT):
it was something about the -n -p in instantiate, to make developing easier, let me check

freddyisaac (Tue, 20 Mar 2018 11:24:09 GMT):
my instantiate line is

freddyisaac (Tue, 20 Mar 2018 11:24:44 GMT):
peer chaincode instantiate -n mycc -v 0 -c '{"Args":["init","name","Frederick Isaac","b","200"]}' -o orderer.hypdex.com:7050 -C primaryab --tls true --cafile $ORDERER_CA --logging-level debug -P 'OR ("DEAFULT.member")'

freddyisaac (Tue, 20 Mar 2018 11:25:11 GMT):
and it is installed with mycc and -v 0 also which doesn't give any errors

freddyisaac (Tue, 20 Mar 2018 11:25:51 GMT):
also I need to upgrade to 1.1 currently on 1.0.3 or something similar

freddyisaac (Tue, 20 Mar 2018 11:27:28 GMT):
I see lines like

dsanchezseco (Tue, 20 Mar 2018 11:27:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CrrXTxkfPjtYLeQoo) nope, this was from 0.6 i think, is no more in the docs, so the next suspect is the `-P`

freddyisaac (Tue, 20 Mar 2018 11:27:59 GMT):
2018-03-18 05:23:46.007 PDT [stateleveldb] GetState -> DEBU 512 GetState(). ns=lscc, key=mycc

freddyisaac (Tue, 20 Mar 2018 11:28:28 GMT):
2018-03-18 05:23:46.007 PDT [chaincode] func1 -> DEBU 513 [0a59d420]No state associated with key: mycc. Sending RESPONSE with an empty payload

freddyisaac (Tue, 20 Mar 2018 11:28:33 GMT):
in the peer log

freddyisaac (Tue, 20 Mar 2018 11:28:52 GMT):
I have tried it without the -P also

freddyisaac (Tue, 20 Mar 2018 11:29:19 GMT):
some thing

dsanchezseco (Tue, 20 Mar 2018 11:29:24 GMT):
then i'm out of ideas

freddyisaac (Tue, 20 Mar 2018 11:29:29 GMT):
oh

freddyisaac (Tue, 20 Mar 2018 11:29:38 GMT):
drat

freddyisaac (Tue, 20 Mar 2018 11:30:16 GMT):
in the peer log for byfn.sh I see the vscc mentioned a lot around the instantiate but in my logs I see no mention of the vscc

freddyisaac (Tue, 20 Mar 2018 11:30:26 GMT):
what is the role of the vscc during instantiate ?

freddyisaac (Tue, 20 Mar 2018 11:30:54 GMT):
is it even relevant during a dev mode instantiate ?

dsanchezseco (Tue, 20 Mar 2018 11:31:34 GMT):
:confused: no idea

freddyisaac (Tue, 20 Mar 2018 11:32:08 GMT):
oh well maybe someone will know - thanks anyways

razik29 (Tue, 20 Mar 2018 11:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=nExq78AAXBxy2XmwM) @freddyisaac Hi, I've seen this error while instantiation, not just in dev mode but in other cases. I don't know the cause of this but what I usually do is to instantiate on the other Org peer connected to the network, the instantiation normally goes fine at least in one of the peers. And when we invoke the chaincode, the change is broadcasted (instantiated) on other nodes as well.

freddyisaac (Tue, 20 Mar 2018 11:46:43 GMT):
well in my small test box I only have one peer and one orderer

freddyisaac (Tue, 20 Mar 2018 11:46:59 GMT):
is that a problem - must it have more than one peer

freddyisaac (Tue, 20 Mar 2018 11:47:32 GMT):
I read a paper on hyperledger architecture and although it did not mention this explicitly I was left with a feeling that it might be a problem

freddyisaac (Tue, 20 Mar 2018 11:48:25 GMT):
I was going step by step - started out with the chaincode in mock and it works ok

freddyisaac (Tue, 20 Mar 2018 11:48:40 GMT):
then I thought single peer in dev mode would be the next step

freddyisaac (Tue, 20 Mar 2018 11:48:54 GMT):
and grinding halt ... :)

muralisr (Tue, 20 Mar 2018 13:24:23 GMT):
@freddyisaac `in fact the install doesn't give any errors and the instantiate actually executes the Init() on the chaincode but then it fails on an invoke by saying the "could not find chaincode with name mycc"` - this suggests the the instantiate transaction sent following getting the response for your instantiate proposal (which appears to have been successful for you) never made it to be committed. You should see a Commit message in the peer log some time after the instantiate proposal. If you don't (or see errors during validation - this is where vscc woud come in) then that's the issue. There could also be an issue that the transaction was not even successfully submitted (say because the orderer `orderer.hypdex.com` was not reachable. I'd look in the orderer log for activity as well.

muralisr (Tue, 20 Mar 2018 13:24:23 GMT):
@freddyisaac `in fact the install doesn't give any errors and the instantiate actually executes the Init() on the chaincode but then it fails on an invoke by saying the "could not find chaincode with name mycc"` - this suggests the the instantiate transaction sent following getting the response for your instantiate proposal (which appears to have been successful for you) never made it to be committed. You should see a Commit message in the peer log some time after the instantiate proposal. If you don't (or see errors during validation - this is where vscc woud come in) then that's the issue. There could also be an issue that the transaction was not even successfully submitted (say because the orderer `orderer.hypdex.com` was not reachable. I'd look in the orderer log for activity as well.

freddyisaac (Tue, 20 Mar 2018 13:32:41 GMT):
yeah I see orderer activity like

freddyisaac (Tue, 20 Mar 2018 13:32:42 GMT):
2018-03-20 06:29:08.405 PDT [fsblkstorage] indexBlock -> DEBU b34 Indexing block [blockNum=9, blockHash=[]byte{0x6a, 0xc7, 0xe8, 0xc0, 0x10, 0x9b, 0xb0, 0xaf, 0x1f, 0x9d, 0x80, 0x1f, 0x86, 0xdd, 0x67, 0x80, 0x96, 0x85, 0x31, 0xab, 0x40, 0x3c, 0x3, 0x24, 0x9f, 0x5d, 0x55, 0x5f, 0x3e, 0x74, 0x55, 0xe5} txOffsets= txId=32c5e4a04a7a941b9359cb16dfa051680a5aa2ff765444615f7ce142a653d51f locPointer=offset=70, bytesLength=3278 ] 2018-03-20 06:29:08.405 PDT [fsblkstorage] updateCheckpoint -> DEBU b35 Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[60750], isChainEmpty=[false], lastBlockNumber=[9] 2018-03-20 06:29:08.405 PDT [orderer/multichain] WriteBlock -> DEBU b36 [channel: primaryab] Wrote block 9

freddyisaac (Tue, 20 Mar 2018 13:33:06 GMT):
but I see no commits anywhere

freddyisaac (Tue, 20 Mar 2018 13:33:44 GMT):
I am not sure that the orderer/peer interaction is correct but they certainly seem to be communicating and I see no errors on he orderer side of thins

freddyisaac (Tue, 20 Mar 2018 13:33:44 GMT):
I am not sure that the orderer/peer interaction is correct but they certainly seem to be communicating and I see no errors on he orderer side of things

freddyisaac (Tue, 20 Mar 2018 13:34:46 GMT):
if I could see an error then it would maybe give me a clue as to what might be wrong but I am just stabbing in the dark and the only clue I have is the lscc message

muralisr (Tue, 20 Mar 2018 13:37:15 GMT):
if the orderer is received the transaction and sent it to peers, then the error could be in the peer on validation of the block (before you see the lscc message on the invoke)

muralisr (Tue, 20 Mar 2018 13:37:56 GMT):
the other thing that could happen is you might be sending the invoke too soon before the instantiate got committed

muralisr (Tue, 20 Mar 2018 13:39:21 GMT):
what I'd do is (1) send the instantiate request (2) look at the peer and orderer logs for activity (3) wait for commit message or error on the peer log (4) if the former, send the invoke. if the later, debug

muralisr (Tue, 20 Mar 2018 13:39:37 GMT):
have to go..

freddyisaac (Tue, 20 Mar 2018 13:50:03 GMT):
thx

freddyisaac (Tue, 20 Mar 2018 13:53:24 GMT):
is there a way to use peer chaincode invoke to query the lscc to get meta data about the installed chaincodes I think that the peer chaincode list was deprecated

freddyisaac (Tue, 20 Mar 2018 13:53:47 GMT):
it would be nice to see what the lscc thinks that it has available or even if it is emty

freddyisaac (Tue, 20 Mar 2018 13:53:47 GMT):
it would be nice to see what the lscc thinks that it has available or even if it is empty

andrasfe (Tue, 20 Mar 2018 18:16:26 GMT):
Has joined the channel.

ShikarSharma (Tue, 20 Mar 2018 22:37:17 GMT):
Has joined the channel.

crissi (Wed, 21 Mar 2018 12:46:07 GMT):
I am trying to instantiate chaincode , but it raises the invalid policy error

crissi (Wed, 21 Mar 2018 12:46:07 GMT):
```I am trying to instantiate chaincode , but it raises the invalid policy error

crissi (Wed, 21 Mar 2018 12:46:07 GMT):
I am trying to instantiate chaincode , but it raises the invalid policy error ```

crissi (Wed, 21 Mar 2018 12:46:26 GMT):
root@6f60a18e1117:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 --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 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" 2018-03-21 12:42:45.635 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-21 12:42:45.635 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-21 12:42:45.639 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-03-21 12:42:45.639 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc Error: Invalid policy OR ('Org1MSP.peer','Org2MSP.peer') ```

crissi (Wed, 21 Mar 2018 12:46:26 GMT):
```root@6f60a18e1117:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 --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 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" 2018-03-21 12:42:45.635 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-21 12:42:45.635 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-21 12:42:45.639 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-03-21 12:42:45.639 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc Error: Invalid policy OR ('Org1MSP.peer','Org2MSP.peer')

crissi (Wed, 21 Mar 2018 12:47:50 GMT):
How can I reslove this issue?

muralisr (Wed, 21 Mar 2018 13:09:21 GMT):
@crissi what llevel of code are you using ? MSP role based policies (the ".peer" in your policy) was not introduced till the recent 1.1 .. I'd first try `OR ('Org1MSP.member','Org2MSP.member')` works. If it does, that's the issue

FORFIRM (Wed, 21 Mar 2018 14:25:48 GMT):
Has joined the channel.

crissi (Wed, 21 Mar 2018 16:07:23 GMT):
@muralisr

crissi (Wed, 21 Mar 2018 16:07:26 GMT):
peer chaincode instantiate -o orderer.example.com:7050 --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 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')" 2018-03-21 16:05:48.970 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-21 16:05:48.970 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-21 16:05:48.974 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-03-21 16:05:48.974 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-03-21 16:05:48.975 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A95070A6708031A0C08DC85CAD50510...324D53500A04657363630A0476736363 2018-03-21 16:05:48.975 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 9455409E45A784A622D32DAD3285164111DFBEB70908B44AD0760309E71BB833 2018-03-21 16:06:08.798 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A95070A6708031A0C08DC85CAD50510...FC9F3F3622DAADF164C60CF8F7D533BA 2018-03-21 16:06:08.799 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 91B3FAFFD95756663E5C0EC4987DBD9D5BF995B6CD1DA93BA94B2803A6FD1B42 2018-03-21 16:06:08.805 UTC [main] main -> INFO 009 Exiting.....

crissi (Wed, 21 Mar 2018 16:07:26 GMT):
```peer chaincode instantiate -o orderer.example.com:7050 --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 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')" 2018-03-21 16:05:48.970 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-21 16:05:48.970 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-21 16:05:48.974 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-03-21 16:05:48.974 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-03-21 16:05:48.975 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A95070A6708031A0C08DC85CAD50510...324D53500A04657363630A0476736363 2018-03-21 16:05:48.975 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 9455409E45A784A622D32DAD3285164111DFBEB70908B44AD0760309E71BB833 2018-03-21 16:06:08.798 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A95070A6708031A0C08DC85CAD50510...FC9F3F3622DAADF164C60CF8F7D533BA 2018-03-21 16:06:08.799 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 91B3FAFFD95756663E5C0EC4987DBD9D5BF995B6CD1DA93BA94B2803A6FD1B42 2018-03-21 16:06:08.805 UTC [main] main -> INFO 009 Exiting.....

crissi (Wed, 21 Mar 2018 16:07:54 GMT):
It worked.

crissi (Wed, 21 Mar 2018 16:07:59 GMT):
Thank you

crissi (Wed, 21 Mar 2018 16:11:49 GMT):
Can you specify any other channels that are useful for a beginner?

muralisr (Wed, 21 Mar 2018 16:34:03 GMT):
@crissi all channels are game... `fabric`, `fabric-questions` would be good ones in general

crissi (Wed, 21 Mar 2018 16:45:14 GMT):
Thank you

freddyisaac (Wed, 21 Mar 2018 21:52:33 GMT):
I think I found my issue with my chaincode

freddyisaac (Wed, 21 Mar 2018 21:54:16 GMT):
I had mistype the CORE_GOSSIP_ORGLEADER as CORE_GOOSIP_ORGLEADER

freddyisaac (Wed, 21 Mar 2018 21:54:58 GMT):
so I am guessing that the peer I was deploying the chaincode to was not a leader and unable to propagate the change

freddyisaac (Wed, 21 Mar 2018 21:55:17 GMT):
although the peer log certainly never gave any hints as to that was the case

freddyisaac (Wed, 21 Mar 2018 21:55:17 GMT):
although the peer log certainly never gave any hints as to that beingthe case

freddyisaac (Wed, 21 Mar 2018 21:56:00 GMT):
it this a valid use case - i.e. that chaincode can only be deployed to an org leader - if so a peer entry about trying to deploy to a peer that it not one might help

freddyisaac (Wed, 21 Mar 2018 21:56:00 GMT):
it this a valid use case - i.e. that chaincode can only be deployed to an org leader - if so a peer log entry about trying to deploy to a peer that it not one might help

freddyisaac (Wed, 21 Mar 2018 21:57:17 GMT):
as the only hint it gave about anything being wrong was on the lscc lookup of the chaincode name

danfeng (Thu, 22 Mar 2018 03:31:34 GMT):
Has joined the channel.

suntoe (Thu, 22 Mar 2018 03:50:16 GMT):
Has joined the channel.

pkarolis (Thu, 22 Mar 2018 09:38:30 GMT):
I started using Fabric 1.1.0 and its images. Trying out new fabric functionality CID. However, i am getting following error when instantiating chaincode ` can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)`

SashiKanth (Thu, 22 Mar 2018 12:38:49 GMT):
what the difference between install and instantiate of chaincode

SashiKanth (Thu, 22 Mar 2018 12:38:51 GMT):
??

SashiKanth (Thu, 22 Mar 2018 12:39:52 GMT):
can we launch a number of similar chaincode docker containers in the network in the same channel ??

SashiKanth (Thu, 22 Mar 2018 12:47:53 GMT):
if the answer is no .... but i can see that, in fabric-sample/first-network launches three chaincode docker containers ffor the same mycc-v1.0 chaincode !!

gesaleh (Thu, 22 Mar 2018 14:10:56 GMT):
do we have an example for a token like etherium using smart contract ?

tomislav (Thu, 22 Mar 2018 15:02:52 GMT):
Has left the channel.

parsiya (Thu, 22 Mar 2018 17:13:29 GMT):
@SashiKanth `Install`: copy the built chaincode to endorsing peer (not exactly but that is the simplified version of it) on a channel. `Instantiate`: Set the initial state of the channel. Look at the `SimpleAsset` example. http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4ade.html#terminal-3-use-the-chaincode If you want to know what exactly `install` does, the source code is at: https://github.com/hyperledger/fabric/blob/release-1.1/peer/chaincode/install.go

parsiya (Thu, 22 Mar 2018 17:16:46 GMT):
`Instantiate` basically calls the `Init` method from the Chaincode interface. For `SimpleAsset` it's essentially a `PutState` with a key/value. https://github.com/hyperledger/fabric-samples/blob/release-1.1/chaincode/sacc/sacc.go#L23

parsiya (Thu, 22 Mar 2018 17:16:46 GMT):
`Instantiate` basically calls the `Init` method from the Chaincode interface. For `SimpleAsset` it's simply a `PutState` with a key/value. https://github.com/hyperledger/fabric-samples/blob/release-1.1/chaincode/sacc/sacc.go#L23

freddyisaac (Thu, 22 Mar 2018 17:57:24 GMT):
currently I believe (from my most recent adventures) that the install will create an entry in the lscc namespace which is used for invoke lookups

patelan (Thu, 22 Mar 2018 18:01:17 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.

y.yone (Fri, 23 Mar 2018 00:22:38 GMT):
Has joined the channel.

y.yone (Fri, 23 Mar 2018 00:23:52 GMT):
@muralisr Hello, I tried to import golang package-binary(※) when instantiating chaincode and got this error.(※)https://github.com/tcnksm/go-binary-only-package "missing or invalid package binary for binary-only package ・・・" Does Fabric(v1.0.0) support using package-binary?

muralisr (Fri, 23 Mar 2018 00:36:27 GMT):
@freddyisaac I think you might have meant to say ` I believe (from my most recent adventures) that the instantiate .... ` (not `install`)

muralisr (Fri, 23 Mar 2018 00:38:16 GMT):
@y.yone sounds like you are trying to import a package that's not found ? typically implies you need to vendor the package

muralisr (Fri, 23 Mar 2018 00:40:05 GMT):
@patelan need more information... what is getting into the hung state ? the client application ? what are you using for client (sdk ? CLI ?) .... need logs and basically lot more info

Hangyu (Fri, 23 Mar 2018 00:49:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=G6pzoaiY5kHcWjZ4t) @muralisr Actually I had the same experience with @y.yone. I made the binary package and a dummy package for distribution and it got the chaincode built successfully locally. But when I tried to vendor all the necessary packages, the dummy package got vendered instead of the binary, and hence that error message occurred during instantiation phase. I am also wondering that if fabric supports using binary package for chaincode development? or are there any ways of vendoring binary package?

muralisr (Fri, 23 Mar 2018 01:07:51 GMT):
@Hangyu @y.yone currently fabric doesn't support shipping binary chaincode (misunderstood your original question @y.yone ...apologies)

muralisr (Fri, 23 Mar 2018 01:07:51 GMT):
@Hangyu @y.yone currently fabric doesn't support shipping go binary chaincode (misunderstood your original question @y.yone ...apologies)

Hangyu (Fri, 23 Mar 2018 01:24:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=o2JWxjo57Lx8dSAWK) @muralisr Thanks for your answer, it certainly cleared things up.

CodeReaper (Fri, 23 Mar 2018 05:19:16 GMT):
Hi, can we access roles and affiliations of users inside chaincode in 1.1?

SashiKanth (Fri, 23 Mar 2018 05:52:16 GMT):
@parsiya but what about this but what about this can we launch a number of similar chaincode docker containers in the network in the same channel ?? if the answer is no .... i can see that, in fabric-sample/first-network launches three chaincode docker containers ffor the same mycc-v1.0 chaincode !!

SashiKanth (Fri, 23 Mar 2018 05:52:16 GMT):
@parsiya but what about this but what about this can we launch a number of similar chaincode docker containers in the network in the same channel ?? if the answer is no .... then i can see that, in fabric-sample/first-network launches three chaincode docker containers ffor the same mycc-v1.0 chaincode !!

kiattchaip (Fri, 23 Mar 2018 05:54:20 GMT):
Has joined the channel.

LifeOcean (Fri, 23 Mar 2018 09:27:58 GMT):
Has joined the channel.

Exci (Fri, 23 Mar 2018 10:01:14 GMT):
Has joined the channel.

CodeReaper (Fri, 23 Mar 2018 11:55:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jScjFs4FKMXwa9i64) @SashiKanth those container's full names are different, something like a 'dev_peer0' or something between

mna2016 (Fri, 23 Mar 2018 12:07:33 GMT):
Hi All

mna2016 (Fri, 23 Mar 2018 12:07:36 GMT):
0 down vote favorite I am running Docker Toolbox on Windows. I have downloaded fabric samples from https://github.com/hyperledger/fabric-samples. Modified the fabcar chaincode. The first time I ran ./startFabric.sh to bring up the local blokchain network, the chaincode is getting picked up well and fine. Now I make further changes to fabcar chaincode. But this time, my latest chaincode changes are not being picked up by the blockchain network. I still see old log messages and responses. I have tried the following options already: 1) clearing up docker containers 2) restarting docker toolbox. 3) rerunning ./startFabric.sh from scratch. The only time my chaincode changes are picked up is the "first ever time" when i use that particular chaincode. Thereafter the first chaincode somehow resides in the memory forever. Please let me know what I am doing wrong.

patelan (Fri, 23 Mar 2018 13:00:45 GMT):
patelan

patelan (Fri, 23 Mar 2018 13:25:43 GMT):
@muralisr Thanks for updates. SDK is trying to instantiate chaincode. and it is not moving further and no error till next 15 mins. We are using node sdk 1.0.3. No error in peer, orderer, CA. I will provide the logs

muralisr (Fri, 23 Mar 2018 13:35:09 GMT):
@patelan in that case it might be better to take this up on the SDK channels please

muralisr (Fri, 23 Mar 2018 13:35:26 GMT):
as a first stop at least

JayPandya (Fri, 23 Mar 2018 19:34:39 GMT):
Has joined the channel.

patelan (Fri, 23 Mar 2018 19:35:59 GMT):
@muralisr okey sure. QQ Do we have any keepalive setting between peer and orderer ? We are using fabric 1.0.3

Vya4eslav (Fri, 23 Mar 2018 20:04:25 GMT):
Has joined the channel.

albert.lacambra (Fri, 23 Mar 2018 20:05:40 GMT):
Hi are the experimental features enabled per default on the docker hub images? i.e. https://hub.docker.com/r/hyperledger/fabric-****/tags/x86_64-1.1.0

patelan (Fri, 23 Mar 2018 20:05:57 GMT):
@muralisr I got my answer from fabric-orderer channel. Thanks for help

DUY_TA_CONG (Sat, 24 Mar 2018 19:54:26 GMT):
Has joined the channel.

DUY_TA_CONG (Sat, 24 Mar 2018 20:09:23 GMT):
hi :family_mwgb: ,please help me with a error. i have posted it at : https://github.com/hyperledger/composer/issues/3681.iam worry!!

DUY_TA_CONG (Sat, 24 Mar 2018 20:09:23 GMT):
hi :family_mwgb: ,please help me with a error. i have posted it at : https://github.com/hyperledger/composer/issues/3681.iam worry!!

DUY_TA_CONG (Sat, 24 Mar 2018 20:09:23 GMT):
hi :family_mwgb: ,please help me with a error. i have posted it at : https://github.com/hyperledger/composer/issues/3681 .I am worry!!

AntoniosHadji (Sat, 24 Mar 2018 22:47:27 GMT):
Has joined the channel.

pankajcheema (Sun, 25 Mar 2018 09:35:24 GMT):
Has joined the channel.

pankajcheema (Sun, 25 Mar 2018 09:37:14 GMT):
Hi all! Anyone here knows how to print chaincode logs in peer container? For example I am using invoke command and the body of `invoke` function has a statement `fmt.Print("Hii")`. I want to print that log on container when executing that commant. Any help would be appreciated Thanks

pankajcheema (Sun, 25 Mar 2018 09:37:14 GMT):
Hi all! Anyone here knows how to print chaincode logs in peer container? For example I am using invoke command and the body of `invoke` function has a statement `fmt.Print("Hii")`. I want to print that log on container when executing that command. Any help would be appreciated Thanks

hantzaras (Sun, 25 Mar 2018 14:20:30 GMT):
Has joined the channel.

crissi (Mon, 26 Mar 2018 06:48:36 GMT):
I am trying to develop supply chain use case using fabric..Any sample chaincode to refer?

j1984 (Mon, 26 Mar 2018 07:00:12 GMT):
Has joined the channel.

chessequality (Mon, 26 Mar 2018 07:11:23 GMT):
Has joined the channel.

crissi (Mon, 26 Mar 2018 10:05:07 GMT):
I am trying to test the chaincode.I am following the tutorial. https://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4ade.html But it raises the following error :- ``` orderer | 2018-03-26 10:01:29.657 UTC [orderer/common/server] initializeLocalMsp -> CRIT 017 Failed to initialize local MSP: signing identity expired 3232h54m29.657735856s ago orderer exited with code 1 cli | 2018-03-26 10:01:32.424 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/msp: signing identity expired 3232h54m32.424504147s ago cli exited with code 1 ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value

IlhamQasse (Mon, 26 Mar 2018 14:24:50 GMT):
Has joined the channel.

MattHamilton (Mon, 26 Mar 2018 15:47:25 GMT):
Has joined the channel.

0xSEGFAULT (Mon, 26 Mar 2018 17:15:13 GMT):
Hey guys, how do you update the certs after they expire?

Tuoba (Mon, 26 Mar 2018 19:40:30 GMT):
Has joined the channel.

crissi (Tue, 27 Mar 2018 06:18:11 GMT):
I am facing an issue while creating the chaincode in any other location other than the fabric-samples directory.Can I need to specify any path to the directory for the chaincodes,I am writing. ``` go install "github.com/hyperledger/fabric/bccsp/factory: open /usr/lib/go-1.9/pkg/linux_amd64/github.com/hyperledger/fabric/bccsp/factory.a :permission denied ``` I am facing this issue in fabric-samples directory too,If I create any other directory other than the directories listed in fabric-samples. Any comment on this issue?

thakurnikk (Tue, 27 Mar 2018 06:27:48 GMT):
Has joined the channel.

zian.yusuf (Tue, 27 Mar 2018 09:42:48 GMT):
Has joined the channel.

crissi (Tue, 27 Mar 2018 12:54:11 GMT):
Its possible to build the chaincode, even though it raises the above issue. I have written a simple chaincode.I am following this tutorial http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4ade.html for deployment of chaincode. But it raises the following issue. ``` Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1 Usage: peer channel create [flags] ``` Any idea regarding this.

thoduerr (Tue, 27 Mar 2018 14:43:01 GMT):
Has joined the channel.

indira.kalagara (Wed, 28 Mar 2018 04:26:17 GMT):
Has joined the channel.

kingofsevens (Wed, 28 Mar 2018 06:10:40 GMT):
Has joined the channel.

c.nattawit (Wed, 28 Mar 2018 07:57:33 GMT):
Has joined the channel.

c.nattawit (Wed, 28 Mar 2018 08:33:55 GMT):
Hello, is there any constraint for channel and chaincode name? I saw function `(*ChaincodeStub) InvokeChaincode` just concat chaincode name and channel together with "/", will there be any problem if any of those contain "/" too?

SashiKanth (Wed, 28 Mar 2018 12:03:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=XNzRjCqhkGQBXpsrC) @CodeReaper then why there are 3 instances of dev-* containers running when we launch first-network (fabric-samples/first-network)

CodeReaper (Thu, 29 Mar 2018 06:26:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9zrBaXtHosPfvCmyt) @SashiKanth I think test script only invokes or queries a few peers. Only those peers, plus the ones on whom instantiation was done upon, start their own containers of chaincode

joshhw (Thu, 29 Mar 2018 14:59:32 GMT):
how does someone update/upgrade chaincode after installing it? Is this process the same as the initial install and if so are there any plans to allow a broadcast of new chaincode to avoid the need for each peer to manually install it on its own?

richzhao (Thu, 29 Mar 2018 16:17:38 GMT):
Has joined the channel.

sanchezl (Thu, 29 Mar 2018 16:40:32 GMT):
Has anyone seen this: ```2018-03-29 15:37:30.883 UTC [common/deliver] deliverBlocks -> WARN 3c3 Rejecting deliver for 172.18.0.1:45826 due to envelope validation error: envelope timestamp 2018-03-29 16:34:53 +0000 UTC is more than 15m0s apart from current server time 2018-03-29 15:37:30.883577166 +0000 UTC m=+6.953063301 ``` Just started happening to me on master after pulling the latest commits. The clocks are synced on all machines involved. The envelope timestamps are off by an hour.

tkg (Thu, 29 Mar 2018 21:59:47 GMT):
Has joined the channel.

AmanBains (Thu, 29 Mar 2018 22:05:21 GMT):
Has joined the channel.

yacovm (Thu, 29 Mar 2018 22:23:15 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service

yacovm (Thu, 29 Mar 2018 22:23:15 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service :scorpion:

yacovm (Thu, 29 Mar 2018 22:23:15 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service :scorpion: protects against malicious users and people with broken :clock:

yacovm (Thu, 29 Mar 2018 22:23:15 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service :scorpion: protects against malicious users and people with broken :clock1:

yacovm (Thu, 29 Mar 2018 22:29:13 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service. Protects against: 1) Malicious users :scorpion: 2) People with broken clocks :alarm_clock: 3) Time travelers :rocket: :space_invader:

yacovm (Thu, 29 Mar 2018 22:29:13 GMT):
@sanchezl yes, it's a defense mechanism of the deliver service. Protects against: 1) Malicious users :spy: 2) People with broken clocks :alarm_clock: 3) Time travelers :rocket: :space_invader:

sanchezl (Fri, 30 Mar 2018 04:39:31 GMT):
My next pull/build fixed it.

pankajcheema (Fri, 30 Mar 2018 05:23:24 GMT):
Hi All

pankajcheema (Fri, 30 Mar 2018 05:27:28 GMT):
I have a question in my mind

pankajcheema (Fri, 30 Mar 2018 05:27:30 GMT):
In the document it is written `To create a signed chaincode package, use the following command:` ``` peer chaincode package -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 -s -S -i "AND('OrgA.admin')" ccpack.out ``` my question is who is signing the chaincode here?

pankajcheema (Fri, 30 Mar 2018 05:27:47 GMT):
The document can be found here `http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4noah.html`

Yi (Fri, 30 Mar 2018 06:33:02 GMT):
Has joined the channel.

muralisr (Fri, 30 Mar 2018 09:18:54 GMT):
@pankajcheema don't use the "-s -S" option . It was put in place as a place holder for policies around chaincode lifecycle. The ongoing chaincode lifecycle work will make these unncessary and will likely deprecate those

pankajcheema (Fri, 30 Mar 2018 09:20:02 GMT):
@muralisr What should I use in place of -s and -S ?

pankajcheema (Fri, 30 Mar 2018 09:20:10 GMT):
If I use this command

pankajcheema (Fri, 30 Mar 2018 09:20:29 GMT):
I am able to execute the chaincode properly

muralisr (Fri, 30 Mar 2018 09:21:35 GMT):
for now `peer chaincode package -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 ccpack.out` is what I'd suggest

muralisr (Fri, 30 Mar 2018 09:22:00 GMT):
this allows you to create ccpack.out once and use it to install on multiple peers

muralisr (Fri, 30 Mar 2018 09:22:14 GMT):
like `peer chaincode install ccpack.out`

muralisr (Fri, 30 Mar 2018 09:22:14 GMT):
like `CORE_PEER_ADDRESS= peer chaincode install ccpack.out`

FengChen_1982 (Sat, 31 Mar 2018 09:43:53 GMT):
Am I correct?

FengChen_1982 (Sat, 31 Mar 2018 09:47:37 GMT):
Using stub.GetQueryResult(), I can only get all the data those created by the same ChainCode currently executing? Right?

JiuZhuYou (Sat, 31 Mar 2018 10:34:32 GMT):
Has joined the channel.

jrosmith (Sat, 31 Mar 2018 10:57:18 GMT):
@joshhw all the peers that will be running the new chaincode will have to have the new chaincode installed. as with instantiation the upgrade command only needs to be called by one peer on the channel. i don't know if there are any plans regarding broadcasting new chaincode, but i'm assuming solutions for getting new chaincode on the peers is considered out of scope. one of the maintainers will have more concrete information for you

thalisson (Sun, 01 Apr 2018 02:43:59 GMT):
Has joined the channel.

muralisr (Sun, 01 Apr 2018 12:31:06 GMT):
@FengChen_1982 yes. to add to that, you'll only get committed changes. In particular any "PutState" prior to the query in the same proposal execution won't be reflected in the query result

karthi-gee (Sun, 01 Apr 2018 15:23:13 GMT):
Has joined the channel.

zhasni (Sun, 01 Apr 2018 18:02:57 GMT):
Has joined the channel.

sukritVisa (Sun, 01 Apr 2018 22:37:18 GMT):
Has joined the channel.

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: `2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf)` Why is it timing out on the peer?

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) ``` Why is it timing out on the peer?

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).launchAndWaitForRegister /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:569 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Launch /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:731 github.com/hyperledger/fabric/core/chaincode.Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/exectransaction.go:45 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:83 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:164 github.com/hyperledger/fabric/core/endorser.(*Endorser).simulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:265 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:491 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:31 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112 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:781 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:981 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:551 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2337 ``` Why is it timing out on the peer?

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) + STACK TRACE ``` Why is it timing out on the peer?

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) ``` + long STACK TRACE Why is it timing out on the peer?

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) ``` + long STACK TRACE Why is it timing out on the peer? @muralisr

amolpednekar (Mon, 02 Apr 2018 09:18:31 GMT):
Hi I was trying to deploy a nodeJs chaincode (fabric-samples/chaincode_example02), getting this error: ```2018-04-02 08:43:47.572 UTC [lscc] executeInstall -> INFO 04e Installed Chaincode [node_chaincode_example02b] Version [v0] to peer 2018-04-02 08:48:47.934 UTC [chaincode] Launch -> ERRO 04f launchAndWaitForRegister failed: timeout expired while starting chaincode node_chaincode_example02b:v0(networkid:dev,peerid:peer0.org1.example.com,tx:d4e3c18f49342396b35981658c95b3640c040bbcce1c6a6ae6e6cc5bcb1adecf) ``` + long STACK TRACE Why is it timing out on the peer? The docker image has been created, container doesnt start. @muralisr Edit: Tried increasing CORE_CHAINCODE_EXECUTETIMEOUT, but it doesnt do anything after ``` INFO 033 Installed Chaincode [simple5] Version [v0] to peer ```

SashiKanth (Mon, 02 Apr 2018 13:24:43 GMT):
How to run a chaincode written in nodejs in chaincode-docker-devmode project given in fabric-samples

SashiKanth (Mon, 02 Apr 2018 13:24:47 GMT):
??

SashiKanth (Mon, 02 Apr 2018 13:25:07 GMT):
whats the command to run the chaincode

SashiKanth (Mon, 02 Apr 2018 13:25:08 GMT):
??

SashiKanth (Mon, 02 Apr 2018 13:26:30 GMT):
for GO the command is CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02 but what is it for node ??

audreyle (Mon, 02 Apr 2018 17:19:01 GMT):
Has joined the channel.

htyagi90 (Mon, 02 Apr 2018 19:56:31 GMT):
Given that we have node.js chaincode functionality, what are the comparisons, pros and cons of node.js chaincode as compared to go chaincode in terms of performance, scalability perspectives ?

htyagi90 (Mon, 02 Apr 2018 19:56:31 GMT):
Given that we have node.js chaincode functionality, what are the comparisons, pros and cons of node.js chaincode as compared to go chaincode in terms of performance, scalability perspectives, hyperledger fabric specific ?

amolpednekar (Tue, 03 Apr 2018 05:10:01 GMT):
node

deepakvparmar (Tue, 03 Apr 2018 05:43:23 GMT):
Has joined the channel.

deepakvparmar (Tue, 03 Apr 2018 05:45:17 GMT):
Anyone has used nodejs fabric module to write chaincode? I am trying to configure fabric-chainocode-node on window using vagrant. I am facing following issue while executing command "npm install" npm ERR! path /opt/gopath/src/github.com/hyperledger/fabric-chaincode-node/node_modules/grpc/node_modules/mkdirp/node_modules/minimist/package.json.3041168977 npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/opt/gopath/src/github.com/hyperledger/fabric-chaincode-node/node_modules/grpc/node_modules/mkdirp/node_modules/minimist/package.json.3041168977' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent Any pointer of help would be very helpful,

SashiKanth (Tue, 03 Apr 2018 06:58:34 GMT):
now getting an error when trying to run the chaincode written in node in dev-mode throw new Error('The "peer.address" program argument must be set to a legitimate value of :');

SashiKanth (Tue, 03 Apr 2018 06:58:36 GMT):
??

SashiKanth (Tue, 03 Apr 2018 07:21:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=E3qXxLfaDkGByqeCL) CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 node chaincode_example02.js --peer.address=peer:7052

deepakvparmar (Tue, 03 Apr 2018 08:08:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rNHHEphA4jNBKWzL9) : I could able to resolve this issue by rebuilding grpc module forcefully.

deepakvparmar (Tue, 03 Apr 2018 08:10:09 GMT):
I am trying to install nodejs chaincode by using following command: *CORE_LOGGING_PEER=debug ./build/bin/peer chaincode install -l node -n mycc -p /opt/gopath/src/github.com/hyperledger/fabric-chaincode-node/test/integration -v v0* but, getting access denied error: *Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [] creator org [DEFAULT]* Any pointer or suggestion would be very helpful,

deepakvparmar (Tue, 03 Apr 2018 08:10:43 GMT):
I am trying to install nodejs chaincode by using following command: *CORE_LOGGING_PEER=debug ./build/bin/peer chaincode install -l node -n mycc -p /opt/gopath/src/github.com/hyperledger/fabric-chaincode-node/test/integration -v v0* but, getting access denied error: *Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [] creator org [DEFAULT]* Any pointer or suggestion would be very helpful,

suvpatil (Tue, 03 Apr 2018 09:58:37 GMT):
Hi team, how can I find logs of my nodeJS chaincode?

sayan.hlf (Tue, 03 Apr 2018 10:32:39 GMT):
Has joined the channel.

amolpednekar (Tue, 03 Apr 2018 12:21:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wY7Cpe5LWJmMDtKhc) @suvpatil Have console.log() statements in your chaincode, & run docker logs (add -f flag to continuously log the output)

amolpednekar (Tue, 03 Apr 2018 12:22:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mkHTWiRobGA37advm) Solved this, had renamed my chaincode, forgot to make that change in npm start script

BilalAhmad (Tue, 03 Apr 2018 13:44:21 GMT):
Has joined the channel.

SashiKanth (Wed, 04 Apr 2018 06:27:18 GMT):
I am following the steps to run the blockchain code from balance-transfer in the sample codes provided by hyperledger. https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer. Things work smoothly when I run it with golang but I get the following error when I run it with node.js. error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: error starting container: Failed to generate platform-specific docker build: Error returned from build: 254 "npm WARN example_cc@1.0.0 No repository field.

SashiKanth (Wed, 04 Apr 2018 06:27:18 GMT):
I am following the steps to run the blockchain code from balance-transfer in the sample codes provided by hyperledger. https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer. Things work smoothly when I run it with golang but I get the following error when I run it with node.js. error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: error starting container: Failed to generate platform-specific docker build: Error returned from build: 254 "npm WARN example_cc@1.0.0 No repository field. is chaincodes written in nodeJs supported in release-1.1.0 ???

jojialex2 (Wed, 04 Apr 2018 07:17:14 GMT):
If my node is admin node and joined to all the channels in the network and same smart contract deployed to all the channel, this scenario , is admin can query all data from all channels from a single query. My understanding is No, but is there any workaround ?

avkrishnan (Wed, 04 Apr 2018 08:49:13 GMT):
Has joined the channel.

rock_martin (Wed, 04 Apr 2018 09:20:00 GMT):
Hi, I have a query : Suppose I am making a scalable blockchain solution in which organisations are included in ledger frequently.Suppose my chaincode has an endorsement policy of some existing organisations,I will have to upgrade the chaincode on all the peers with the new endorsement policy involving in the new organisation.Until they updated all the peers, we wont be able to do any transactions invloving peers who might have yet to upgrade the chaincode.This limits either the transactions or frequently including new organizations. Any suggestions for us would help us a lot.

lclclc (Wed, 04 Apr 2018 11:00:01 GMT):
Has joined the channel.

lclclc (Wed, 04 Apr 2018 11:02:20 GMT):
A quick question about chaincode, can chaincode work like a normal network client which establish network connection? As I remember the answer is no, because this can harm read-write-set semantics. But I can't find proof about it. Anyone knows if the answer is "no"? If my understanding is correct, how chaincode is forbidden from being a normal network client?

lclclc (Wed, 04 Apr 2018 11:02:20 GMT):
A quick question about chaincode, can chaincode work like a normal network client which establishes network connection? As I remember the answer is no, because this can harm read-write-set semantics. But I can't find proof about it. Anyone knows if the answer is "no"? If my understanding is correct, how chaincode is forbidden from being a normal network client?

lclclc (Wed, 04 Apr 2018 11:02:20 GMT):
A quick question about chaincode, can chaincode work like a normal network client which establishes network connection? As I remember the answer is "no", because this can harm read-write-set semantics. But I can't find proof about it. Anyone knows if the answer is "no"? If my understanding is correct, how chaincode is forbidden from being a normal network client?

jrosmith (Wed, 04 Apr 2018 12:32:52 GMT):
@lclclc youre saying making requests to external sources from within the chaincode? there is nothing at the chaincode layer that stops you from importing an http library and using it to execute requests externally. but when it comes time to inspect transaction proposals peers will be in disagreement about the end state of the transaction and the transaction will fail the read/write set check, preventing it from being appended to the ledger

jrosmith (Wed, 04 Apr 2018 12:35:39 GMT):
@rock_martin yes, if the new organizations are completely unique entities with unique MSP identifiers the endorsement policy will have to be updated each time. perhaps you could create an umbrella MSP and manage users that way? as you add new users you will enroll them using the umbrella identity and when its time for the users to leave you can revoke their certificates

jrosmith (Wed, 04 Apr 2018 12:39:33 GMT):
@jojialex2 you can read chaincode data from multiple channels, if the admin is a member of all channels you should be able to find a workaround. maybe this will help https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L65

lclclc (Wed, 04 Apr 2018 12:45:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9ucRM9FyCgpjCWcN3) @jrosmith yes,that's what I meant by ' this can harm read-write-set semantics'

jrosmith (Wed, 04 Apr 2018 12:47:09 GMT):
@lclclc oops i completely missed that! if i remember correctly the read/write stuff is enforced when the transaction is sent for ordering. to my knowledge there is nothing beyond that stopping the chaincode from accessing outside networks

lclclc (Wed, 04 Apr 2018 12:50:57 GMT):
The problem is, if the chaincode take accessing outside network as the one step of the simulation, one chaincode container can succeed, aonther chaincode container can fail due to unstable network accessibility. Then client can not collect enough endorsement.

lclclc (Wed, 04 Apr 2018 12:51:04 GMT):
@jrosmith

SashiKanth (Wed, 04 Apr 2018 13:19:25 GMT):
npm ERR! enoent ENOENT: no such file or directory, rename '/chaincode/output/node_modules/grpc/node_modules/getpass/node_modules/assert-plus' -> '/chaincode/output/node_modules/grpc/node_modules/getpass/node_modules/.assert-plus.DELETE' npm ERR! enoent This is related to npm not being able to find a file.

RadW2020 (Wed, 04 Apr 2018 19:00:53 GMT):
Has joined the channel.

jrosmith (Thu, 05 Apr 2018 05:17:46 GMT):
@lclclc yep youre absolutely right. i believe the current approach to that right now is "don't do that," but at the networking level im sure you could restrict any incoming/outgoing calls to just what the peer needs to participate in the network.

ascatox (Thu, 05 Apr 2018 09:49:43 GMT):
Hi All I'm trying to develop a chaincode using node, I upgraded my network to 1.1.0 version, I can install the chaincode correctly but when I try to instantiate the chaincode I get a Timeout error.

ascatox (Thu, 05 Apr 2018 09:50:22 GMT):
Another strange thing is the lack of node and npm installed inside the peer. Is this correct ?

MonnyClara (Thu, 05 Apr 2018 10:00:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=czedWz5N3SeqKxhyR) @ascatox You are working with a classical docker (not Docker Swarm or equivalent) ? For npm and node, I *think *that it's not necessary. When the chaincode will be instantiated, a new docker will be created with all the logic inside. When the peer will interact with the chaincode container, the peer will not need node.

ascatox (Thu, 05 Apr 2018 10:01:20 GMT):
Yes I'm using docker standard, not Swarm or other stuff.

ascatox (Thu, 05 Apr 2018 10:19:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GBwxWgoiPWA6RLavn) @MonnyClara My network is behind a corporate proxy, may be this a problem for the node chaincode instantiation for you ?

ascatox (Thu, 05 Apr 2018 10:19:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GBwxWgoiPWA6RLavn) @MonnyClara My network is behind a corporate proxy, may be this a problem for the node chaincode instantiation for you?

ascatox (Thu, 05 Apr 2018 10:26:57 GMT):
*ERRO 003 Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code ETIMED*

ascatox (Thu, 05 Apr 2018 10:27:17 GMT):
Someone has never encountered this error!!!!

kai_den (Thu, 05 Apr 2018 11:46:47 GMT):
Hi everyone! Please tell me how to deploy locally developed chaincode in the docker container. Version is v1.0

SashiKanth (Thu, 05 Apr 2018 13:50:06 GMT):
Does realese-1.1.0 work properly with chaincodes written in node

SashiKanth (Thu, 05 Apr 2018 13:50:07 GMT):
??

SashiKanth (Thu, 05 Apr 2018 14:07:01 GMT):
OR can i instantiate chainccodes written in nodejs along with starting a COUCHDB ??

SashiKanth (Thu, 05 Apr 2018 14:08:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=gvyZLdLfT77hFgmLp) @ascatox facing the same problem, but i am also using couchdb for index searches !!

SmartContract2018 (Thu, 05 Apr 2018 19:34:59 GMT):
Has joined the channel.

MonnyClara (Fri, 06 Apr 2018 08:26:59 GMT):
Hello, I understood that if I install/instantiate a new chaincode, a new docker is lauched. As a docker has a relatively short lifecycle. What happens if my docker dies ? Is it regenerate ?

asadhayat (Fri, 06 Apr 2018 10:15:06 GMT):
I am trying to use `Client Identity Chaincode Library` (https://github.com/hyperledger/fabric/tree/release-1.1/core/chaincode/lib/cid)

asadhayat (Fri, 06 Apr 2018 10:15:06 GMT):
I am trying to use `Client Identity Chaincode Library` (https://github.com/hyperledger/fabric/tree/release-1.1/core/chaincode/lib/cid) The chaincode compiles successfully, but when i try to install it (in chaincode-docker-dev environment), it gives error

asadhayat (Fri, 06 Apr 2018 10:15:06 GMT):
I am trying to use `Client Identity Chaincode Library` (https://github.com/hyperledger/fabric/tree/release-1.1/core/chaincode/lib/cid) The chaincode compiles successfully, but when i try to install it (in chaincode-docker-dev environment), it gives error ``` 2018-04-06 10:06:18.469 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-04-06 10:06:18.470 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-04-06 10:06:18.470 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2018-04-06 10:06:18.470 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2018-04-06 10:06:18.470 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2018-04-06 10:06:19.758 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS chaincodedev/chaincode/sacc3 2018-04-06 10:06:20.627 UTC [golang-platform] func1 -> DEBU 007 Discarding GOROOT package fmt 2018-04-06 10:06:20.628 UTC [golang-platform] func1 -> DEBU 008 Accepting import: github.com/hyperledger/fabric/core/chaincode/lib/cid 2018-04-06 10:06:20.628 UTC [golang-platform] func1 -> DEBU 009 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim 2018-04-06 10:06:20.628 UTC [golang-platform] func1 -> DEBU 00a Discarding provided package github.com/hyperledger/fabric/protos/peer 2018-04-06 10:06:20.628 UTC [golang-platform] func1 -> DEBU 00b Discarding GOROOT package strconv Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/lib/cid: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH) Usage: peer chaincode install [flags] ....... ```

CodeReaper (Fri, 06 Apr 2018 10:24:33 GMT):
Hi, I have a query regarding a the 'cid' package. If I enroll same user from two applications. Will the cid.GetId give same ID for both????

peakcodes (Fri, 06 Apr 2018 21:35:51 GMT):
Has joined the channel.

habpygo (Sat, 07 Apr 2018 10:16:47 GMT):
Has left the channel.

MarvinBechtold (Sat, 07 Apr 2018 11:23:31 GMT):
Has joined the channel.

CodeReaper (Sat, 07 Apr 2018 11:53:48 GMT):
Also Can I transfer all the arguments through transient only?? Any issues, such as slow performance or something??

yacovm (Sat, 07 Apr 2018 12:53:43 GMT):
nope, no issues @CodeReaper

yacovm (Sat, 07 Apr 2018 12:53:58 GMT):
that's what I'd do if i want to hide the input to the chaincode

CodeReaper (Sat, 07 Apr 2018 12:54:13 GMT):
Thanks @yacovm

CodeReaper (Sat, 07 Apr 2018 12:54:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9PPLBGYuq6QLQ7bdo) Also if you can comment on this @yacovm

yacovm (Sat, 07 Apr 2018 12:55:58 GMT):
that simply does: ``` id := fmt.Sprintf("x509::%s::%s", getDN(&c.cert.Subject), getDN(&c.cert.Issuer)) return base64.StdEncoding.EncodeToString([]byte(id)), nil ```

muralisr (Sat, 07 Apr 2018 14:47:54 GMT):
@asadhayat you need go vendor the github.com/hyperledger/fabric/core/chaincode/lib/cid library so its packaged with your chaincode

muralisr (Sat, 07 Apr 2018 14:47:54 GMT):
@asadhayat you need vendor the github.com/hyperledger/fabric/core/chaincode/lib/cid library so its packaged with your chaincode

muralisr (Sat, 07 Apr 2018 14:51:01 GMT):
@MonnyClara the chaincode runing in docker will stay up unless on some fault (connection loss, crash, manual stop etc). In those cases next request to the chaincode (such as invoke or query from CLI, or call from an SDK app) will bring it up automatically for you

muralisr (Sat, 07 Apr 2018 14:51:44 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=srnH2A8zN5qmEDX8t

muralisr (Sat, 07 Apr 2018 14:53:50 GMT):
@SashiKanth what are you running into ?

sv2011 (Sat, 07 Apr 2018 23:10:58 GMT):
Has joined the channel.

lclclc (Sun, 08 Apr 2018 07:26:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ThuBpGJrkQqL9Lgdm) @jrosmith As the chaincode container is created by Fabric, I used to thought Fabric will take this into consideration and prevent inbound/outbound network traffic except for grpc.

lclclc (Sun, 08 Apr 2018 07:27:16 GMT):
But according to my investigation, Fabric leaves this problem to developers.

yacovm (Sun, 08 Apr 2018 07:29:12 GMT):
what problem?

yacovm (Sun, 08 Apr 2018 07:29:17 GMT):
@lclclc

luckydogchina (Sun, 08 Apr 2018 07:30:57 GMT):
excuse me, the chaincode can be written with java in fabric?

lclclc (Sun, 08 Apr 2018 07:40:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=gMfg5ftBX9MFanP6R) @yacovm the chaincode shouldn't access network, but no constraint as I observe from chaincode compilation side and container side.

yacovm (Sun, 08 Apr 2018 07:41:10 GMT):
why shouldn't it access the network?

lclclc (Sun, 08 Apr 2018 07:45:27 GMT):
Because network is unstable, result from outside network will affect the simulation of the transaction calculation result.

yacovm (Sun, 08 Apr 2018 07:46:27 GMT):
that is correct

yacovm (Sun, 08 Apr 2018 07:46:30 GMT):
so?

yacovm (Sun, 08 Apr 2018 07:46:43 GMT):
who said the chaincode execution *has* to be deterministic?

yacovm (Sun, 08 Apr 2018 07:46:59 GMT):
a chaincode can do anything you want - such as authenticate with an external system, etc.

yacovm (Sun, 08 Apr 2018 07:47:21 GMT):
confining the chaincode to run without network limits many use cases

yacovm (Sun, 08 Apr 2018 07:47:34 GMT):
where for example - you want to read from some external storage service

yacovm (Sun, 08 Apr 2018 07:47:42 GMT):
or check stock prices, etc.

lclclc (Sun, 08 Apr 2018 07:48:24 GMT):
If it is not deterministic, the simulation will vary in different container, then the transaction result is not determinstic, and the SDK can gather endorsement sometimes, sometimes not.

yacovm (Sun, 08 Apr 2018 07:48:31 GMT):
right

lclclc (Sun, 08 Apr 2018 07:48:45 GMT):
Of course there are requirement to check stock prices.

lclclc (Sun, 08 Apr 2018 07:48:58 GMT):
but the request result will vary.

lclclc (Sun, 08 Apr 2018 07:49:08 GMT):
That brings uncertainty to chaincode logic.

yacovm (Sun, 08 Apr 2018 07:49:15 GMT):
i know

lclclc (Sun, 08 Apr 2018 07:49:25 GMT):
Other smart contract use a real sanbox

lclclc (Sun, 08 Apr 2018 07:49:31 GMT):
like ethereum in evm

yacovm (Sun, 08 Apr 2018 07:49:36 GMT):
well if the smart contract runs in a sand-box

yacovm (Sun, 08 Apr 2018 07:49:43 GMT):
then it can't interact with the outside world

lclclc (Sun, 08 Apr 2018 07:49:47 GMT):
but apparently Fabric does not think so.

lclclc (Sun, 08 Apr 2018 07:50:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7TFFc36rbxcMi3BdH) @yacovm That is why we design Oracles.

lclclc (Sun, 08 Apr 2018 07:50:15 GMT):
Other blockchain solve this problem by Oracles.

lclclc (Sun, 08 Apr 2018 07:50:28 GMT):
Not allowing directly communicate with outside network.

lclclc (Sun, 08 Apr 2018 07:51:02 GMT):
I don't know why Fabric design like this, maybe let developer to decide how to use network is a good idea, maybe it's not.

lclclc (Sun, 08 Apr 2018 07:51:02 GMT):
I don't know why Fabric is designed like this, maybe let developer to decide how to use network is a good idea, maybe it's not.

yacovm (Sun, 08 Apr 2018 08:18:52 GMT):
fabric is a permissioned blockchain... you install chaincode which you inspect beforehand

yacovm (Sun, 08 Apr 2018 08:19:05 GMT):
it's not like ethereum where you run logic that someone else wrote

yacovm (Sun, 08 Apr 2018 08:19:16 GMT):
it's a different mind-set

yacovm (Sun, 08 Apr 2018 08:19:31 GMT):
the developer should do whatever he wants, even shoot himself in the foot if he really wants to

lclclc (Sun, 08 Apr 2018 08:34:50 GMT):
Yes, that's what I meant by "leave the problem to developers"

lclclc (Sun, 08 Apr 2018 08:37:35 GMT):
And furthermore what I learned from other blockchain is. If you have a decentralized architecture, your transaction needs to be replayed in every node, your logic had better be designed as deterministic logic.

muralisr (Sun, 08 Apr 2018 13:45:53 GMT):
@lclclc one of the points of "simulation before commit" is to allow the chaincodes to be not restrictive. For example, one can go out to a local database (chaincode on all peers go to "http://mylocaldb".., ie, they execute the same code "fetch from local db") to get some data to do computation on. In the end if they don't output the same thing, they won't be able to commit the TX. I wouldn't use the word "non-deterministic" when talking about simulation (but I would be worried if there's "non-determinism" at commit time). This "simulation before commit" and being on a permissioned blockchain so everyone agrees on the chaincode (just like they agree on the results from it) is what gives latitude to things other implementations cant.

muralisr (Sun, 08 Apr 2018 13:45:53 GMT):
@lclclc one of the points of "simulation before commit" is to allow the chaincodes to be not restrictive. For example, one can go out to a local database (chaincode on all peers go to "http://mylocaldb".., ie, they execute the same code "fetch from local db") to get some data to do computation on. In the end if they don't output the same thing, they won't be able to commit the TX. I wouldn't use the word "non-deterministic" when talking about simulation (but I would be worried if there's "non-determinism" at commit time). This "simulation before commit" and being on a permissioned blockchain so everyone agrees on the chaincode (just like they agree on the results from it) is what gives latitude to things some of the other implementations cant.

muralisr (Sun, 08 Apr 2018 13:45:53 GMT):
@lclclc one of the points of "simulation before commit" is to allow the chaincodes to be not restrictive. For example, one can go out to a local database (chaincode on all peers go to "http://localdb".., ie, they execute the same code "fetch from local db") to get some data to do computation on. In the end if they don't output the same thing, they won't be able to commit the TX. I wouldn't use the word "non-deterministic" when talking about simulation (but I would be worried if there's "non-determinism" at commit time). This "simulation before commit" and being on a permissioned blockchain so everyone agrees on the chaincode (just like they agree on the results from it) is what gives latitude to things some of the other implementations cant.

muralisr (Sun, 08 Apr 2018 14:00:47 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WX2h8TPpMcW2Sx4Dz

muralisr (Sun, 08 Apr 2018 14:02:28 GMT):
@luckydogchina it can but currently there are some restrictions on it (in addition to being experimental at this point). #fabric-java-chaincode will have more information on plans

lclclc (Mon, 09 Apr 2018 02:31:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FPZyP9emZtfQqYW4Z) @muralisr That's design fabric chosen, but generally the blockchain is using a state machine replication theory to confront distributed system consistency, only pure functional programing without global variable can guarantee that, that's why many of blockchain user advocate only-transaction-driven programming on smart contract.

lclclc (Mon, 09 Apr 2018 02:31:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FPZyP9emZtfQqYW4Z) @muralisr That's design fabric chosen, but generally the blockchain is using a state machine replication theory to confront distributed system consistency, only pure functional programing without global variable can guarantee that, that's why many of blockchain users advocate on only-transaction-driven programming on smart contract.

lclclc (Mon, 09 Apr 2018 02:31:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FPZyP9emZtfQqYW4Z) @muralisr That's design fabric chosen, but generally the blockchain is using a state machine replication theory to confront distributed system consistency, only pure functional programing without global variable can guarantee that, that's why many of blockchain users advocate only-transaction-driven programming on smart contract.

luckydogchina (Mon, 09 Apr 2018 05:20:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SRjSMYbdBjcdvWj34) @muralisr thanks

lclclc (Mon, 09 Apr 2018 09:28:44 GMT):
I just read the new 1.1 document, it looks like the author of this document doesn't like non-deterministic, either: > Phase 1 ends when the application receives signed proposal responses from sufficient peers. We note that different peers can return different and therefore inconsistent transaction responses to the application for the same transaction proposal. It might simply be that the result was generated a different time on different peers with ledgers at different states – in which case an application can simply request a more up-to-date proposal response. Less likely, but much more seriously, results might be different because the chaincode is non-deterministic. Non-determinism is the enemy of chaincodes and ledgers and if it occurs it indicates a serious problem with the proposed transaction, as inconsistent results cannot, obviously, be applied to ledgers. An individual peer cannot know that their transaction result is non-deterministic – transaction responses must be gathered together for comparison before non-determinism can be detected. (Strictly speaking, even this is not enough, but we defer this discussion to the transaction topic, where non-determinism is discussed in detail.)

lclclc (Mon, 09 Apr 2018 09:28:44 GMT):
I just read the new fabric 1.1 document, it looks like the author of this document doesn't like non-deterministic, either: > Phase 1 ends when the application receives signed proposal responses from sufficient peers. We note that different peers can return different and therefore inconsistent transaction responses to the application for the same transaction proposal. It might simply be that the result was generated a different time on different peers with ledgers at different states – in which case an application can simply request a more up-to-date proposal response. Less likely, but much more seriously, results might be different because the chaincode is non-deterministic. Non-determinism is the enemy of chaincodes and ledgers and if it occurs it indicates a serious problem with the proposed transaction, as inconsistent results cannot, obviously, be applied to ledgers. An individual peer cannot know that their transaction result is non-deterministic – transaction responses must be gathered together for comparison before non-determinism can be detected. (Strictly speaking, even this is not enough, but we defer this discussion to the transaction topic, where non-determinism is discussed in detail.)

lclclc (Mon, 09 Apr 2018 09:29:13 GMT):
@muralisr @yacovm

rock_martin (Mon, 09 Apr 2018 10:12:10 GMT):
Hi, I was having some trouble with Asymmetric encryption giving out the same result because of the randomness due to padding Does the inbuilt encryption/decryption library support asymmetric key encryption so that encryption results is deterministic?

amolpednekar (Mon, 09 Apr 2018 10:45:53 GMT):
Suppose I have a struct as id = { name: "Amol" country: "India" items: [ "Pen", "Pencil" ] } If I want to be able to query if a person "Amol" has an item "Pen", how can I use indexing here? I know I can create index on name, country directly, but how does it work for arrays, like "items", in this case? Or what's the right way to go about this?

amolpednekar (Mon, 09 Apr 2018 10:46:09 GMT):
@muralisr

rogeriofza (Mon, 09 Apr 2018 11:27:52 GMT):
Has joined the channel.

CodeReaper (Mon, 09 Apr 2018 11:31:59 GMT):
Hi, I'm trying to use the inbuilt encryption encryption library in chaincode for RSA using rsa keys, but I cannot find any documentation or sample on the topic

CodeReaper (Mon, 09 Apr 2018 11:31:59 GMT):
Hi, I'm trying to use the inbuilt encryption encryption library in chaincode for RSA using rsa keys(not even sure if it's allowed), but I cannot find any documentation or sample on the topic

CodeReaper (Mon, 09 Apr 2018 11:32:07 GMT):

Clipboard - April 9, 2018 5:02 PM

CodeReaper (Mon, 09 Apr 2018 11:33:40 GMT):
"the opts argument should be appropriate for algorithm used"? Where can I take a reference of this appropriate format?

dayubian (Mon, 09 Apr 2018 11:38:47 GMT):
Has left the channel.

jeffprestes (Mon, 09 Apr 2018 13:11:05 GMT):
An OFF-TOPIC question: is anybody here from or in a Zug/Zurich?

yacovm (Mon, 09 Apr 2018 13:13:16 GMT):
what's zug?

jeffprestes (Mon, 09 Apr 2018 13:14:48 GMT):
Crypto Valley, Switzerland.

mastersingh24 (Mon, 09 Apr 2018 16:57:54 GMT):
@jeffprestes - try the #fabric-crypto channel

Mihai.A (Tue, 10 Apr 2018 10:16:08 GMT):
Has joined the channel.

vivek29081993 (Tue, 10 Apr 2018 10:26:40 GMT):
Has joined the channel.

MonnyClara (Tue, 10 Apr 2018 15:23:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Wg5CRXe9K9G2zkNtT) @muralisr Hello, I've been looking into the Fabric Sources where this re-invocation of the chaincode docker is made. Do you know where is it code-written ?

JackStrohm (Tue, 10 Apr 2018 20:18:40 GMT):
Has joined the channel.

alexdevassy (Wed, 11 Apr 2018 04:19:02 GMT):
Has joined the channel.

alexdevassy (Wed, 11 Apr 2018 04:20:39 GMT):
hai everybody ... i am trying to follow this documentation ... but i cant figure out how to add github.com/hyperledger/fabric/protos/peer" this package ... please help me here ...

Bchainer (Wed, 11 Apr 2018 06:58:45 GMT):
Has joined the channel.

Bchainer (Wed, 11 Apr 2018 07:12:36 GMT):
Hello, I am trying to develop an application on HLF v1.0 (following the tuna-app tutorial). From the tuna-chaincode.go var tuna = Tuna{ Vessel: args[1], Location: args[2], Timestamp: args[3], Holder: args[4] } How do I handle the case when some of the fields could be empty/null (or only 3 arguments passed assuming 4th is optional)?

Bchainer (Wed, 11 Apr 2018 07:12:36 GMT):
Hello, I am trying to develop an application on HLF v1.0 (following the tuna-app tutorial). From the tuna-chaincode.go var tuna = Tuna{ Vessel: args[1], Location: args[2], Timestamp: args[3], Holder: args[4] } How do I handle the case when some of the fields could be empty/null (or only 3 arguments passed assuming 4th is optional)? Below is what I tried, but the issue is if args only has 3 elements, the check on args[4] != "" fails and chaincode errors out if (args[1] != "") {lc.ShipmentDate = args[1] } if (args[2] != "") {lc.ShipmentCarrier = args[2] } if (args[3] != "") {lc.ShipmentTrackingNum = args[3] } if (args[4] != "") {lc.ShipmentStatus = args[4] }

freddyisaac (Wed, 11 Apr 2018 09:52:23 GMT):
you are still accessing args[4] even if len(args) == 3 so it will panic

freddyisaac (Wed, 11 Apr 2018 09:53:11 GMT):
when you call it you will need to set args[4] = "" assuming that args is big enouch to hole it else you will need to use append

freddyisaac (Wed, 11 Apr 2018 09:53:19 GMT):
else use something like

freddyisaac (Wed, 11 Apr 2018 09:53:32 GMT):
for i, v := range args {

freddyisaac (Wed, 11 Apr 2018 09:53:36 GMT):
switch i {

freddyisaac (Wed, 11 Apr 2018 09:53:47 GMT):
case 0 :

freddyisaac (Wed, 11 Apr 2018 09:54:03 GMT):
lc.ShipmentDate = args[0]

freddyisaac (Wed, 11 Apr 2018 09:54:05 GMT):
}

freddyisaac (Wed, 11 Apr 2018 09:54:05 GMT):
}

freddyisaac (Wed, 11 Apr 2018 09:54:06 GMT):
etc.

freddyisaac (Wed, 11 Apr 2018 09:54:23 GMT):
actually use i+1 and case 1:

freddyisaac (Wed, 11 Apr 2018 09:54:33 GMT):
not pretty but would do what you want

MilanB3 (Wed, 11 Apr 2018 10:55:16 GMT):
Has joined the channel.

SyneBlockChainTeam (Wed, 11 Apr 2018 12:26:46 GMT):
Is there any example on chaincode invoking another chaincode to access its state?

cheetara (Wed, 11 Apr 2018 13:17:47 GMT):
Has joined the channel.

C0rWin (Wed, 11 Apr 2018 13:33:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=up7Bx88bZFXnXG5pR) @SyneBlockChainTeam https://github.com/hyperledger/fabric/blob/release-1.1/examples/chaincode/go/chaincode_example04/chaincode_example04.go#L95

htyagi90 (Wed, 11 Apr 2018 14:43:09 GMT):
As off Fabric Version 1.1, you can issue a read query to an already instantiated chaincode (External chaincode), but not issue write query to a different chaincode. Can be install and instantiate a (external) chaincode from another external chaincode ?

SmartContract2018 (Wed, 11 Apr 2018 15:25:36 GMT):
where does the fabric store the ledger and CouchDB file (persistent storage) on peer node? I am looking for the physical location and would like to know how to control it

kly4 (Wed, 11 Apr 2018 19:18:58 GMT):
Has joined the channel.

kly4 (Wed, 11 Apr 2018 19:19:15 GMT):
Hi guys. I'm currently trying to upgrade some chaincode running on fabric-samples/byfn. I am currently using fabric v1.1.0. I've noticed that in the utils.sh script there's a function to upgrade the chaincode (it runs on the cli container after the network starts i believe). However, when I'm trying to execute that call, i get "Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: cannot get package for chaincode (mycc:2.0))". Does it have to do with the fact that starting with v1.1 there's no more go compilation done on the cli container (I'm still a bit unclear on that part)? I would very much appreciate some tips on how to properly upgrade chaincode running fabric v1.1.0. Thank you =)

gouthamkrishna31 (Wed, 11 Apr 2018 20:21:13 GMT):
Has joined the channel.

RocMax (Wed, 11 Apr 2018 23:23:52 GMT):
Has joined the channel.

jojialex2 (Thu, 12 Apr 2018 05:32:01 GMT):
I have deployed a chain code, then stop all containers including chaincode, and restarted the node using docker compose file ... but the chain code contains is not started, how to start the chaincode container.

yuseven (Thu, 12 Apr 2018 07:31:48 GMT):
Has joined the channel.

jrosmith (Thu, 12 Apr 2018 10:49:56 GMT):
@jojialex2 run a transaction against the peer and the container will come up, assuming the chaincode is still instantiated on the channel

davidgsmits (Thu, 12 Apr 2018 13:48:27 GMT):
Has joined the channel.

yxnl (Thu, 12 Apr 2018 15:06:30 GMT):
Has joined the channel.

thoduerr (Thu, 12 Apr 2018 18:01:34 GMT):
Does someone know if composer/js chaincode allow to require third party modules - like a Winston logger?

floatware (Thu, 12 Apr 2018 18:13:55 GMT):
Has joined the channel.

Rajen (Thu, 12 Apr 2018 21:14:21 GMT):
Has joined the channel.

luckydogchina (Fri, 13 Apr 2018 04:47:10 GMT):
hi guys:

luckydogchina (Fri, 13 Apr 2018 04:47:10 GMT):
hi guys:I want to issue cryptocurrency with hyperledger fabric. I find the sample chaincode chaincode_example02: // Transaction makes payment of X units from A to B func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { ... ... // Get the state from the ledger // TODO: will be nice to have a GetAllState call to ledger Avalbytes, err := stub.GetState(A) ....... Bvalbytes, err := stub.GetState(B) ......... Aval = Aval - X Bval = Bval + X ............ err = stub.PutState(A, []byte(strconv.Itoa(Aval))) ............. err = stub.PutState(B, []byte(strconv.Itoa(Bval))) ..... ..... } Transaction makes payment of X units from A to B. Now I assume a trading scenario: User: A , B and C A send 10$ to C include Tx1, and B send 10$ to C include Tx2. If the Tx1 and Tx2 are blocked into one batch, can they be effective ? or throw one exception?

YuHengbing (Fri, 13 Apr 2018 10:00:05 GMT):
Has joined the channel.

YuHengbing (Fri, 13 Apr 2018 10:01:16 GMT):
Hi guys, how much time will it spend when update the ledger by chaincode?

magicianx25 (Fri, 13 Apr 2018 14:04:48 GMT):
Has joined the channel.

theathibm (Fri, 13 Apr 2018 17:34:05 GMT):
CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD

theathibm (Fri, 13 Apr 2018 17:34:41 GMT):
need support a encrypted password to couch. Does anyone know how to do this?

sklymenko (Fri, 13 Apr 2018 17:49:37 GMT):
Has joined the channel.

mna2016 (Fri, 13 Apr 2018 18:33:51 GMT):
Hi All, GetQueryResult(queryString) is returning the error "http: read on closed response body" "{\"selector\": {\"dueDate\": {\"$lt\":\"20180410\"}},\"limit\": 25,\"skip\": 1,\"sort\": [{\"dueDate\": \"asc\"}]}" I think the error is due to the "sort" I need the response to be sorted based on the field dueDate

mna2016 (Fri, 13 Apr 2018 18:35:37 GMT):
When i remove the sort portion from this queryString, the query runs fine.

mna2016 (Fri, 13 Apr 2018 18:36:00 GMT):
Appreciate an early response to this. Many Thanks!

freddyisaac (Sat, 14 Apr 2018 02:41:30 GMT):
is there any documentation for the query strings ?

freddyisaac (Sat, 14 Apr 2018 02:41:46 GMT):
even a quick overview

magicianx25 (Sat, 14 Apr 2018 06:45:19 GMT):
Hello, I am trying to compile my chaincode using Go language but I get an error

magicianx25 (Sat, 14 Apr 2018 06:46:10 GMT):

5.png

magicianx25 (Sat, 14 Apr 2018 06:46:32 GMT):
Anyone knows what this means?

YuHengbing (Sat, 14 Apr 2018 07:27:05 GMT):
@theathibm you can use the web console of couch db to do it. Normally, its url is : http://your ip:5984/_utils

YuHengbing (Sat, 14 Apr 2018 07:29:50 GMT):
@magicianx25 Have you installed the go SDK for fabric? go get -u github.com/hyperledger/fabric-sdk-go

magicianx25 (Sat, 14 Apr 2018 07:30:51 GMT):
oh didnt know you had to, I am doing the tutorial: chaincode for developers but doesn't say i have to

magicianx25 (Sat, 14 Apr 2018 07:32:04 GMT):
do I download it anywhere? or do I have to place it in a specific folder?

YuHengbing (Sat, 14 Apr 2018 07:33:28 GMT):
anywhere, it will be in your go path folder

magicianx25 (Sat, 14 Apr 2018 07:36:21 GMT):
didnt help

magicianx25 (Sat, 14 Apr 2018 07:37:53 GMT):
maybe there is something wrong with GOROOT and GOPATH variables?

YuHengbing (Sat, 14 Apr 2018 07:41:22 GMT):
Can you build any test go source file successfully?

magicianx25 (Sat, 14 Apr 2018 07:45:39 GMT):
yea I run hello-world

qutpeter (Sat, 14 Apr 2018 09:21:09 GMT):
Has joined the channel.

mauriziocarioli (Sat, 14 Apr 2018 14:48:11 GMT):
Has joined the channel.

mna2016 (Sat, 14 Apr 2018 14:59:30 GMT):
Hi All, What is the easiest way to sort a list of assets returned by GetStateByRange? I want to sort based on one of the fields that is a part of the data component of the asset. i tried using sort.SliceStable but the chaincode is giving a compile error for that code. Appreciate any help in this regard?

bdu 5 (Sat, 14 Apr 2018 20:56:34 GMT):
Has joined the channel.

asaningmaxchain123 (Mon, 16 Apr 2018 03:48:13 GMT):
Has joined the channel.

asaningmaxchain123 (Mon, 16 Apr 2018 03:48:49 GMT):
@mastersingh24 can you tell me how to put the picture in the ledger?

asaningmaxchain123 (Mon, 16 Apr 2018 03:48:49 GMT):
@mastersingh24 can you tell me how to put the picture in the ledger?convert it to byte array and then put it?

asaningmaxchain123 (Mon, 16 Apr 2018 03:48:49 GMT):
@mastersingh24 @yacovm can you tell me how to put the picture in the ledger?convert it to byte array and then put it?

vinceprabhu (Mon, 16 Apr 2018 09:48:06 GMT):
Has joined the channel.

vinceprabhu (Mon, 16 Apr 2018 09:49:01 GMT):
how to use slice, map in struct to store key value pair in go lang chaincode ?

muralisr (Mon, 16 Apr 2018 13:44:45 GMT):
@vinceprabhu I'd use protobuf to represent structs and serialize/deserialize (Marshal/Unmarshal) and use those values in key value pairs

jrosmith (Mon, 16 Apr 2018 14:54:02 GMT):
@freddyisaac assuming you're using couchdb: http://docs.couchdb.org/en/2.1.1/api/database/find.html

jrosmith (Mon, 16 Apr 2018 14:54:02 GMT):
@freddyisaac @mna2016 assuming you're using couchdb you can use whatever their api exposes: http://docs.couchdb.org/en/2.1.1/api/database/find.html

jrosmith (Mon, 16 Apr 2018 14:55:07 GMT):
also @mna2016, the http closed on response body usually means their was an issue with the query, the couchdb logs will help you debug

nitrek (Tue, 17 Apr 2018 06:05:02 GMT):
Has joined the channel.

rice (Tue, 17 Apr 2018 07:45:53 GMT):
Has joined the channel.

magicianx25 (Tue, 17 Apr 2018 08:04:36 GMT):
What should your environmental variables be for Go language? I am confused between GOROOT and GOPATH

MonnyClara (Tue, 17 Apr 2018 08:08:15 GMT):
@magicianx25 This may help you https://stackoverflow.com/questions/21001387/how-do-i-set-the-gopath-environment-variable-on-ubuntu-what-file-must-i-edit

magicianx25 (Tue, 17 Apr 2018 08:09:17 GMT):
so goroot is in Go directory, path is in Go/bin and gopath in $HOME/go?

MonnyClara (Tue, 17 Apr 2018 08:12:14 GMT):
@magicianx25 This may not be exact : `gopath` is where you go project are going to be, `gopath` is where go is installed and you configure the `path` so it's more convinient to use

MonnyClara (Tue, 17 Apr 2018 08:12:14 GMT):
@magicianx25 This may not be exact : `gopath` is where you go project are going to be, `gopath` is where go is installed and you configure the `path` so it's more convenient to use

magicianx25 (Tue, 17 Apr 2018 08:12:56 GMT):
but when i set gopath and goroot at the same place there is an error

magicianx25 (Tue, 17 Apr 2018 08:13:53 GMT):
I think I get it though

magicianx25 (Tue, 17 Apr 2018 08:14:36 GMT):
also I am trying to compile my chaincode ( doing the chaincode for developer tutorial) and i get the error

magicianx25 (Tue, 17 Apr 2018 08:14:46 GMT):

1.png

magicianx25 (Tue, 17 Apr 2018 08:15:16 GMT):
is there something wrong with the website I am trying to import from?

Clod16 (Tue, 17 Apr 2018 09:47:37 GMT):
Has joined the channel.

kpkrish (Tue, 17 Apr 2018 11:46:02 GMT):
Has joined the channel.

Arnaudov_St (Tue, 17 Apr 2018 12:43:37 GMT):
Has joined the channel.

Rednish (Tue, 17 Apr 2018 19:29:25 GMT):
Has joined the channel.

walmon (Wed, 18 Apr 2018 01:04:30 GMT):
Has joined the channel.

YorkYu (Wed, 18 Apr 2018 04:23:52 GMT):
Has joined the channel.

amolpednekar (Wed, 18 Apr 2018 05:19:46 GMT):
Which API gives the name of the chaincode being called?

anyone (Wed, 18 Apr 2018 08:59:29 GMT):
Hello all, I have a problem with the method "GetStateByPartialCompositeKey". They index consists of 5 parts (key1~key2~key3~key4~key5).

anyone (Wed, 18 Apr 2018 09:00:29 GMT):
If i try GetStateByPartialCompositeKey(index, key1), it works perfectly. If I try to search for another key, like GetStateByPartialCompositeKey(index, key3), nothing is returned. Although the key is actually saved.

anyone (Wed, 18 Apr 2018 09:00:45 GMT):
Do you guys have any idea?

anyone (Wed, 18 Apr 2018 09:04:25 GMT):
I am a bit desperate and thankful for any help!

ascatox (Wed, 18 Apr 2018 10:33:13 GMT):
Are you using Go or Node to develop your chaincode ??

ascatox (Wed, 18 Apr 2018 10:33:13 GMT):
Are you using Go or Node to develop your chaincode ?

anyone (Wed, 18 Apr 2018 11:37:12 GMT):
Go

pjjp (Wed, 18 Apr 2018 12:44:14 GMT):
Has joined the channel.

papegaaij (Wed, 18 Apr 2018 13:00:31 GMT):
is it possible to use a latest shim (in particular java) on fabric 1.1.0 or can i expect incompatibilities?

papegaaij (Wed, 18 Apr 2018 13:02:58 GMT):
the java shim that comes with 1.1.0 is missing some methods i need (getCreator)

papegaaij (Wed, 18 Apr 2018 13:03:44 GMT):
i guess it depends on whether the protobuf and grpc definitions changed in an incompatible way

Titret (Thu, 19 Apr 2018 00:49:21 GMT):
Has joined the channel.

lclclc (Thu, 19 Apr 2018 03:27:17 GMT):
what does GetTransient and getBinding do? I can't find any clue from godoc. It simply says "documentation can be found in interfaces.go", but I can't find interfaces.go.

yacovm (Thu, 19 Apr 2018 09:01:09 GMT):
https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go

yacovm (Thu, 19 Apr 2018 09:01:11 GMT):
@lclclc

lclclc (Thu, 19 Apr 2018 09:02:11 GMT):
ah, if the doc is inside interfaces_stable.go instead of interfaces.go, some doc is out-of-date.

yacovm (Thu, 19 Apr 2018 09:04:05 GMT):
it is not out of date, it's predicting the future when we merge `interfaces_stable` and `interfaces_experimental` into `interfaces`

lclclc (Thu, 19 Apr 2018 09:04:33 GMT):
Oh, I see

lclclc (Thu, 19 Apr 2018 09:04:39 GMT):
that makes sense.

yacovm (Thu, 19 Apr 2018 09:04:40 GMT):
(yeah - you're right. it's out of date... feel free to open a JIRA and fix it if you want)

lclclc (Thu, 19 Apr 2018 09:06:23 GMT):
According to the doc you kindly provided, it is fetching this field "ChaincodeProposalPayload.Transient" like a map, how can I put data inside this field using cli/client sdk?

yacovm (Thu, 19 Apr 2018 09:07:22 GMT):
no clue

lclclc (Thu, 19 Apr 2018 09:08:42 GMT):
So it is fetching data from somewhere no one knows how to input data………… hope I can figure that out. thanks for pointing out the interfaces_stable

yacovm (Thu, 19 Apr 2018 09:11:16 GMT):
i just don't know the API on the client side to do that

yacovm (Thu, 19 Apr 2018 09:11:39 GMT):
ask in #fabric-sdk-node or #fabric-sdk-java or #fabric-sdk-go

yacovm (Thu, 19 Apr 2018 09:12:31 GMT):
in peer CLI - it's just `--transient`

yacovm (Thu, 19 Apr 2018 09:12:32 GMT):
https://github.com/hyperledger/fabric/blob/13447bf5ead693f07285ce63a1903c5d0d25f096/peer/chaincode/chaincode.go#L29

simonyau (Fri, 20 Apr 2018 03:22:10 GMT):
Has joined the channel.

simonyau (Fri, 20 Apr 2018 03:22:20 GMT):
hi all, i have just created the fabric network, successfully created the channel, install the chaincode in peer1, but when I instantiate the chaincode, i got below error, any hint? [chaincode] Launch -> ERRO 489 launchAndWaitForRegister failed: timeout expired while starting chaincode mycc:v0(networkid:dev,peerid:peer1.org1.intranet,tx:0b75cce283155837280f2d42c21b7bd9ae5e74d080ed9ebe502c6c87e8fe6fae)

achenette (Fri, 20 Apr 2018 18:39:03 GMT):
Has left the channel.

anishman (Sat, 21 Apr 2018 02:44:47 GMT):
Has joined the channel.

mastersingh24 (Sat, 21 Apr 2018 13:35:46 GMT):
@lclclc - If you are using the Node SDK, see https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest which is the input to https://fabric-sdk-node.github.io/Channel.html#sendTransactionProposal (https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kcYoEKWb4mhkwaztc) @lclclc

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02 it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this?``` ``` (I've attached the screenshot too)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02 it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this?``` test ``` (I've attached the screenshot too)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too) \begin{pmatrix} a & b \\ c & d \end{pmatrix}

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too in the following post)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network for version1.0 (referred URL: https://github.com/hyperledger/fabric-samples/tree/release-1.0/chaincode-docker-devmode) and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too in the following post)

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network for version1.0 (referred URL: https://github.com/hyperledger/fabric-samples/tree/release-1.0/chaincode-docker-devmode) and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too in the following post) @mastersingh24

anishman (Sat, 21 Apr 2018 17:22:58 GMT):
hello everyone, I created the network for version1.0 (referred URL: https://github.com/hyperledger/fabric-samples/tree/release-1.0/chaincode-docker-devmode) and successfully compiled the chaincode. When I tried to run the chaincode using the following command `CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02` it hangs and doesn't output any result. I also check the logs in the containers but there were no logs produced. Anyone has an idea what might be the cause of this? (I've attached the screenshot too in the following post). I'm using x86_64-1.0.6 images. @mastersingh24

anishman (Sat, 21 Apr 2018 17:26:59 GMT):

chaincode-docker-devmode - freeze

muralisr (Sat, 21 Apr 2018 20:34:22 GMT):
@anishman you are runing in "dev mode". The screenshot shows the chaincode successfully registered with the peer and is waiting for invokes. Typically the first time you also install and instantiate (before you do invokes) just as you would with a chaincode running in docker in non-dev mode . Given that background what do you mean by `it hangs and doesn't output any result. ` ? Do make sure you follow all the steps

anishman (Sun, 22 Apr 2018 03:37:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bFaLeSPattNCWFXnP) @muralisr Thank you very much for the reply. Actually I was (mistakenly) expecting a completion message when the chaincode started. Thanks for clearing it out. I could complete all the steps including Terminal 3.

anishman (Sun, 22 Apr 2018 03:37:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bFaLeSPattNCWFXnP) @muralisr Thank you very much for the reply. Actually I was (mistakenly) expecting a completion message after the chaincode started. Thanks for clearing it out. I could complete all the steps including Terminal 3.

lclclc (Sun, 22 Apr 2018 06:09:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KXNzTRhWJW4apaQdR) @mastersingh24 Oh, the tutorial example does not show complete structure of this request payload. This link helps a lot.

anyone (Sun, 22 Apr 2018 16:13:53 GMT):
Hi, Can I use wildcards for composite keys If I search for a part of the key?

toesterdahl (Sun, 22 Apr 2018 20:36:37 GMT):
Has joined the channel.

jojialex2 (Mon, 23 Apr 2018 05:38:28 GMT):
Hi All, Is there any way to know any key value has be changed and created new version by any transaction ?

jojialex2 (Mon, 23 Apr 2018 05:38:28 GMT):
Hi All, Is there any way to know any key value has be changed and created new version by any transaction proposal ?

kai_den (Mon, 23 Apr 2018 06:44:59 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....

Brucepark (Mon, 23 Apr 2018 07:26:32 GMT):
Has joined the channel.

Brucepark (Mon, 23 Apr 2018 07:29:33 GMT):
Hi guys! Is there any way to get the latest block height in the chaincode? I need to get the current timestamp in the chaincode for verification. I think time.Now () is not deterministic so I tried to use the latest block height, but I don’t know how I get it.

gut (Mon, 23 Apr 2018 10:36:49 GMT):
@Brucepark bear in mind that if you query a peer timestamp it doesn't have to be the same one as in other peer. you can query block information invoking QSCC from the SDK and then show it externally. But, as you are writing to chaincode channel, I assume that you are trying to query it from inside the peer. From this side, my experience tells me that you're not allowed to do so. If you only need a Tx Timestamp, youu can access it querying its history (I don't remember exactly but it could be GetHistoryForKey function)

jeffreychengmw (Mon, 23 Apr 2018 13:03:41 GMT):
Has joined the channel.

jrosmith (Mon, 23 Apr 2018 13:11:22 GMT):
@kai_den probably a better question for #fabric-sdk-node, but you can access the specific results payload by grabbing `result.response.payload` , just call `.toString()` on it to parse the buffer.

JeroenDePrest (Mon, 23 Apr 2018 13:32:03 GMT):
Can you execute a chaincode function after a certain amount of time from within the chaincode?

muralisr (Mon, 23 Apr 2018 13:40:19 GMT):
@JeroenDePrest the chaincode functions are called on a request response basis (invoke proposal is the request). You should not have chaincode run somethig outside of that flow. Even within that flow, "waiting certain amount of time" is an anti pattern... you can do it but best to avoid such strategies

JeroenDePrest (Mon, 23 Apr 2018 13:40:47 GMT):
@muralisr thanks

JavierReyes (Mon, 23 Apr 2018 15:04:04 GMT):
Has joined the channel.

Nikolas 11 (Tue, 24 Apr 2018 01:29:06 GMT):
Has joined the channel.

jhodges (Tue, 24 Apr 2018 03:24:06 GMT):
Has joined the channel.

hosemose (Tue, 24 Apr 2018 04:58:08 GMT):
Has joined the channel.

kai_den (Tue, 24 Apr 2018 05:02:07 GMT):
@jrosmith Thank you for responding ! Your advice was very helpful to me !

kai_den (Tue, 24 Apr 2018 05:02:21 GMT):
thank you!

SaraEmily (Tue, 24 Apr 2018 07:46:40 GMT):
Has joined the channel.

SaraEmily (Tue, 24 Apr 2018 07:49:32 GMT):
Hi all! Not sure if this is the correct channel, please direct me elsewhere if necessary :) So I have a problem understanding the difference between installing and instantiating chaincode. As I understand it I need to install on all peers for all orgs but only instantiate once per channel..? Or once per org..? Thanks!

Splush (Tue, 24 Apr 2018 07:58:49 GMT):
Has joined the channel.

MonnyClara (Tue, 24 Apr 2018 08:08:09 GMT):
@SaraEmily Installing the chaincode allows the peer to interact with this chaincode (query/invoke ...) Instantiate it allows to initiate the objects of the chaincode : - for exemple in this chaincode : https://github.com/hyperledger/fabric-samples/blob/release-1.1/chaincode/chaincode_example02/go/chaincode_example02.go, the Instantiatation calls the Init() function and set the value of A et B - in this one : https://github.com/hyperledger/fabric-samples/blob/release-1.1/chaincode/marbles02/go/marbles_chaincode.go, you can see that the Init() function in not doing anything

MonnyClara (Tue, 24 Apr 2018 08:08:34 GMT):
BUT in any case, you have to instantiate the chaincode one per channel to be able to interact with it

ascatox (Tue, 24 Apr 2018 08:13:24 GMT):
Hi All!! Someone knows if there's the possibility to mock the calls to the ledger in order to test the chaincode outside the blockchain.

ascatox (Tue, 24 Apr 2018 08:13:24 GMT):
Hi All!! Someone knows if there's the possibility **to mock the calls to the ledger** in order to test the chaincode outside the blockchain.

ascatox (Tue, 24 Apr 2018 08:13:48 GMT):
Developing using the `peer` command is really hard.

SaraEmily (Tue, 24 Apr 2018 08:49:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qD43rywA4fvSuHavx) @MonnyClara Thank you for the explanation!

jrosmith (Tue, 24 Apr 2018 12:41:45 GMT):
@ascatox the shim comes with a mockstub that lets you mock most interactions with the ledger. example here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/chaincode_example02/chaincode_example02_test.go

ascatox (Tue, 24 Apr 2018 12:42:23 GMT):
Is it possible with Node too?

ascatox (Tue, 24 Apr 2018 12:43:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jrB2oykxJvPERPCCT) @jrosmith Is it possible with Node too?

jrosmith (Tue, 24 Apr 2018 12:46:09 GMT):
@ascatox i dont see anything from the docs, i don't use node for chaincode though so i'm really not sure

SouvikDey (Wed, 25 Apr 2018 09:03:58 GMT):
Has joined the channel.

SouvikDey (Wed, 25 Apr 2018 09:11:31 GMT):
Where can i find the source code or Dockerfile etc which is used to create the chaincode container from the Peer when Chaincode instantiation takes place in dev mode?

SouvikDey (Wed, 25 Apr 2018 09:11:31 GMT):
Where can i find the source code or Dockerfile etc which is used to create the chaincode container from the Peer when Chaincode instantiation takes place in dev mode?

mastersingh24 (Wed, 25 Apr 2018 09:36:31 GMT):
@SouvikDey - In dev mode, the chaincode does not run in Docker ... it simply runs as a standalone executable and connects to the peer. The code which actually creates Docker images for chaincode in production mode can be found in the core/chaincode/platforms package for each supported language. But let me ask ... what issue / problem are you having?

SouvikDey (Wed, 25 Apr 2018 10:01:20 GMT):
@mastersingh24 - To instantiate the chaincode container from the peer, the environment varialble : --env CORE_VM_DOCKER_HOSTCONFIG_EXTRAHOSTS=peer0.nodeX.example.com:<> needs to be set. This is then reflected in the /etc/hosts file of the chaincode container. Without this property, the chaincode isntantiation is failing. Is this environment varialble mandatory and can we use not use the internal docker ip of the peer as the IP mapping?

kerokhin (Wed, 25 Apr 2018 10:59:56 GMT):
Has joined the channel.

souvik (Wed, 25 Apr 2018 12:04:02 GMT):
Has joined the channel.

mlucente (Wed, 25 Apr 2018 14:24:19 GMT):
Has joined the channel.

IVictorFeng (Thu, 26 Apr 2018 02:31:06 GMT):
Has joined the channel.

Brucepark (Thu, 26 Apr 2018 05:19:10 GMT):
@gut :thumbsup: thank you so much

anthonyk (Thu, 26 Apr 2018 05:52:38 GMT):
Has joined the channel.

mna2016 (Thu, 26 Apr 2018 05:56:45 GMT):
@freddyisaac Thanks for the link. Cheers!

ascatox (Thu, 26 Apr 2018 08:32:56 GMT):
Someone can help me to use the **dev mode** of fabric???

soladnet (Thu, 26 Apr 2018 10:06:55 GMT):
Has joined the channel.

muralisr (Thu, 26 Apr 2018 13:24:13 GMT):
@ascatox what do you need

ascatox (Thu, 26 Apr 2018 13:25:30 GMT):
Thanks for your help but I solved my problem and at the moment the only thing I need is a mockStub for node chaincode development.

SmartContract2018 (Thu, 26 Apr 2018 15:40:19 GMT):
I am working on a fabric based design that can potentially have 1000's of private transactions (as many chaincodes). From data privacy perspective, I am looking to have the optimum design. I can have individual channels for each private communication thus ensuring that only relevant transactions are stored physically on any node. However it means creating 1000s of individual channels. It creates operations/maintenance challenges and network stability. Any feedback would be appreciated.

shiyj (Thu, 26 Apr 2018 16:28:30 GMT):
Has joined the channel.

SyneBlockChainTeam (Fri, 27 Apr 2018 06:06:40 GMT):
events

SyneBlockChainTeam (Fri, 27 Apr 2018 06:08:33 GMT):
Can we send extra params with event generated on invoke call?

kerokhin (Sat, 28 Apr 2018 11:12:47 GMT):
Is it possible to implement cross chaincode query? Example - multiple chaincodes instantiated on single channel, read chancode_1 ledger from chaincode_2.

jrosmith (Sat, 28 Apr 2018 14:14:53 GMT):
@kerokhin yes chaincodes can read from each other: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L65

diestrin (Sun, 29 Apr 2018 01:13:22 GMT):
Has joined the channel.

diestrin (Sun, 29 Apr 2018 01:16:49 GMT):
Hello everybody, I was looking for some design principles about the architecture to follow in chaincodes, since every chaincode is deployed in a separate container, I was thinking to produce as few containers as possible to keep costs low, but I'm not sure on how granular a chaincode should be

diestrin (Sun, 29 Apr 2018 01:17:29 GMT):
I can't seem to find a development best practices or something similar

diestrin (Sun, 29 Apr 2018 01:19:34 GMT):
also wondering if `shim.Start(new(SmartContract))` can be called multiple times with multiple chaincodes, haven't tried but not sure if this will create multiple containers as well, or just one container with multiple chaincodes... or error

naveen_saravanan (Sun, 29 Apr 2018 03:42:25 GMT):
Has joined the channel.

naveen_saravanan (Sun, 29 Apr 2018 03:43:17 GMT):
Hi everyone. Could anyone please tell me about how to encrypt the blockchain data using public key while storing them and decrypt the blockchain data using private key while retrieving them can be done in the chaincode?

muralisr (Sun, 29 Apr 2018 11:25:48 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EWqFq3sLXhPDanLXG

muralisr (Sun, 29 Apr 2018 11:29:48 GMT):
You can run multiple chaincodes with different names so each chaincode gets a unique namespace. If you want the same code to be run, you can just install the same chaincode with different names and instantiate them. They will be running the same code but under different containers with their unique namespaces

RitinPali (Sun, 29 Apr 2018 11:38:17 GMT):
Has joined the channel.

RitinPali (Sun, 29 Apr 2018 11:42:32 GMT):
hi all, http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4ade.html trying to follow the above tutorial i have compiled the chaincode_example02.go it comiles to go* shouldnt it compile to the same filename?

RitinPali (Sun, 29 Apr 2018 11:45:03 GMT):
using this go file https://github.com/hyperledger-archives/fabric/blob/master/examples/chaincode/go/chaincode_example02/chaincode_example02.go

RitinPali (Sun, 29 Apr 2018 11:45:03 GMT):
using this go file https://github.com/hyperledger/fabric-samples/blob/release-1.1/chaincode/chaincode_example02/go/chaincode_example02.go

muralisr (Sun, 29 Apr 2018 12:42:06 GMT):
@RitinPali by default the exe takes the directotry name which is "go" in your case. Try `go build -o mypgm`

RitinPali (Sun, 29 Apr 2018 12:46:46 GMT):
yes.. figured that.. thanks compiled chaincode_example02 relaunched docker containers peer chaincode install -p chaincodedev/chaincode/...ex02/go -n mycc -v 0 i get ok response but peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10","b","5"]}' -C myc gives error incorrect no. of args.. expecting 4

RitinPali (Sun, 29 Apr 2018 12:54:49 GMT):
in the bash container root@cb499551ba7d:/opt/gopath/src/chaincode/chaincode_example02/go# CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02

RitinPali (Sun, 29 Apr 2018 12:56:04 GMT):
in the cli container peer chaincode install -p chaincodedev/chaincode/chaincode_example02/go -n mycc -v 0

RitinPali (Sun, 29 Apr 2018 12:57:37 GMT):
but this fails peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10","b","5"]}' -C myc gives error incorrect no. of args.. expecting 4

muralisr (Sun, 29 Apr 2018 13:06:10 GMT):
try ["invoke", "a","10","b","5"]

RitinPali (Sun, 29 Apr 2018 13:09:38 GMT):
:clap: that worked..

RitinPali (Sun, 29 Apr 2018 13:13:40 GMT):
but dont i have to init the balances through the init func? this is just calling the invoke func?

RitinPali (Sun, 29 Apr 2018 13:17:36 GMT):
peer chaincode query -n mycc -c '{"Args":["query","b"]}' -C myc returns 5.. which is correct ok.. thanks

umtyzc (Mon, 30 Apr 2018 05:36:13 GMT):
Has joined the channel.

metalog (Mon, 30 Apr 2018 09:22:56 GMT):
Has joined the channel.

papegaaij (Mon, 30 Apr 2018 09:50:57 GMT):
`stub.GetStateByRange` asserts that `startKey` and `endKey` are simple keys, why is this? Isn't it allowed to get a range using composite keys?

papegaaij (Mon, 30 Apr 2018 09:52:37 GMT):
I'm asking because the Java implementation of `getStateByPartialCompositeKey` calls `getStateByRange` directly, making it impossible to use composite keys in `getStateByPartialCompositeKey`

papegaaij (Mon, 30 Apr 2018 09:52:59 GMT):
see: https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/impl/ChaincodeStubImpl.java#L201 and https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/impl/ChaincodeStubImpl.java#L179

papegaaij (Mon, 30 Apr 2018 09:53:41 GMT):
This seems wrong, but I'm wondering if the check in `getStateByRange` is actually needed

SouvikDey (Mon, 30 Apr 2018 10:41:20 GMT):
We are using CouchDB as our backend database for our peers. Can we find the historical transaction data from the CouchDB instance. Is it stored in some database within CouchDB or in a file system outside CouchDB?

SouvikDey (Mon, 30 Apr 2018 10:47:18 GMT):
If some key is deleted from the back-end CouchDB database for one of the peers, will there be any auto-syncing of the data on the same CouchDB instance such that the key can be retrieved in future?

HareshPolar1 (Mon, 30 Apr 2018 11:37:22 GMT):
Has joined the channel.

papegaaij (Mon, 30 Apr 2018 14:29:04 GMT):
for the record: I've removed the check in `getStateByRange` and the `getStateByPartialCompositeKey` now seems to work as expected. I don't see why this restriction is required

yuki-kon (Mon, 30 Apr 2018 16:22:21 GMT):
Has joined the channel.

Aswath8687 (Tue, 01 May 2018 03:03:29 GMT):
Has joined the channel.

jrosmith (Tue, 01 May 2018 13:15:21 GMT):
hey all, i'm consistently getting `REQUEST_TIMEOUT` for chaincode instantiations, but I'm really unsure why. my docker container comes up and even has the specific instantiation success log, yet when my sdk goes to verify the proposal response it still comes back as timed out. i've tried increasing the `executeTimeout` from 30s to 60s, but still no luck. this consistently happens the very first time i go to install and instantiate. follow up attempts to install and instantiate and are successful

acbellini (Tue, 01 May 2018 21:08:12 GMT):
Has joined the channel.

Glen (Wed, 02 May 2018 07:45:14 GMT):
Has joined the channel.

chaincoder55 (Wed, 02 May 2018 11:35:56 GMT):
Has joined the channel.

chaincoder55 (Wed, 02 May 2018 11:36:00 GMT):
hi I am using fabric 1.0.6 and using couchdb as state database, I wrote my chaincode and deployed it and everything is running fine, but when I tried to run Rich query I am unable to setup indexing and I am getting the following error Couch DB Error:no_usable_index, Status Code:400, Reason:There is no index available for this selector.

paul.sitoh (Wed, 02 May 2018 15:34:38 GMT):
Folks, I am getting this error using nodeJS based chaincode. 18 ssl_transport_security.cc:238] Could not get common name of subject from certificate. I got no problem with go. Is there anything special we should set for nodeJS?

paul.sitoh (Wed, 02 May 2018 15:34:38 GMT):
Folks, I am getting this error using nodeJS based chaincode. `18 ssl_transport_security.cc:238] Could not get common name of subject from certificate`. I got no problem with go. Is there anything special we should set for nodeJS?

muralisr (Wed, 02 May 2018 17:07:08 GMT):
@chaincoder55 please check in #fabric-ledger ...sounds like a low level ledger error

muralisr (Wed, 02 May 2018 17:09:45 GMT):
@paul.sitoh not sure ... can you post that in other channels too and let us know if you find anything please ? (thank you!)

youssefg (Wed, 02 May 2018 18:23:23 GMT):
Has joined the channel.

mike157 (Wed, 02 May 2018 19:13:36 GMT):
Has joined the channel.

yuki-kon (Wed, 02 May 2018 21:15:01 GMT):
Hello experts. I have a question about API of `Chaincode shim`. Is there any plan or discussion to add APIs to put/get/delete key-values per data object? When a Chaincode has multiple data objects, it is common to use composite keys. Composite keys have the name of an object as a prefix. Let’s say we have `Marble` as an object. `Marble` is used as a prefix. The key-values in `Marble` looks like: ` Marble_key1-value1` `Marble_key2-value2` and `Marble_key3-value3`. When getting/putting a key-value, we call `stub.CreateCompositeKey(objectType, keys)` to generate a composite key. In case getting all key-values in `Marble`, we call `stub.getStateByPartialCompositeKey(objectType, []string{})` to get key-values which has `Marble` as a partial key. I know that table API in v0.6 was abandoned. However, it may be useful to add APIs like the below because we often implement these functions in Chaincode. `GetObjectData(objectType, key)`: return a key-value which has a composite key consisting of `objectType_key`. `GetAllByObjectType(objectType)`: return a list of key-values in an object (or return an iterator). `DelAllByObjectType(objectType)`: delete all key-values in an object.

kevin-s-wang (Thu, 03 May 2018 02:33:37 GMT):
Has joined the channel.

RobertDiebels (Thu, 03 May 2018 08:32:59 GMT):
Has joined the channel.

RobertDiebels (Thu, 03 May 2018 08:35:14 GMT):
Hey guys, don't know if this is the right channel for this. But I'm looking for part of the Farbic codebase that's responsible for actually creating the CC docker images. Also, I'd look to know when in the CC life-cycle the image is actually built. Is it during install? Or during instantiate?

RobertDiebels (Thu, 03 May 2018 08:35:14 GMT):
Hey guys, don't know if this is the right channel for this. But I'm looking for part of the Farbic codebase that's responsible for actually creating the CC docker images. Also, I'd like to know when in the CC life-cycle the image is actually built. Is it during install? Or during instantiate?

CodeReaper (Thu, 03 May 2018 09:21:43 GMT):
Hi the events generated in chaincode with shim.SetEvent emits the event when peers are simulating the trasnactions or when the transaction is committed

CodeReaper (Thu, 03 May 2018 09:21:45 GMT):
?

papegaaij (Thu, 03 May 2018 09:28:01 GMT):
afaik the event (only 1) is recorded as part of the block, thus when the transaction is committed

papegaaij (Thu, 03 May 2018 09:39:36 GMT):
@RobertDiebels the code is in `core/chaincode/platforms`

papegaaij (Thu, 03 May 2018 09:39:50 GMT):
the containers are build during instantiation

RobertDiebels (Thu, 03 May 2018 10:07:45 GMT):
Thanks for the reply.

RobertDiebels (Thu, 03 May 2018 10:07:53 GMT):
Will be looking into it now :D

RobertDiebels (Thu, 03 May 2018 10:32:23 GMT):
@papegaaij Would I be correct in saying that each peer builds it's own image of a CC?

RobertDiebels (Thu, 03 May 2018 10:33:31 GMT):
Because I'm looking for the code that responds to a instantiate transaction.

papegaaij (Thu, 03 May 2018 10:58:16 GMT):
Can anyone give me some information on what `peer chaincode package` is for?

papegaaij (Thu, 03 May 2018 10:59:00 GMT):
I cannot find any relevant references to the `OwnerEndorsements` in the resulting SignedCDS

papegaaij (Thu, 03 May 2018 10:59:17 GMT):
what are these endorsements good for?

papegaaij (Thu, 03 May 2018 11:04:30 GMT):
the only references I can find, are these: ```core/common/ccpackage/ccpackage.go <-- contains code for creating and signing packages core/common/ccprovider/sigcdspackage.go <-- OwnerEndorsements are used in the hash for the CDS protos/peer/signed_cc_dep_spec.pb.go <-- the definition ```

acbellini (Thu, 03 May 2018 11:22:13 GMT):
Has left the channel.

schtho (Thu, 03 May 2018 13:08:04 GMT):
Has joined the channel.

schtho (Thu, 03 May 2018 13:18:24 GMT):
Hi, is there a possibility to determine if a chaincode is invoked by another chaincode? stub.InvokeChaincode() is not generating a new Tx, so Tx Creator is still the sender. My idea is to create a "chaincode token wallet" (which is another chaincode) (like in ethereum, where a smart contract can contains ETH). This TokenWalletChaincode have to be only invoked by this chaincode. But the only method I see is stub.InvokeChaincode() and with this, I can not implement this use case. Are there any options to implement this use case in a similiar way?

papegaaij (Thu, 03 May 2018 13:22:11 GMT):
@schtho i don't know about your specific question, but i do see a different problem: you can only do read-only transactions on other chaincode

schtho (Thu, 03 May 2018 13:27:31 GMT):
If a tx on other chaincode can only be read-only, I can not implement this use case in Fabric. Thank you for your quick response :slight_smile:

papegaaij (Thu, 03 May 2018 13:32:18 GMT):
@schtho i just rechecked the documentation, just to be sure, it seems it a bit more subtle: you can do write-transactions on other chaincode, but only on the same channel

papegaaij (Thu, 03 May 2018 13:32:33 GMT):
https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L65

RobertDiebels (Thu, 03 May 2018 13:33:44 GMT):
Guys quick question. I did a little bit of scanning of the code-base today and I'd like to ask something about peer configuration through viper.

RobertDiebels (Thu, 03 May 2018 13:34:26 GMT):
I'm building a tool to get Fabric working in Kubernetes so I'd like to know the following.

RobertDiebels (Thu, 03 May 2018 13:36:49 GMT):
Peers build their own containers through the dockerclient, and pass-along some HostConfig. It takes that configuration from viper.*("vm.docker.${key}").

RobertDiebels (Thu, 03 May 2018 13:36:49 GMT):
Peers build their own containers through the dockerclient, and pass-along some HostConfig. It takes that configuration from viper.*("vm.docker.hostConfig.${key}").

RobertDiebels (Thu, 03 May 2018 13:37:46 GMT):
Would I be correct in assuming that if I add a file much like https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/chaincodetest.yaml#L321 that I would override container hostConfig by adding a hostConfig section?

RobertDiebels (Thu, 03 May 2018 13:38:37 GMT):
Also ensuring that the file is named `core.json`and is located at `FABRIC_CFG_PATH`.

RobertDiebels (Thu, 03 May 2018 13:43:15 GMT):
Relevant files: Concerning the file name having to be `core.json` https://github.com/hyperledger/fabric/blob/release-1.1/peer/main.go#L87, setting `FABRIC_CFG_PATH` https://github.com/hyperledger/fabric/blob/release-1.1/core/config/config.go#L138 and setting the `vm.docker.hostConfig` keys https://github.com/hyperledger/fabric/blob/release-1.1/core/container/dockercontroller/dockercontroller.go#L127

RobertDiebels (Thu, 03 May 2018 13:45:41 GMT):
The reason I'm asking is because I need to set `dns-search` to an IP inside my kubernetes cluster. Using above approach would help in avoiding altering the DockerOpts on my VM's.

RobertDiebels (Thu, 03 May 2018 13:46:23 GMT):
Which would require a restart of my nodes.

schtho (Thu, 03 May 2018 13:54:15 GMT):
@papegaaij thx, but there is no possibility to look up in metadata or somewhere else if a Tx is invoked directly by sender or by chaincode (apart from that, the Tx context is the same)?

papegaaij (Thu, 03 May 2018 14:29:49 GMT):
i don't know for sure, i'm not that familiar with the internals of fabric and how it passes these messages to the other chaincode, but i don't think it is possible to differentiate between the client and other chaincode

papegaaij (Thu, 03 May 2018 14:30:28 GMT):
you might want to look at the creator

jrosmith (Thu, 03 May 2018 14:38:49 GMT):
@schtho i believe `GetBinding` might be able to help you: https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces_stable.go#L178

jrosmith (Thu, 03 May 2018 14:39:31 GMT):
i have not personally used it before but I believe its supposed to help tie a fabric transaction with an external application transaction context

stermi (Thu, 03 May 2018 14:56:47 GMT):
Has joined the channel.

jrosmith (Thu, 03 May 2018 14:57:49 GMT):
@stermi regarding your question from #general, there is no step by step guide for how writing chaincode but there are a lot of examples. try looking at the ones here: https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode

jrosmith (Thu, 03 May 2018 14:57:49 GMT):
@stermi regarding your question from #general, there is no step by step guide for writing chaincode but there are a lot of examples. try looking at the ones here: https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincod

stermi (Thu, 03 May 2018 14:58:55 GMT):
Thank you @jrosmith I thought that I would have found an easy example like for Solidity that simply explain both how to write code and how blockchain/code works

jrosmith (Thu, 03 May 2018 14:59:38 GMT):
@stermi it might help to read through this first then: http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode.html

jrosmith (Thu, 03 May 2018 15:00:26 GMT):
the left hand side offers more in depth looks at Chaincode for Developers and Chaincode for Operators

stermi (Thu, 03 May 2018 15:14:24 GMT):
fabric only support go? or can I also runit on nodjs?

stermi (Thu, 03 May 2018 15:14:24 GMT):
fabric only support go? or can I also runit on nodejs?

jrosmith (Thu, 03 May 2018 15:21:24 GMT):
nodejs code is supported as of the 1.1 release

jianweizhu (Fri, 04 May 2018 03:57:27 GMT):
Has joined the channel.

CodeReaper (Fri, 04 May 2018 08:01:44 GMT):
If an application listens for some events produced by the committing of transactions, and suppose it had a timeout. How can it listen to the events it has missed on??

CodeReaper (Fri, 04 May 2018 08:01:44 GMT):
If an application listens for some events produced by the committing of transactions, and suppose the application had a timeout. How can it listen to the events it has missed on??

akifbatur (Fri, 04 May 2018 08:17:45 GMT):
Has joined the channel.

sbaxter (Fri, 04 May 2018 12:15:31 GMT):
Has joined the channel.

sheehan (Fri, 04 May 2018 15:27:09 GMT):
Has joined the channel.

jrosmith (Fri, 04 May 2018 18:09:58 GMT):
@CodeReaper transaction events are ephemeral, if you miss it you don't get it. you'd have to implement a messaging queue if you do not wish to miss transaction events

huy.tranibm (Fri, 04 May 2018 21:45:59 GMT):
Has joined the channel.

huy.tranibm (Fri, 04 May 2018 21:46:06 GMT):
Hello guys

muralisr (Sat, 05 May 2018 12:18:47 GMT):
@CodeReaper @jrosmith 1.1 has an event delivery on channel level which allows listener to get events from any block onwards http://hyperledger-fabric.readthedocs.io/en/latest/peer_event_services.html?highlight=channel%20event

CodeReaper (Sat, 05 May 2018 16:15:22 GMT):
@muralisr "Requests to receive events are accepted from identities outside of the peer’s organization (as defined by the channel configuration). This also provides greater reliability and a way to receive events that may have been missed" How does identities listening for events outside organization give way to listen events that have been missed?

muralisr (Sat, 05 May 2018 16:19:54 GMT):
@CodeReaper when you start the listener you can specify the block to start listening from. SDKs expose this in their event API (for example see https://fabric-sdk-node.github.io/tutorial-channel-events.html for node SDK)

muralisr (Sat, 05 May 2018 16:20:43 GMT):
the event client could keep track of last block processed and use that to get missed blocks

CodeReaper (Sat, 05 May 2018 16:21:22 GMT):
oh, beautiful. Would've been quite an effort to develop myself.

JeroenDePrest (Sat, 05 May 2018 17:05:25 GMT):
I am getting an "Maximum call stack size exceeded" in my nodejs chaincode. Any ideas as to why this would be happening?

JeroenDePrest (Sat, 05 May 2018 17:31:34 GMT):
nvm i fixed it

huy.tranibm (Sat, 05 May 2018 23:10:15 GMT):
what was the fix please

MohitJuneja (Sun, 06 May 2018 03:41:53 GMT):
Has joined the channel.

CodeReaper (Sun, 06 May 2018 15:21:02 GMT):
Any examples to implement MockStub for chaincode testing?

sh777 (Sun, 06 May 2018 15:54:35 GMT):
Has joined the channel.

CodeReaper (Sun, 06 May 2018 21:33:41 GMT):
How can we write unit tests for chaincode for functions that involve GetCreator or GetMspID ??

CodeReaper (Sun, 06 May 2018 21:34:14 GMT):
MockStub doesn't seem to have them implemented them yet.

gut (Mon, 07 May 2018 07:58:27 GMT):
@CodeReaper To write unit tests you will need the functionality first. You have a (quite old) ToDo story in JIRA (FAB-5644) and a (newer) InProgress one (FAB-7603). They're different depending on what you need. You could contact the Asignee and help implementing it if you really need it now.

stermi (Mon, 07 May 2018 14:18:46 GMT):
as far as I can see in all example the key used in putState is given to the blochain and not generated by the go chaincode

stermi (Mon, 07 May 2018 14:18:57 GMT):
is it correct or should I generate it on the chaincode?

zimabry (Mon, 07 May 2018 14:45:46 GMT):
Hi all, I keep getting these errors when I try to build my go code. I have downloaded govendor and ran the "govendor fetch github.com/hyperledger/fabric/vendor/plugin"

zimabry (Mon, 07 May 2018 14:45:46 GMT):
Hi all, I keep getting these errors when I try to build my go code. I have downloaded govendor and ran the "govendor fetch github.com/hyperledger/fabric/vendor/plugin"

zimabry (Mon, 07 May 2018 14:46:06 GMT):

Clipboard - May 7, 2018 10:46 AM

Subramanyam (Tue, 08 May 2018 06:02:04 GMT):
Has left the channel.

asadhayat (Tue, 08 May 2018 09:48:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7uaaivtKbRxA6KPrW) @zimabry I think there is something wrong in your source code.

asadhayat (Tue, 08 May 2018 10:05:58 GMT):
How to use "github.com/hyperledger/fabric/core/chaincode/lib/cid" package? I modify fabcar sample chaincode to use lib/cid package but it cannot find the package

j1984 (Tue, 08 May 2018 10:59:06 GMT):
Hi all, I needed some assistance. When I instantiate the NodeJS chaincode, i get the error pasted below. Any help or guidance would be much appreciated. E0508 10:52:31.948211338 18 ssl_transport_security.cc:238] Could not get common name of subject from certificate.

j1984 (Tue, 08 May 2018 10:59:06 GMT):
Hi all, I’m in need of some assistance - when I instantiate the NodeJS chaincode, I get the error pasted below. Any help or guidance would be much appreciated. E0508 10:52:31.948211338 18 ssl_transport_security.cc:238] Could not get common name of subject from certificate.

JeroenDePrest (Tue, 08 May 2018 11:28:07 GMT):
I have a pretty specific question. We are trying to encrypt our data on the chain code but we don’t want to lose our mango queries to query inside an object in CouchDB. Anyone have any ideas? We looked at encCC but here we then loose our mango queries so this is not really an option. Another option we thought about was that we could use Vault from HashiCorp to manage the encryption keys and then encrypt the values but not the keys and then also encrypt the query in the same way to still be able to do the mango queries. If anyone has a better idea feel free explain it.

Starseven (Tue, 08 May 2018 11:50:13 GMT):
Has joined the channel.

zimabry (Tue, 08 May 2018 12:28:34 GMT):
@asadhayat my source code?

asadhayat (Tue, 08 May 2018 12:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=y5wCorAqFznJcxnsp) @zimabry Your chaincode.

zimabry (Tue, 08 May 2018 12:30:14 GMT):
I have tried building multiple sets of chaincode even sample chaincode which does not have errors in it. Still get the same error @asadhayat

asadhayat (Tue, 08 May 2018 12:32:06 GMT):
From your error, you are importing a package named "plugin", which compiler cannot find.

zimabry (Tue, 08 May 2018 12:36:39 GMT):

Clipboard - May 8, 2018 8:36 AM

zimabry (Tue, 08 May 2018 12:54:44 GMT):
@asadhayat

Sneljo (Tue, 08 May 2018 12:58:50 GMT):
Has joined the channel.

asadhayat (Tue, 08 May 2018 13:02:54 GMT):
@zimabry seems like there is a problem with core package "plugin". Verify that you are using recommended go version and reinstalling go might fix the problem

zimabry (Tue, 08 May 2018 13:04:03 GMT):
@asadhayat ok let me try that and let you know, thank you

zimabry (Tue, 08 May 2018 17:16:22 GMT):
@asadhayat that does not seem to have worked, still same issue

john_whitton (Tue, 08 May 2018 17:50:36 GMT):
Has joined the channel.

MonnyClara (Wed, 09 May 2018 08:39:46 GMT):
Hello, I have a really "simple" question : is it possible to split a chaincode code into mutliple files ? For exemple `main.go` with the main function as `Init` `Invoke` and `main`, then the `main.go` would call other go file like `query.go` or `update.go`

MonnyClara (Wed, 09 May 2018 08:39:46 GMT):
Hello, I have a really "simple" question : is it possible to split a chaincode code into mutliple files ? For exemple `main.go` with the main function as `Init` `Invoke` and `main`, then the `main.go` would call other go files like `query.go` or `update.go`

bozhang1 (Wed, 09 May 2018 11:11:58 GMT):
Has joined the channel.

bozhang1 (Wed, 09 May 2018 11:12:03 GMT):
Hello,

bozhang1 (Wed, 09 May 2018 11:12:37 GMT):
Is there anyone who knows how to get the raw data from the file xxx.block ?

gut (Wed, 09 May 2018 11:27:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cwJmziG6bDKJguBpF) @bozhang1 [ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pcrZvSn2pkfn9PakB)

gut (Wed, 09 May 2018 11:28:19 GMT):
If you find something to get block info from chaincode, please, let me know.

kapilAtrey (Wed, 09 May 2018 11:35:28 GMT):

Clipboard - May 9, 2018 5:02 PM

guido.santos (Wed, 09 May 2018 14:08:52 GMT):
Has joined the channel.

umtyzc (Wed, 09 May 2018 18:13:27 GMT):
Yes @MonnyClara [ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MfpvysecxNLH8FwNM)

akshaylawange001 (Wed, 09 May 2018 19:36:57 GMT):
Has joined the channel.

SmartContract2018 (Wed, 09 May 2018 21:14:04 GMT):
I am planning to write a chaincode that provides a look-up service using its internal lookup table. I know there could be multiple way to achieve this functionality but I would like this question to stay focused on this design pattern. The question: - what is the size limitation on a chaincode as my lookup data can get very large?

tronglx (Thu, 10 May 2018 08:19:55 GMT):
Has joined the channel.

tronglx (Thu, 10 May 2018 08:32:10 GMT):
Hi everyone!

huy.tranibm (Fri, 11 May 2018 01:02:27 GMT):
Howdy Trong

zhuquanbin (Fri, 11 May 2018 02:15:40 GMT):
Has joined the channel.

kai_den (Fri, 11 May 2018 03:26:07 GMT):
Hi all ! I have one question.

kai_den (Fri, 11 May 2018 03:29:52 GMT):
Where is the data stored? My chaincode running success and sdk-node is return txID. I’m looking for data file at peer and orderer container.

tronglx (Fri, 11 May 2018 06:37:33 GMT):
Hello @huy.tranibm, are you Vietnamese ? hehe

ShivajiBose (Sat, 12 May 2018 11:12:11 GMT):
Has joined the channel.

kueckermann (Sun, 13 May 2018 12:40:41 GMT):
Has joined the channel.

kueckermann (Sun, 13 May 2018 12:42:24 GMT):
Hey all, I need some assistance getting chaincode instantiated. The instantiate keeps timing out... `2018-05-13 12:34:08.755 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc 2018-05-13 12:34:08.755 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode Wallet:1.0(networkid:dev,peerid:peer0.vollar.org,tx:b85f302752d9310faa06dabed8150ff0fe8efb1db6bd4bc21a2395ac3b95903d)` When I check the logs on the chaincode docker image it is running fine with no errors. Any ideas what could be causing the instantiate command to hang and not exit?

kueckermann (Sun, 13 May 2018 12:42:24 GMT):
Hey all, I need some assistance getting chaincode instantiated. The instantiate keeps timing out... 2018-05-13 12:34:08.755 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc 2018-05-13 12:34:08.755 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode Wallet:1.0(networkid:dev,peerid:peer0.vollar.org,tx:b85f302752d9310faa06dabed8150ff0fe8efb1db6bd4bc21a2395ac3b95903d) When I check the logs on the chaincode docker image it is running fine with no errors. Any ideas what could be causing the instantiate command to hang and not exit?

kueckermann (Sun, 13 May 2018 20:03:03 GMT):
FYI, I found the issue. I had removed this environment variable in docker compose: - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic So it wasnt connecting to the chaincode container.

tronglx (Mon, 14 May 2018 01:40:46 GMT):
@kueckermann I had same issue, you can change network name or remove docker network that have name ${COMPOSE_PROJECT_NAME}_basic.

tronglx (Mon, 14 May 2018 01:40:46 GMT):
@kueckermann I had same issue, you can change network's name or remove docker network that have name ${COMPOSE_PROJECT_NAME}_basic.

Ryan2 (Mon, 14 May 2018 02:35:20 GMT):
hi I got the issue launching the Chaincode when invoke the chaincode in short period of time (invoking continuously) [31m2018-05-11 08:06:04.102 UTC [chaincode] ExecuteChaincode -> ERRO 00eESC[0m Error executing chaincode: premature execution - chaincode (mychannel_CC_001:t4) launched and waiting for registration [31m2018-05-11 08:06:04.102 UTC [endorser] simulateProposal -> ERRO 00fESC[0m failed to invoke chaincode name:"mychannel_CC_001" on transaction 44e7b7b391fd33491f30cafcffc223d90f8102ff5e5b4baf79aa9e4e8c732da1, error: Error executing chaincode: premature execution - chaincode (mychannel_CC_001:t4) launched and waiting for registration But sleep for awhile can avoid this, Is there any config to adjust so that I can invoke CC continuously?

versus (Mon, 14 May 2018 09:03:46 GMT):
Has joined the channel.

IgorSim (Mon, 14 May 2018 09:04:00 GMT):
Has joined the channel.

amolpednekar (Mon, 14 May 2018 09:07:43 GMT):
Hi, is there any chaincode apart from marbles_chaincode.go from FabricSamples having comprehensive examples of rich query syntax??

CodeReaper (Mon, 14 May 2018 09:41:40 GMT):
Hi, Is it safe to have go-routines running inside the chaincode??

nsdeo12 (Mon, 14 May 2018 09:54:23 GMT):
Has joined the channel.

mastersingh24 (Mon, 14 May 2018 13:04:18 GMT):
@CodeReaper - what are you trying to accomplish by using go-routines?

CodeReaper (Mon, 14 May 2018 13:06:06 GMT):
@mastersingh24 I was wondering if I can speed up my chaincode execution, there is some logic which creates or verifies loads of digital signatures, around 500 at a time. Thinking of making it more efficient.

CodeReaper (Mon, 14 May 2018 13:06:06 GMT):
@mastersingh24 I was wondering if I can speed up my chaincode execution, there is some logic which creates or verifies loads of digital signatures, around 500 at a time(all having different private-public key pairs). Thinking of making it more efficient.

mastersingh24 (Mon, 14 May 2018 13:32:30 GMT):
yeah ... that should be safe to do

mastersingh24 (Mon, 14 May 2018 13:33:12 GMT):
parallelize the verifications and use channels to collect ... makes sense

jrosmith (Mon, 14 May 2018 13:35:52 GMT):
@amolpednekar assuming youre using couchdb you can take a look at selector syntax: http://docs.couchdb.org/en/2.1.1/api/database/find.html

CodeReaper (Mon, 14 May 2018 19:20:36 GMT):
Thanks

hnadim (Mon, 14 May 2018 22:14:42 GMT):
Has joined the channel.

diestrin (Tue, 15 May 2018 04:22:18 GMT):
Hey everyone, is there a chance to use js chaincodes with private npm dependencies?

diestrin (Tue, 15 May 2018 04:22:27 GMT):
https://stackoverflow.com/questions/50325765/how-to-install-a-chaincode-with-a-private-npm-dependency-private-repository

Luxii (Tue, 15 May 2018 06:31:00 GMT):
Has joined the channel.

Luxii (Tue, 15 May 2018 06:32:46 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.

albert.lacambra (Tue, 15 May 2018 06:36:30 GMT):
I m trying to instantiate chaincode on 1.1.0 getting this error 2018-05-15 05:59:48.121 UTC [endorser] simulateProposal -> ERRO b5d [mychannel][29aef964] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction some key what could be the reason?

MonnyClara (Tue, 15 May 2018 11:58:16 GMT):
@albert.lacambra I'm facing the same issue, I tried to add `CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052` to resolve the issue But it still not working

MonnyClara (Tue, 15 May 2018 11:58:16 GMT):
@albert.lacambra I'm facing the same issue, I tried to add `CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052` to the CLI docker to resolve the issue But it still not working

albert.lacambra (Tue, 15 May 2018 11:58:31 GMT):
yes.I also have that

albert.lacambra (Tue, 15 May 2018 11:58:42 GMT):
dev mode works however :s

jrosmith (Tue, 15 May 2018 12:42:19 GMT):
@diestrin i don't write chaincode in node, but i do use a private repository. assuming the packages installation respects the peers ~/.npmrc file you should just need to update it to point to your private repository

diestrin (Tue, 15 May 2018 12:54:49 GMT):
yeah, I ended up just copying my npmrc file, and it's able to instantiate now, thanks

diestrin (Tue, 15 May 2018 13:38:42 GMT):
is it usual that a nodejs chaincode takes too much to instantiate? using the docker cli container, calling to install is pretty quick, but instantiate can some times take up to a minute to complete, is this fine?

diestrin (Tue, 15 May 2018 13:42:33 GMT):
actually, sometimes it just timeouts

diestrin (Tue, 15 May 2018 13:43:27 GMT):
and when I retry after a timeout, it's super fast, takes like 5 seconds

MonnyClara (Tue, 15 May 2018 14:43:04 GMT):
@albert.lacambra The problem I face was a issue in the creation of the docker network. You can see it here for exemple in the fabric-samples/first-network/base/peer-base.yaml ``` services: peer-base: environment: # the following setting starts chaincode containers on the same # bridge network as the peers # https://docs.docker.com/compose/networking/ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn ``` Has I didn't need a special docker network, I switched to a default one : `testnetwork_default`. This way all my dockers are on the same network and my issue is solved now !

MonnyClara (Tue, 15 May 2018 14:43:04 GMT):
@albert.lacambra The problem I face was a issue in the creation of the docker network. You can see it here for exemple in the fabric-samples/first-network/base/peer-base.yaml ```services: peer-base: environment: # the following setting starts chaincode containers on the same # bridge network as the peers # https://docs.docker.com/compose/networking/ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn ``` Has I didn't need a special docker network, I switched to a default one : `testnetwork_default`. This way all my dockers are on the same network and my issue is solved now !

jrosmith (Tue, 15 May 2018 14:48:27 GMT):
@diestrin ive noticed the same with go, i think the ~1 minute is just how long it takes to run the instantiation transaction and wake to make sure it has come up properly. i've also noticed weird timeouts though, especially if i try to instantiate right after the network has come up

muralisr (Tue, 15 May 2018 22:17:08 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vpWSMhWMLBcZpSSGs

muralisr (Tue, 15 May 2018 22:20:09 GMT):
@albert.lacambra since the instantiation is sent to the "lscc" chaincode, the error mentions "lscc" but the problem is likely elsewhere. first thing I'd check is if the image got built successfully ... given that chaincode dev mode works, it could simply be a question of all dependencies in the GOPATH for dev mode but not packaged in the chaincode

nitrek (Wed, 16 May 2018 06:18:10 GMT):
Hi all

nitrek (Wed, 16 May 2018 06:18:29 GMT):
How to i delete a state created using composite key?

umapm113 (Wed, 16 May 2018 07:18:31 GMT):
Has joined the channel.

albert.lacambra (Wed, 16 May 2018 07:55:03 GMT):
@muralisr the chaincode container is there, and even I see the even message. I am using the java shim 1.2. How is the LSCC notified that instantiation has finshided? I supouse the cc shim should send some message back that has not been sent. Also I havetryied setting chaincodeAddress explicitly and igoring it without difference

albert.lacambra (Wed, 16 May 2018 07:55:11 GMT):
in dev mode it worked out

albert.lacambra (Wed, 16 May 2018 07:55:29 GMT):
I am kind of lost there :s

albert.lacambra (Wed, 16 May 2018 07:56:27 GMT):
@MonnyClara thanks. However that's not my issue. Containers are correctly created

massiveashok2014 (Wed, 16 May 2018 09:57:33 GMT):
Has joined the channel.

nhrishi (Wed, 16 May 2018 13:09:11 GMT):
Hi, I'm getting an error while instantiating chaincode "Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection". I understand this is due internet connection issue. But I've all the latest images on the server, is there any way we can solve this issue without internet connection. Could someone please advise. Thanks.

MaximeAubanel (Wed, 16 May 2018 13:09:50 GMT):
Has joined the channel.

MaximeAubanel (Wed, 16 May 2018 13:10:12 GMT):
hello guys, is it possible to MockInvoke with a special identity ? For example someone with a particular affiliation ?

BhaskarRaju (Thu, 17 May 2018 13:42:13 GMT):
Has joined the channel.

vamshirapolu (Thu, 17 May 2018 22:18:13 GMT):
Has joined the channel.

pankajcheema (Fri, 18 May 2018 09:41:45 GMT):
Hi Experts anybody have idea how to fetch a record between two dates in chaincode .We are using GOLANG for chaincode.

pankajcheema (Fri, 18 May 2018 09:41:45 GMT):
Hi Experts anybody have idea how to fetch a record between two dates in chaincode .We are using GOLANG for chaincode. @jyellick @mastersingh24 @vick

pankajcheema (Fri, 18 May 2018 10:05:27 GMT):
You can have a look on stackoverflow https://stackoverflow.com/questions/50408634/get-data-based-on-a-particular-date-hyperledger-fabric-go-chaincode

gut (Fri, 18 May 2018 10:22:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KiENLf2rjnfmp3Y3F) @pankajcheema That's not a chaincode problem at all, right? [Does it help a SO post like this?](https://stackoverflow.com/questions/3216868/)

pankajcheema (Fri, 18 May 2018 10:24:07 GMT):
@gut Yes we know that we can do map reduce in couch db .But we are asking how to do in chaincode ?

pankajcheema (Fri, 18 May 2018 10:26:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=PnCCkeMjMWyZKW24b) is there way so that we can use map reduce or any other way to do this in chaincode

gut (Fri, 18 May 2018 10:28:27 GMT):
Ah Ok ok

pankajcheema (Fri, 18 May 2018 10:29:38 GMT):
@gut any idea or suggestion .We are also not able to apply skip and limit for pagination in fabric 1.1.

gut (Fri, 18 May 2018 10:44:36 GMT):
@pankajcheema I think couchdb pagination is not yet integrated. We made a workaround integrating pagination on client app. It's not a good practice because you relay on the client correctness, but as we hope this is evolving we preferred to wait. For the dates part, I'm sorry I have no response yet.

pankajcheema (Fri, 18 May 2018 10:45:13 GMT):
Thanks @gut

GoodSamaritan (Sat, 19 May 2018 05:59:38 GMT):
Has joined the channel.

zack-w (Sat, 19 May 2018 23:41:06 GMT):
Has joined the channel.

Rosan (Mon, 21 May 2018 03:37:29 GMT):
Has joined the channel.

vitiko (Mon, 21 May 2018 06:20:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=YPJqTf4RdZTMXQ2x5) @MaximeAubanel You need to mock creator like in example https://www.ibm.com/developerworks/cloud/library/cl-ibm-blockchain-chaincode-testing-using-golang/index.html or https://github.com/s7techlab/cckit/blob/master/testing/mockstub.go

vitiko (Mon, 21 May 2018 06:22:27 GMT):
Hi, what do you think about this approach to develop golang chaincode ? https://medium.com/@viktornosov/routing-and-middleware-for-developing-hyperledger-fabric-chaincode-written-in-go-90913951bf08

Ryan2 (Mon, 21 May 2018 09:47:48 GMT):
hi, I faced the issue ` multiple-value uuid.NewV4() in single-value context` `failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build:` I using fabric 1.1.0 go 1.9.1 how to overcome this error

vick (Mon, 21 May 2018 11:22:02 GMT):
Has joined the channel.

vick (Mon, 21 May 2018 11:22:22 GMT):
hi i am following the chaincode tutorial here

vick (Mon, 21 May 2018 11:22:23 GMT):
http://hyperledger-fabric.readthedocs.io/en/release-1.1/chaincode4ade.html

vick (Mon, 21 May 2018 11:22:36 GMT):
when i call; `go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim`

vick (Mon, 21 May 2018 11:22:54 GMT):
i am getting the error; `package plugin: unrecognized import path "plugin" (import path does not begin with hostname)`

vick (Mon, 21 May 2018 11:23:02 GMT):
can anyone advise?

vick (Mon, 21 May 2018 12:08:24 GMT):
now instead of the error being on one library it's on a lot more

vick (Mon, 21 May 2018 13:14:43 GMT):
RESOLVED: there were a couple of issues, first you need to ensure that the GOROOT and GOPATH environment variables are set correctly. Also you need to ensure that the permissions on the respective folders referenced by those environment variables are set correctly and then you need to ensure that your GO installation is not corrupted 1. GOROOT should be the installation directory for GO 2. GOPATH: is the path to where you develop the source code 3. The user you're running the command with should have permissions on both of those directories

dimaxgl (Mon, 21 May 2018 14:47:53 GMT):
Has joined the channel.

geekoftheweek (Mon, 21 May 2018 20:17:52 GMT):
Has joined the channel.

geekoftheweek (Mon, 21 May 2018 20:19:37 GMT):
Hi, everyone. I'm new to Hyperledger, new to chaincode, new to Go, and struggling. I'm trying to get the name of the user who's invoking a chaincode command, using Go. I found stub.GetCreator() but I'm not sure how to use the []byte it gives me. Can anyone point me in the right direction?

jrosmith (Mon, 21 May 2018 20:21:34 GMT):
@geekoftheweek you can decrypt the cert and get the common name from it: https://hastebin.com/anojacekum.go

jrosmith (Mon, 21 May 2018 20:21:49 GMT):
you can also use the cid library in 1.1 if it is enabled for your channel: https://github.com/hyperledger/fabric/tree/release-1.1/core/chaincode/lib/cid

geekoftheweek (Mon, 21 May 2018 20:23:13 GMT):
@jrosmith Thank you very much! I'll try the latter, and fall back to the former. Thanks again!

geekoftheweek (Mon, 21 May 2018 20:51:04 GMT):
@jrosmith this is a developer instance, so I have complete control over what libraries are enabled on the channel -- where might I go to learn how to enable cid?

amolpednekar (Tue, 22 May 2018 06:57:08 GMT):
@muralisr @jrosmith How to parse/view as string X509 certificate returned by cid.GetX509Certificate(stub) in golang cc

amolpednekar (Tue, 22 May 2018 06:57:08 GMT):
@muralisr @jrosmith How to parse/acess fields of X509 certificate returned by cid.GetX509Certificate(stub) in golang cc

amolpednekar (Tue, 22 May 2018 06:57:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FCezJtSc7Tweyuw9a) @jrosmith Had seen that, but cid.getX509Cert() returns type X.509Certificate. how to convert that to bytes for the ParseCertificate function? with (asn1Data []byte)

hyperlearner (Tue, 22 May 2018 10:16:25 GMT):
Has joined the channel.

MeghaGupta (Tue, 22 May 2018 10:32:23 GMT):
Has joined the channel.

MeghaGupta (Tue, 22 May 2018 10:33:36 GMT):
Hi, while creating one sample chaincode in go but getting error for package github.com/hyperledger/fabric/protos/peer" in any of: /usr/local/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT) /home/meghagupta/dev/blockchain-dev/go/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH)

MeghaGupta (Tue, 22 May 2018 10:34:30 GMT):
I have imported import ( "fmt" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer" )

MeghaGupta (Tue, 22 May 2018 10:34:41 GMT):
Please help me with the issue

MeghaGupta (Tue, 22 May 2018 10:34:52 GMT):
I am stuck becuase of it

MeghaGupta (Tue, 22 May 2018 10:35:00 GMT):
I am new to chain code dev

vick (Tue, 22 May 2018 10:36:44 GMT):
i think it can't find the package

vick (Tue, 22 May 2018 10:37:33 GMT):
go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim ^ have you ran this? it will download the hyperledger fabric chaincode code depedency and install it to your local go folders

MeghaGupta (Tue, 22 May 2018 10:37:56 GMT):
yes

vick (Tue, 22 May 2018 10:37:59 GMT):
after you run the above command you need to run; go build --tags nopkcs11 to build the code and install it

MeghaGupta (Tue, 22 May 2018 10:38:01 GMT):
I did this

vick (Tue, 22 May 2018 10:38:27 GMT):
can you find this directory it is complaining about?

MeghaGupta (Tue, 22 May 2018 10:38:36 GMT):
I am ble to resolve package "github.com/hyperledger/fabric/core/chaincode/shim but fabric/protos/peer is giving error

MeghaGupta (Tue, 22 May 2018 10:39:20 GMT):
I am not able to find this dir :/usr/local/go/src/github.com/hyperledger/fabric/protos/peer

vick (Tue, 22 May 2018 10:39:32 GMT):
yeah so i think there maybe something wrong when you did the build

MeghaGupta (Tue, 22 May 2018 10:39:37 GMT):
not able get this package

vick (Tue, 22 May 2018 10:39:42 GMT):
i am checking my machine and i can see it there

MeghaGupta (Tue, 22 May 2018 10:47:52 GMT):
Hi @vick I chaked my machine again I have the folder github.com/hyperledger/fabric/protos/ in goroot but "peer" folder inside that is missing

vick (Tue, 22 May 2018 10:48:17 GMT):
yeah, so i think the command which downloads and builds those libraries did not run properly

MeghaGupta (Tue, 22 May 2018 10:48:18 GMT):
Did I downloaded wrong package version

vick (Tue, 22 May 2018 10:48:30 GMT):
which version of go are your using?

MeghaGupta (Tue, 22 May 2018 10:48:49 GMT):
1.10.1

MeghaGupta (Tue, 22 May 2018 10:49:21 GMT):
shall i remove that package and get it again

vick (Tue, 22 May 2018 10:51:05 GMT):
you can try to remove the whole folder, i would recommend that actually

vick (Tue, 22 May 2018 10:51:12 GMT):
and run the above commands again

vick (Tue, 22 May 2018 10:51:17 GMT):
or if you prefer take a backup of it

MeghaGupta (Tue, 22 May 2018 10:52:11 GMT):
ok let me try

MeghaGupta (Tue, 22 May 2018 10:54:54 GMT):
Thanks a lot @vick that worked previously i followed the page https://github.com/IBM-Blockchain-Archive/learn-chaincode/blob/master/docs/setup.md

MeghaGupta (Tue, 22 May 2018 10:55:24 GMT):
this time run the cmd go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim

MeghaGupta (Tue, 22 May 2018 10:55:32 GMT):
this worked like magic

MeghaGupta (Tue, 22 May 2018 10:55:34 GMT):
thanks

nmarcetic (Tue, 22 May 2018 10:56:45 GMT):
Has joined the channel.

vick (Tue, 22 May 2018 11:17:51 GMT):
good, does anyone know how to initalize chaincode args with a map?

vick (Tue, 22 May 2018 12:03:25 GMT):
do i need to call stub.PutState() inside my Init function?

vick (Tue, 22 May 2018 12:03:53 GMT):
after i have initialised the values of my array

vick (Tue, 22 May 2018 12:04:46 GMT):
of my struct i mean

vick (Tue, 22 May 2018 12:05:19 GMT):
err := stub.PutState(args[0], []byte(args[1]))

vick (Tue, 22 May 2018 12:05:34 GMT):
like here, is it possible to put an entire struct in to that call

vick (Tue, 22 May 2018 12:05:42 GMT):
rather than just the primitive key value

geekoftheweek (Tue, 22 May 2018 12:06:01 GMT):
this is probably painfully simple, but I'm getting the following error when I try to deploy chaincode that imports the cid library `Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/lib/cid: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)`

geekoftheweek (Tue, 22 May 2018 12:06:01 GMT):
this is probably painfully simple, but I'm getting the following error when I try to deploy chaincode that imports the cid library ```Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/lib/cid: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)```

geekoftheweek (Tue, 22 May 2018 12:06:37 GMT):
what step have I skipped in my ignorance?

vick (Tue, 22 May 2018 12:06:48 GMT):
@geekoftheweek it means you're missing that dependency, it's not in your go source path

vick (Tue, 22 May 2018 12:07:03 GMT):
follow same instructions i've given above

geekoftheweek (Tue, 22 May 2018 12:07:10 GMT):
I ran go get... I'm guessing it's not getting copied to the docker image?

geekoftheweek (Tue, 22 May 2018 12:07:10 GMT):
I ran go get (and build)... I'm guessing it's not getting copied to the docker image?

geekoftheweek (Tue, 22 May 2018 12:07:52 GMT):
I'll re-read the backlog, thanks

vick (Tue, 22 May 2018 12:08:00 GMT):
i think Mehta was facing same problem, see the conversation between us above

vick (Tue, 22 May 2018 12:08:00 GMT):
i think Megha was facing same problem, see the conversation between us above

geekoftheweek (Tue, 22 May 2018 12:11:24 GMT):
which folder should the `go build` command be run in?

vick (Tue, 22 May 2018 12:13:31 GMT):
inside the github.com folder i think

geekoftheweek (Tue, 22 May 2018 12:22:56 GMT):
Oof. I think I need to learn basic Golang package management. Now I can't get `go get` to download the library -- it just complains that it's not already on my filesystem :disappointed:

geekoftheweek (Tue, 22 May 2018 12:23:39 GMT):
I'll come back when I have chaincode-specific questions :sweat_smile: Thanks for the help, @vick

jrosmith (Tue, 22 May 2018 13:04:44 GMT):
@amolpednekar if its an x509 cert you can use the standard x509 library: https://golang.org/pkg/crypto/x509/#ParseCertificate

geekoftheweek (Tue, 22 May 2018 13:10:48 GMT):
for reference, following the first answer here solved my issue: https://stackoverflow.com/questions/49560104/cannot-find-package-cid-in-goroot-or-gopath

vick (Tue, 22 May 2018 13:21:11 GMT):
how do you print out logs in chaincode?

jrosmith (Tue, 22 May 2018 13:23:13 GMT):
@vick i use `shim.NewLogger()`

jrosmith (Tue, 22 May 2018 13:23:20 GMT):
logs are available in the container

jrosmith (Tue, 22 May 2018 13:23:22 GMT):
and the peer

vick (Tue, 22 May 2018 13:23:34 GMT):
yeah, ok let me see how that works

vick (Tue, 22 May 2018 13:25:12 GMT):
do you have any reference i can see @jrosmith

jrosmith (Tue, 22 May 2018 13:30:51 GMT):
@vick see here: https://hastebin.com/emesobanal.go

jrosmith (Tue, 22 May 2018 13:30:51 GMT):
@vick see here: https://hastebin.com/muyicajola.go

vick (Tue, 22 May 2018 13:31:02 GMT):
thank you ...

jrosmith (Tue, 22 May 2018 13:32:02 GMT):
@vick these docs will also be helpful: https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewLogger

wael (Tue, 22 May 2018 13:47:45 GMT):
Has joined the channel.

wael (Tue, 22 May 2018 13:47:51 GMT):
Hello ! I am using fabric v 1.0.3 and I am facing an issue with read/write semantics. writing unit tests for transaction that reads after writing into the ledger (same transaction), using mockStub, It will succeed. meanwhile when trying to do so in fabric it reads only what is committed (which means read after write in same transaction will not succeed). is this issue has been resolved in other versions ?

jrosmith (Tue, 22 May 2018 13:49:39 GMT):
@wael those are known as phantom reads, in a given transaction you cannot read your own writes. this behavior is by design: https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L81

jrosmith (Tue, 22 May 2018 13:49:39 GMT):
@wael those are known as phantom reads, in a given transaction cycle you cannot read your own writes. this behavior is by design: https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L81

wael (Tue, 22 May 2018 13:50:27 GMT):
so mockStub should do the same , on ?

wael (Tue, 22 May 2018 13:50:27 GMT):
so mockStub should do the same , no ?

jrosmith (Tue, 22 May 2018 13:51:14 GMT):
@wael that makes sense to me, but i'm also not a maintainer so i can't really comment. you should open up a JIRA issue and the maintainers will address it

ivanchung (Tue, 22 May 2018 14:27:29 GMT):
Has joined the channel.

joe-alewine (Tue, 22 May 2018 17:03:08 GMT):
Has joined the channel.

chongxinman (Wed, 23 May 2018 03:28:57 GMT):
Has joined the channel.

amolpednekar (Wed, 23 May 2018 05:41:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FCezJtSc7Tweyuw9a) @jrosmith cid.getX509Cert() returns type X.509Certificate, and the parse functions take []byte type. How to convert to that? Or any reference for this? Thanks.

amolpednekar (Wed, 23 May 2018 05:41:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FCezJtSc7Tweyuw9a) @jrosmith cid.getX509Cert() returns type X.509Certificate, and the parseCertificate function takes []byte type. How to convert to that? Or any reference for this? Thanks.

gut (Wed, 23 May 2018 08:31:11 GMT):
@jrosmith @wael I don't think write+read issue is phantom read related, but an endorsement behavior. Because the data wael is trying to access in Fabric can be endorsed, but not yet committed, data state is not consistent in the readset. So your read access is rejected.

gut (Wed, 23 May 2018 08:32:21 GMT):
Also, keep in mind that MockStub is just a mock. The data commitment behavior is not reflected. It could, and if you create a JIRA issue for sure it will be a great feature. But since you put the new state, data is already there.

khalifa (Wed, 23 May 2018 08:45:55 GMT):
Has joined the channel.

khalifa (Wed, 23 May 2018 08:49:00 GMT):
Hi all, I have just start with chaincode. I have two questions: 1) I understood that we will have a secure container to execute each chaincode. This mechanism cannot provoke a performance problem when I will have an important number of smart contract. 2) Have you any link or tutorial that detail some recommendations and best practice to develop the smart contract. Thanks in advance

adokce (Wed, 23 May 2018 09:07:29 GMT):
Has joined the channel.

AnkitSingh5 (Thu, 24 May 2018 05:39:06 GMT):
Has joined the channel.

AnkitSingh5 (Thu, 24 May 2018 05:39:23 GMT):
Hi, I am 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

AnkitSingh5 (Thu, 24 May 2018 05:39:23 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 05:39:23 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.

PushpalathaHiremath (Thu, 24 May 2018 07:05:50 GMT):
Hi There, Is there any way we encrypt the chaincode data? or use binary code to install ?

AndreaBorzi (Thu, 24 May 2018 10:08:05 GMT):
Has joined the channel.

KellyCooper (Thu, 24 May 2018 15:21:01 GMT):
Has joined the channel.

KellyCooper (Thu, 24 May 2018 15:29:30 GMT):
#training-and-education-wg includes volunteers available to edit, test and contribute to tutorials and learning materials. Feel free to post possible collaboration in the wg or @KellyCooper. We have many volunteers for beginning projects and some volunteers for advanced. One way we can support your efforts is as users/consumers to comment on clarity, strengths and gaps in your documentation/materials. Your request(s) will be viewed by the group every Monday and we can track/manage on our end. Thanks, Kelly

kelvinzhong (Fri, 25 May 2018 02:08:40 GMT):
Has joined the channel.

nvmadhav (Fri, 25 May 2018 04:11:52 GMT):
Has joined the channel.

venediktov (Fri, 25 May 2018 06:42:40 GMT):
Most of systems I looked at enforce use of Oracles , for some reason I am able to make calls from my chaincode when bootstrapping hyperledger with our ad-tech stack in docker compose . Is it a bug or an oversight ?

venediktov (Fri, 25 May 2018 06:42:40 GMT):
Most of systems I looked at enforce use of Oracles , for some reason I am able to make calls from my chaincode when bootstrapping hyperledger with our ad-tech stack in docker compose . Is it a bug or an oversight ? Normally on public blockchain networks in case the state is not deterministic it will create a fork on the network , what will happen in Hyperledger fabric ?

venediktov (Fri, 25 May 2018 06:42:40 GMT):
Most of systems I looked at enforce use of Oracles , for some reason I am able to make HTTP calls from my chaincode into docker network when running hyperledger chaincode with our ad-tech stack in docker compose . Is it a bug or an oversight ? Normally on public blockchain networks in case the state is not deterministic it will create a fork on the network , what will happen in Hyperledger fabric ?

MonnyClara (Fri, 25 May 2018 06:49:26 GMT):
@venediktov When a transaction is submitted via a chaincode, all the peers simulate the transaction and share their results. If the result of a transaction isn't deterministic, I think that the transaction will not be validated. https://www.youtube.com/watch?v=2_RgCfjunEU&t=301s Can someone double check what I'm saying

MonnyClara (Fri, 25 May 2018 06:49:26 GMT):
@venediktov When a transaction is submitted via a chaincode, all the peers simulate the transaction and share their results. If the result of a transaction isn't deterministic, I think that the transaction will not be validated. https://www.youtube.com/watch?v=2_RgCfjunEU&t=301s Can someone double check what I'm saying ?

venediktov (Fri, 25 May 2018 07:01:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=keMkGEiTbnumnJvkq) @MonnyClara Ivan keeps saying "it will be rejected e.g. not update the ledger but will be stored in the blockchain" - This is very confusing .

MonnyClara (Fri, 25 May 2018 07:05:14 GMT):
Oh yeah that's right I forgot about it ! I never check if that was actually stored in the blockchain, but when you query the blockchain for a state (for example). The value that you will receive is the value of the ledger (the last valid value of the state) I think @gatakka is a fat more reliable source than me. You should thrust him rather than me ;)

gatakka (Fri, 25 May 2018 07:05:14 GMT):
Has joined the channel.

venediktov (Fri, 25 May 2018 07:12:16 GMT):
ok will wait for @gatakka to get back to me ,will read more docs in the meantime about fabric implementation . However the question is still why fabric does not disable outgoing HTTP calls functionality , IO , random functions , all that should be disabled to guarantee determinism of smart contracts IMHO.

venediktov (Fri, 25 May 2018 07:12:16 GMT):
ok will wait for @gatakka to get back to me ,will read more docs in the meantime about fabric implementation . However the question is still why fabric does not disable outgoing HTTP calls functionality , IO , random functions , all that should be disabled to guarantee determinism of smart contracts IMHO. @MonnyClara - thank you for very prompt reply!

muralisr (Fri, 25 May 2018 12:26:52 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8vYPaZGALuhdn82u7

muralisr (Fri, 25 May 2018 12:30:52 GMT):
@venediktov In fabric's `send request to peers who need to endorse - collect responses - collection responses to be committed in a transaction - commit transaction` model, the `HTTP Calls from my chaincode` falls under the `send request to peers who need to endorse ` phase. If they sent back different responses, the `commit transaction` will fail. In that sense it is deterministic.

pathfinder2104 (Fri, 25 May 2018 12:32:03 GMT):
Hi All

pathfinder2104 (Fri, 25 May 2018 12:32:27 GMT):
I want to know that by current version of Fabric (1.1) which languages are supported for Chaincode ?

pathfinder2104 (Fri, 25 May 2018 12:32:33 GMT):
I know about JS and GoLang

pathfinder2104 (Fri, 25 May 2018 12:32:38 GMT):
is Java supported ?

pathfinder2104 (Fri, 25 May 2018 12:32:57 GMT):
JS using Hyperledger-Composer, if I am not wrong.

muralisr (Fri, 25 May 2018 12:38:16 GMT):
@pathfinder2104 there has been discussion on Java support and ongoing work on that.. https://jira.hyperledger.org/browse/FAB-8063 says 1.3 timeframe. Perhaps check with #fabric-java-chaincode

pathfinder2104 (Fri, 25 May 2018 12:38:41 GMT):
Thanks for responding :)

pathfinder2104 (Fri, 25 May 2018 12:38:44 GMT):
I will surely check there

pathfinder2104 (Fri, 25 May 2018 12:38:56 GMT):
but can you please tell me currently whihc all languages are supported ?

pathfinder2104 (Fri, 25 May 2018 13:10:03 GMT):
are there any significant advantages on using GoLang in place of Javascript as chaincode language ?

pathfinder2104 (Fri, 25 May 2018 13:10:25 GMT):
or JavaScript in place of GoLang ?

khalifa (Fri, 25 May 2018 13:46:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kdgFhh3q9EaxakXnH) @PushpalathaHiremath Hi PushpalathaHiremath ,

khalifa (Fri, 25 May 2018 13:48:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kdgFhh3q9EaxakXnH) @PushpalathaHiremath Hi PushpalathaHiremath I have not the awnser but I am interested about this topic. Do you get any response or idea about how to so it. thanks

muralisr (Fri, 25 May 2018 14:51:10 GMT):
@PushpalathaHiremath @khalifa do take a peek at https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/enccc_example please

venediktov (Fri, 25 May 2018 15:39:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3cmpYKqpgiYoYNHbk) @muralisr "the `commit transaction` will fail. In that sense it is deterministic." - will the transaction be purged if it fails or it will linger somewhere in the system?

guangyingyuan (Mon, 28 May 2018 15:04:34 GMT):
Has joined the channel.

phgurgel (Mon, 28 May 2018 19:52:02 GMT):
Has joined the channel.

Amjadnz (Mon, 28 May 2018 20:11:41 GMT):
Ok Came accross this QUESTION in a recent group discussion and I believe it was plausible to put it here for more inputs. can someone put more light - LARGE text so please be patient with it. I have 2 endorser nodes in the system with go language chaincode. we have a local Web-site running on each NODE (JSON WEB SERVICES) - That would be called by go language chaincode while doing invoke. Both Nodes JSON Web-services have different business logics to return data. And I want the data to persist to the BLOCKCHAIN if the EXTERNAL Web-service calls on both nodes return "true" - else the transaction be marked as "failed". This indeed breaks the "deterministic" requirement of chaincode as the endorsers run the entire chaincode on each invoke and run locally on each NODE. But out of *curiosity* can this be done - are we on the right track?

Amjadnz (Mon, 28 May 2018 20:12:29 GMT):
Example Details: -------------------------------------- Node 01 - 10.10.10.1 Chaincode Name : agmchaincode:v1.0 JSON web-service URL : http://localhost/checkId?token=12234 (this is invoked from the chaincode) - returns "true" or "false" Node 02: 10.10.10.2 Chaincode Name : agmchaincode:v1.0 JSON web-service URL: http://localhost/checkId?token=12234 (this is invoked from the chaicode) - returns "true" or "false"

Amjadnz (Mon, 28 May 2018 20:13:11 GMT):
Scenario

Amjadnz (Mon, 28 May 2018 20:13:11 GMT):
Scenario ------------------------------ I want to save following data to the chaincode (Endorsement policy is "both node01,node02 should endorse") UserID, LoginDate, Status, Comments, Token to the ledger 1001, 12/05/2018, 1, 'First Login', TOKEN01 - is passed to the invoke (to NODE 01) - the chaincode invokes http://localhost/checkId?token=TOKEN01 - this returns TRUE - the proposal is sent as successful 1001, 12/05/2018, 1, 'First Login', TOKEN01 - is passed to the invoke (to NODE 02) - the chaincode invokes http://localhost/checkId?token=TOKEN01 - this returns FALSE- the proposal is sent as unsuccessful In that scenario - the TRANSACTION is rejected - which is what I need. Is this the right way? Note: THE URL - always is hardcoded as "http://localhost/checkId?token=" (on all NODES) Note: this way I can expose some of the logic of cross checking the data to an external ENDPOINT and enforce them to give "true" if the business logic returns true, else false Note: for NODES with no "http://localhost/checkId?token=" url (site is not availbale locally) - I assume this is "true" and the nodes do not have any issue with this chaincode call

yacovm (Mon, 28 May 2018 20:24:52 GMT):
@Amjadnz so basically, you have a chaincode that calls a web service and you want to ensure that both web services return true and only then, the transaction is persisted?

yacovm (Mon, 28 May 2018 20:25:09 GMT):
the chaincode - it calls the web service before or after its activity?

Amjadnz (Mon, 28 May 2018 20:37:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kYbSjjD9CQKAgLP23) @yacovm - this is called before the activity.

Amjadnz (Mon, 28 May 2018 20:37:58 GMT):
If failure it returns an error

yacovm (Mon, 28 May 2018 20:38:02 GMT):
oh so it's basically an authorization

Amjadnz (Mon, 28 May 2018 20:38:09 GMT):
In this case yes.

yacovm (Mon, 28 May 2018 20:38:11 GMT):
and if the client doesn't pass authorization - the endorsement fails

yacovm (Mon, 28 May 2018 20:38:14 GMT):
aha!

yacovm (Mon, 28 May 2018 20:38:20 GMT):
i have the *perfect* tool for you

yacovm (Mon, 28 May 2018 20:38:24 GMT):
assuming you use v1.1 ;)

yacovm (Mon, 28 May 2018 20:39:29 GMT):
take a look at https://github.com/hyperledger/fabric/blob/release-1.1/sampleconfig/core.yaml#L345-L366 and here is an example: https://github.com/hyperledger/fabric/blob/release-1.1/core/handlers/auth/filter/expiration.go

yacovm (Mon, 28 May 2018 20:39:46 GMT):
you can make this work as a binary plugin and be loaded dynamically upon peer startup

yacovm (Mon, 28 May 2018 20:40:09 GMT):
the `expiration.go` is a check that the identity of the client hasn't expired

yacovm (Mon, 28 May 2018 20:40:26 GMT):
you can do something similar and add this check at the entrance to the peer's endorser logic

yacovm (Mon, 28 May 2018 20:40:44 GMT):
then - if this check fails, it rejects and doesn't continue to the chaincode

Amjadnz (Mon, 28 May 2018 20:41:06 GMT):
Very interesting - Thanks

Amjadnz (Mon, 28 May 2018 20:42:00 GMT):
On the side node - I mean not just for authentication - maybe a generic business logic REST Service that search local databases before endorsing a transaction, is it a right way or use case of blockchain based systems.

yacovm (Mon, 28 May 2018 20:42:53 GMT):
so i have another tool for you

yacovm (Mon, 28 May 2018 20:43:08 GMT):
there is a similar thing that intercepts the requests, and does some computation

yacovm (Mon, 28 May 2018 20:43:15 GMT):
and then passes the result of the computation

yacovm (Mon, 28 May 2018 20:43:16 GMT):
to the chaincode

yacovm (Mon, 28 May 2018 20:43:50 GMT):
https://github.com/hyperledger/fabric/blob/release-1.1/sampleconfig/core.yaml#L361-L366

yacovm (Mon, 28 May 2018 20:43:57 GMT):
"decorators"

yacovm (Mon, 28 May 2018 20:44:42 GMT):
take a look here https://github.com/hyperledger/fabric/tree/release-1.1/core/handlers/decoration

yacovm (Mon, 28 May 2018 20:45:12 GMT):
basically... it intercepts the request from the user, it has access to the `Proposal` and also to the arguments the user passed

yacovm (Mon, 28 May 2018 20:45:18 GMT):
it can even mutate the arguments the user passed ;)

yacovm (Mon, 28 May 2018 20:45:18 GMT):
it can even mutate the arguments the user passed ;) and it adds "decorations" via adding to a `map[string][]byte`

yacovm (Mon, 28 May 2018 20:45:50 GMT):
and then the chaincode can call: https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L184-L187

yacovm (Mon, 28 May 2018 20:45:54 GMT):
`GetDecorations() map[string][]byte`

Amjadnz (Mon, 28 May 2018 20:46:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jRbbHXcRCzfSACqZy) @yacovm - now this is interesting indeed.

yacovm (Mon, 28 May 2018 20:47:03 GMT):
if you think this is interesting wait for v1.2 ;)

Amjadnz (Mon, 28 May 2018 20:47:30 GMT):
Worth the wait for my test case though - not in hurry anyway.

yacovm (Mon, 28 May 2018 20:47:43 GMT):
in v1.2 - the client doesn't need to know the endorsement policy

yacovm (Mon, 28 May 2018 20:47:50 GMT):
nor the peers in the channel

Amjadnz (Mon, 28 May 2018 20:47:55 GMT):
Oh - is it

yacovm (Mon, 28 May 2018 20:48:31 GMT):
yeah... look here: https://hyperledger-fabric.readthedocs.io/en/latest/discovery-overview.html

Amjadnz (Mon, 28 May 2018 20:48:39 GMT):
So the framework does the heavylifting.

yacovm (Mon, 28 May 2018 20:49:01 GMT):
yeah, long story short - the client has 1 or a few peers it "trusts"

yacovm (Mon, 28 May 2018 20:49:17 GMT):
and it asks them - "say, i want to endorse for chaincode foo, who are the peers i should ask?"

yacovm (Mon, 28 May 2018 20:49:59 GMT):
the peer returns an answer that is some object that the client can use to compute combinations of peers that each combination satisfies the endorsement policy

yacovm (Mon, 28 May 2018 20:50:36 GMT):
so, i.e in the SDK you won't have to give peers to the channel anymore

yacovm (Mon, 28 May 2018 20:50:47 GMT):
or to tell the channel to use certain peers

yacovm (Mon, 28 May 2018 20:51:03 GMT):
it will be more smart

Amjadnz (Mon, 28 May 2018 20:52:04 GMT):
Yes it does, So the doc is saying we have bootstrap the application. I assumed we define this in the channel config. How is that bootstrapping done?

Amjadnz (Mon, 28 May 2018 20:52:04 GMT):
Yes it does, So the doc is saying we have bootstrapped the application for the list of possible peers to endorse. I assumed we define this in the channel config. How is that bootstrapping done?

yacovm (Mon, 28 May 2018 20:52:17 GMT):
bootstrapping what?

yacovm (Mon, 28 May 2018 20:52:30 GMT):
when you bootstrap the SDK you already know use events, right?

yacovm (Mon, 28 May 2018 20:52:56 GMT):
> So the doc is saying we have bootstrapped the application for the list of possible peers to endorse. what doc? the doc i linked?

Amjadnz (Mon, 28 May 2018 20:53:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aqo2cGoWXtjA3rxsT) @yacovm ```The application is bootstrapped knowing about a group of peers which are trusted by the application developer/administrator to provide authentic responses to discovery queries. A good candidate peer to be used by the client application is one that is in the same organization.```

yacovm (Mon, 28 May 2018 20:53:35 GMT):
ah... yeah. you need a peer you trust, basically

yacovm (Mon, 28 May 2018 20:53:40 GMT):
well but that's true even before

yacovm (Mon, 28 May 2018 20:53:45 GMT):
you use the event service right?

yacovm (Mon, 28 May 2018 20:53:50 GMT):
you trust that peer

yacovm (Mon, 28 May 2018 20:53:57 GMT):
so you can use the same peer for events and discovery

Amjadnz (Mon, 28 May 2018 20:53:59 GMT):
Yes I use event service.

Amjadnz (Mon, 28 May 2018 20:54:06 GMT):
Ok - got that.

yacovm (Mon, 28 May 2018 20:54:08 GMT):
so you already now have a peer you trust

yacovm (Mon, 28 May 2018 20:54:32 GMT):
basically... as you know, a client doesn't have the blockchain inside of it

yacovm (Mon, 28 May 2018 20:54:35 GMT):
so it has to trust some peer

Amjadnz (Mon, 28 May 2018 20:55:06 GMT):
So essentially we get the endorsement from the discovery service and no need to mention it as part of lets take NODE-JS invocations.

yacovm (Mon, 28 May 2018 20:55:31 GMT):
yeah exactly

yacovm (Mon, 28 May 2018 20:55:41 GMT):
i only hope the node.js guys will actually code it.... ;)

yacovm (Mon, 28 May 2018 20:55:49 GMT):
they did like 50% of the work so far

yacovm (Mon, 28 May 2018 20:56:06 GMT):
if i were you, i'd use golang SDK

Amjadnz (Mon, 28 May 2018 20:56:19 GMT):
Can a discovery service be dynamically changed then?

yacovm (Mon, 28 May 2018 20:56:27 GMT):
what do you mean dynamically changed?

Amjadnz (Mon, 28 May 2018 20:56:55 GMT):
Lets take today I have 2 orgs used to endorse it, Tomorrow I woudl like to include two more.

yacovm (Mon, 28 May 2018 20:57:25 GMT):
in each query you do - it always computes based on the latest information that is refreshed online

yacovm (Mon, 28 May 2018 20:57:48 GMT):
but that's obvious...

yacovm (Mon, 28 May 2018 20:57:55 GMT):
no point otherwise ;)

Amjadnz (Mon, 28 May 2018 21:00:15 GMT):
One of the limitation I felt when I started with the this channel thing - May be my assumptions are not in line - Once the channel is defined with a set of participants, and we have to change it down the line - is there a chance of doing it in 1.1 or 1.2?

Amjadnz (Mon, 28 May 2018 21:00:59 GMT):
One way of doing it was to revoke certs (to remove some orgs).

yacovm (Mon, 28 May 2018 21:02:13 GMT):
i don't understand

yacovm (Mon, 28 May 2018 21:02:21 GMT):
you can re-configure the channel

Amjadnz (Mon, 28 May 2018 21:02:39 GMT):
Lets take I have in 2017 I have org1, org2 and org3 as participants in a channel

Amjadnz (Mon, 28 May 2018 21:03:30 GMT):
In 2018 I want to add org4 also to the channel and remove org1 - how do we do it?

Amjadnz (Mon, 28 May 2018 21:04:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZEkPFmaCFMXtunLMv) @yacovm - Oh can we?

yacovm (Mon, 28 May 2018 21:04:30 GMT):
there is a tutorial

yacovm (Mon, 28 May 2018 21:05:00 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html

yacovm (Mon, 28 May 2018 21:05:48 GMT):
there is only 1 catch... never, ever, remove the organization of your orderers

yacovm (Mon, 28 May 2018 21:06:14 GMT):
this would be like sliding the key to your apartment below the door

yacovm (Mon, 28 May 2018 21:06:21 GMT):
and you'd lock yourself out

Amjadnz (Mon, 28 May 2018 21:06:38 GMT):
Yep thats what I heard before too. Or cutting the branch on which you sit.

yacovm (Mon, 28 May 2018 21:07:00 GMT):
cutting the branch on which you sit is a good analogy

Amjadnz (Mon, 28 May 2018 21:07:11 GMT):
The tutorial - is this new?

yacovm (Mon, 28 May 2018 21:07:18 GMT):
no

yacovm (Mon, 28 May 2018 21:07:23 GMT):
it's from v1.1

Amjadnz (Mon, 28 May 2018 21:07:40 GMT):
did not came across this before - Oh I see we are still with 1.0.6 for prod systems.

yacovm (Mon, 28 May 2018 21:07:47 GMT):
ouch

Amjadnz (Mon, 28 May 2018 21:09:13 GMT):
Actually we were with 0.6 first, moved to 1.0.6 now. Would take another year to move to 1.2 I guess. Our candence is really slow :frowning2:

yacovm (Mon, 28 May 2018 21:09:20 GMT):
another year?!?!?!

yacovm (Mon, 28 May 2018 21:09:26 GMT):
what, are you in a bank?

Amjadnz (Mon, 28 May 2018 21:09:34 GMT):
How did you guess

yacovm (Mon, 28 May 2018 21:09:41 GMT):
"would take another year"

Amjadnz (Mon, 28 May 2018 21:09:48 GMT):
Aha - good catch.

Amjadnz (Mon, 28 May 2018 21:11:14 GMT):
the clearing/approval cycles in some orgs are really time consuming. Hence these delays. But buying them in was the most difficult part. Like selling them a BMW cheap, and making them pay for spares.

Amjadnz (Mon, 28 May 2018 21:12:09 GMT):
Thanks mate - as usual - very very helpful.

yacovm (Mon, 28 May 2018 21:12:14 GMT):
sure, no problem

yacovm (Mon, 28 May 2018 21:12:19 GMT):
please upgrade from 1.0.6

yacovm (Mon, 28 May 2018 21:12:28 GMT):
i fixed too many bugs in v1.1 ;)

Amjadnz (Mon, 28 May 2018 21:12:43 GMT):
Just for you - I would push harder.

Amjadnz (Mon, 28 May 2018 21:12:43 GMT):
Just for you - I would try to push for upgrading harder.

Amjadnz (Mon, 28 May 2018 21:12:43 GMT):
Just for you - I would try to push for upgrading.

Amjadnz (Mon, 28 May 2018 21:13:04 GMT):
Sure.

Amjadnz (Tue, 29 May 2018 00:16:36 GMT):
Ok another question if someone may be able to help me out here. Is there a guide on how to develop a possible cryptocurrency in FABRIC framework? I know there is a balance transfer, marbles examples - but those are simple aspects of ownership transfer, marbles by marbles, or value by value. Where as a formal UTXO type of cryptocurrency would involve a lot of features including, splitting, ownership transfer, unit distribution etc. Since there is no concept of "mining" here - how can this be incentivized for "miners" to host nodes for endorsements.

Amjadnz (Tue, 29 May 2018 00:18:03 GMT):
I would'nt call it crypto-currency though - maybe a crypto-token.

Amjadnz (Tue, 29 May 2018 00:25:28 GMT):
A quick follow through led me to this https://stackoverflow.com/questions/45459696/cryptocurrency-based-on-hyperledger?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Amjadnz (Tue, 29 May 2018 00:25:38 GMT):
But again no clear answers

jrosmith (Tue, 29 May 2018 10:13:01 GMT):
@Amjadnz you're right, mining is an incentive for people to host nodes in a public, permissionless network. but fabric is a private, permissioned network. parties of a consortium have other business incentives to incentivize hosting nodes. fabric chaincode lets you model really any asset you want, i don't see whats stopping you from modeling the same behavior in a chaincode

MonnyClara (Tue, 29 May 2018 10:19:10 GMT):
Hey, little question about chaincode invokation : Is it possible for multiple peers to invoke the same chaincode at the same time ?

jrosmith (Tue, 29 May 2018 10:22:15 GMT):
@MonnyClara the same chaincode as in the same codebase, yes, but not the same instance of chaincode. each peer installs its own instance of a chaincode, and when that chaincode is invoked, each peer is running its own transaction simulation on its own chaincode.

MonnyClara (Tue, 29 May 2018 10:29:19 GMT):
@jrosmith So for exemple if I got a network with 4 peers, and each of them has the basic chaincode_example02.go installed (https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode/chaincode_example02/go). Let's say A=100. If I connect to all my 4 peers and I run on each peer at the same time `peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}'`. The result should be A=100-(4x10)=60 or A=90 ?

jrosmith (Tue, 29 May 2018 10:30:53 GMT):
@MonnyClara yes, assuming the chaincode is deterministic all 4 peers will read the same world state, simulate the transaction the same way, and all 4 will endorse a transaction proposal saying "A should be 90 in the next world state"

jrosmith (Tue, 29 May 2018 10:31:10 GMT):
oh wait

jrosmith (Tue, 29 May 2018 10:31:22 GMT):
no i misread your example

jrosmith (Tue, 29 May 2018 10:31:54 GMT):
you were giving me an either or. the 4 peers would all agree A would be 90.

jrosmith (Tue, 29 May 2018 10:32:33 GMT):
not 60, because not all four peers are working together to determine an answer. each one is working independently

jrosmith (Tue, 29 May 2018 10:32:33 GMT):
not 60, because all four peers are *not* working together to determine an answer. each one is working independently

jrosmith (Tue, 29 May 2018 10:34:29 GMT):
its like asking 4 different people to solve "Person 'a' had 100 apples and gives 10 to person 'b', how many apples should person 'a' have after person 'b' receives the apples"

jrosmith (Tue, 29 May 2018 10:35:19 GMT):
everyone has the same information to start and has to come to some conclusion. that conclusion shouldn't change based on how many people are solving the problem.

MonnyClara (Tue, 29 May 2018 11:21:11 GMT):
@jrosmith Okey !! Thanks a lot !!

khalifa (Tue, 29 May 2018 12:09:53 GMT):
Hi all, I have just start with chaincode. I have two questions: 1) I understood that we will have a secure container to execute each chaincode. This mechanism cannot provoke a performance problem when I will have an important number of smart contract?

yljgo (Wed, 30 May 2018 03:16:50 GMT):
Has joined the channel.

Amjadnz (Wed, 30 May 2018 03:41:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bFXtWyoTzBmrbKRdQ) @jrosmith Thanks. I see the point. But my question is if it is the use case we can pursue with the permissioned blockchain for a crypto-currency. Another option we were looking at was to have the business logic in FABRIC but delegate the finance part (token part) to an external entity like ETC/ETHER etc.

jrosmith (Wed, 30 May 2018 03:43:05 GMT):
@Amjadnz if thats the direction you want to go you may want to look at [SETH](https://www.hyperledger.org/blog/2017/08/22/hello-world-meet-seth-sawtooth-ethereum). i know the community in #sawtooth is active and friendly.

Amjadnz (Wed, 30 May 2018 03:44:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=haJWYwNqLEJBZ8jkG) @jrosmith - Regarding this question , if there are 4 different transactions posted to 4 peers sequentially - the answer would be "60" right?

jrosmith (Wed, 30 May 2018 03:45:43 GMT):
@Amjadnz as in it gets sent to peer 1, peer 1 process and the transaction gets committed, and then the same command is sent to peer 2, etc?

jrosmith (Wed, 30 May 2018 03:45:43 GMT):
@Amjadnz as in it gets sent to peer 1, peer 1 processes it and the transaction gets committed, and then the same command is sent to peer 2, etc?

Amjadnz (Wed, 30 May 2018 03:46:01 GMT):
yes

Amjadnz (Wed, 30 May 2018 03:46:29 GMT):
because anyway the same transaction is replayed on all the nodes

jrosmith (Wed, 30 May 2018 03:46:41 GMT):
yes, then by the time peer 4 will finish the answer will be 60. after peer 1 process the transaction and it gets committed, the agreed upon world state is 90, after peer 2 its 80, etc.

Amjadnz (Wed, 30 May 2018 03:46:46 GMT):
during endorsement state

Amjadnz (Wed, 30 May 2018 03:46:57 GMT):
yes - cleared

Amjadnz (Wed, 30 May 2018 03:47:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SssBRvNnGxDMQRyZp) @jrosmith Thanks would look into it.

Amjadnz (Wed, 30 May 2018 07:47:10 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?

Amjadnz (Wed, 30 May 2018 07:48:34 GMT):
Or only admin nodes (nodes with ADMIN crypto) can instantiate the chaincodes on other nodes?

PushpalathaHiremath (Wed, 30 May 2018 10:01:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AQagXogHQMK5YMqdB) @muralisr - This example is about encrypting data using a chaincode. What i was looking for is, installing the binaries ( Eg: If i'm using go code for writing chaincode logic, instead of giving the src folder path of code code, is there any way that i can provide the build code / the compiled binary code ) to fabric api's ?

AlexanderZhovnuvaty (Wed, 30 May 2018 11:36:49 GMT):
Has joined the channel.

akoenig (Wed, 30 May 2018 12:20:41 GMT):
Has joined the channel.

akoenig (Wed, 30 May 2018 12:21:10 GMT):
Hi, I have a method in the chaincode which should only be allowed to executed by one organization of the network. But the other organizations have to accept that the one organization has executed this method. What is the best pratices for this? Give the organisation as argument to the chaincode and check the name? Or this there a more generic way? Thanks in advance

C0rWin (Wed, 30 May 2018 13:02:19 GMT):
@akoenig you could just use ``` // GetCreator returns `SignatureHeader.Creator` (e.g. an identity) // of the `SignedProposal`. This is the identity of the agent (or user) // submitting the transaction. GetCreator() ([]byte, error)``` methond of `ChaincodeStubInterface`, to extract certificate of the user/client and check to which org it belongs

C0rWin (Wed, 30 May 2018 13:03:53 GMT):
@akoenig there is an CID library which you can make use:

C0rWin (Wed, 30 May 2018 13:03:55 GMT):
https://github.com/hyperledger/fabric/tree/13447bf5ead693f07285ce63a1903c5d0d25f096/core/chaincode/lib/cid

C0rWin (Wed, 30 May 2018 13:04:35 GMT):
`````mspid, err := cid.GetMSPID(stub)```

C0rWin (Wed, 30 May 2018 13:04:35 GMT):
`mspid, err := cid.GetMSPID(stub)`

akoenig (Wed, 30 May 2018 13:08:28 GMT):
@C0rWin thanks to the answer and the CID i will implement it like this. The only issue i was thinking about if this is the right way to check this IN the chaincode or should we mange this via permissions identity or something else

C0rWin (Wed, 30 May 2018 13:15:19 GMT):
@akoenig I'd guess it depends on what exactly you trying to achieve, based on your initial question it seems like you need this into chaincode.

akoenig (Wed, 30 May 2018 13:16:03 GMT):
yes, it seems so

bnagpur (Wed, 30 May 2018 16:18:44 GMT):
Has joined the channel.

rogerwilcos (Wed, 30 May 2018 22:00:53 GMT):
Has joined the channel.

naveedh27 (Thu, 31 May 2018 09:58:41 GMT):
Has joined the channel.

Alex0 (Thu, 31 May 2018 10:12:39 GMT):
Has joined the channel.

Unni_1994 (Thu, 31 May 2018 13:16:32 GMT):
Has joined the channel.

Unni_1994 (Thu, 31 May 2018 13:16:42 GMT):
multiple vm

nagap (Thu, 31 May 2018 16:13:57 GMT):
Has joined the channel.

naveedh27 (Thu, 31 May 2018 20:34:28 GMT):
Experimenting with JS for Chaincode took 4-5s for a creating a resource. Does using Go for chaincode improves performance?

freddyisaac (Fri, 01 Jun 2018 01:21:28 GMT):
hi @naveedh27 I also noticed something like this in go

freddyisaac (Fri, 01 Jun 2018 01:21:46 GMT):
I think it is related to the fact that the orderer seems to work in quantum steps

freddyisaac (Fri, 01 Jun 2018 01:23:14 GMT):
I could be mistaken but it appears that there is a parameters that determine how much work arrive and how frequently it does so

freddyisaac (Fri, 01 Jun 2018 01:23:14 GMT):
I could be mistaken but it appears that there are parameters that determine how much work arrive and how frequently it does s

freddyisaac (Fri, 01 Jun 2018 01:23:14 GMT):
I could be mistaken but it appears that there are parameters that determine how much work arrive and how frequently it does

freddyisaac (Fri, 01 Jun 2018 01:23:29 GMT):
so for a single transaction example it appears to be slow

freddyisaac (Fri, 01 Jun 2018 01:26:45 GMT):
I think that they are in the core.yaml

freddyisaac (Fri, 01 Jun 2018 01:27:20 GMT):
maybe pullInterval, maxPropogationBurstLatency

freddyisaac (Fri, 01 Jun 2018 01:27:28 GMT):
not sure but I bet someone who does can chime in :)

freddyisaac (Fri, 01 Jun 2018 01:27:59 GMT):
I am kind of going from memory which does not appear to be serving me that well right now :)

freddyisaac (Fri, 01 Jun 2018 01:52:43 GMT):
are you using a solo orderer - I think that was it, it seems to loop on BatchTimeout which is usually set to about 2s by default

freddyisaac (Fri, 01 Jun 2018 01:52:54 GMT):
this is in the configtx.yaml

VinayChaudharyOfficial (Fri, 01 Jun 2018 04:53:20 GMT):
Has joined the channel.

naveedh27 (Fri, 01 Jun 2018 08:35:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=36zz8THsaKTYRf7jH) @freddyisaac Yes. I am using solo orderer.

naveedh27 (Fri, 01 Jun 2018 08:35:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=36zz8THsaKTYRf7jH) @freddyisaac Thanks :thumbsup:

WatserAanDeHand (Fri, 01 Jun 2018 14:42:40 GMT):
Has joined the channel.

WatserAanDeHand (Fri, 01 Jun 2018 14:42:56 GMT):
Hi all. I installed a chaincode, but can't instantiate it. The container for the chaincode is created but has exited. If I do `docker logs ` it says that it cannot find the `package.json` in `/usr/local/src/package.json`. Any idea anyone?

WatserAanDeHand (Fri, 01 Jun 2018 14:43:06 GMT):
I'm using Fabric 1.1.0

hamptonsmith (Fri, 01 Jun 2018 17:03:20 GMT):
Has joined the channel.

hamptonsmith (Fri, 01 Jun 2018 17:46:49 GMT):
Getting a hang during chaincode instantiation. Have CORE_CHAINCODE_EXECUTETIMEOUT set to 60s. During instantiation, log gets to this: ``` 2018-06-01 16:13:15.280 UTC [chaincode] handleMessage -> DEBU 614 [15c0d343d4680220d39e2a6b5ee0920d10ed3ca44627c79ff2b4fd04f138b8d8]HandleMessage- COMPLETED. Notify 2018-06-01 16:13:15.280 UTC [chaincode] notify -> DEBU 615 notifier Txid:15c0d343d4680220d39e2a6b5ee0920d10ed3ca44627c79ff2b4fd04f138b8d8, channelID: does not exist ``` Then it hangs for the remaining 60 seconds before giving me: `2018-06-01 16:14:15.279 UTC [endorser] simulateProposal -> ERRO 618 [global][15c0d343] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction` Any thoughts on how the notification that the chaincode has completed is getting dropped or how I can get a little more debug info? I can confirm that my chaincode Init() is definitely running because I can, for example, pass args to it and see an appropriate error message returned (i.e., 'Init() doesn't take arguments') in the peer logs, but that error also never gets sent back to the command line tool.

IsaacWong (Sat, 02 Jun 2018 08:03:49 GMT):
Has joined the channel.

VenkateshDakshinamurthy (Sun, 03 Jun 2018 11:02:20 GMT):
Has joined the channel.

jimthematrix (Sun, 03 Jun 2018 12:17:25 GMT):
Has left the channel.

TobiasN (Mon, 04 Jun 2018 03:00:11 GMT):
Has joined the channel.

TobiasN (Mon, 04 Jun 2018 03:08:30 GMT):
Hi, how can I get the chaincode-name in when in the chaincode? I want to implement a general purpose chaincode, on one channel I plan to instantiate multiple chaincodes, using the same chaincode-source-file. there is a function "getChannelID()" but not getChaincodeID()

yacovm (Mon, 04 Jun 2018 05:53:20 GMT):
@TobiasN - you can extract the chaincode name from the proposal sent to the peer

yacovm (Mon, 04 Jun 2018 05:53:27 GMT):
however - it will be always a single chaincode, no?

yacovm (Mon, 04 Jun 2018 05:53:43 GMT):
unless, you plan to install the same code under different names?

TobiasN (Mon, 04 Jun 2018 06:27:37 GMT):
@yacovm thanks, I have been able to extract the name from the proposal: my code is this: ``` proposal, err1 := APIstub.GetSignedProposal() prop, err2 := utils.GetProposal(proposal.ProposalBytes) input, err3 := utils.GetChaincodeInvocationSpec(prop) fmt.Println("chaincodeName", input.ChaincodeSpec.ChaincodeId.Name) ```

yacovm (Mon, 04 Jun 2018 09:29:16 GMT):
yep that should work @TobiasN

hrt031293 (Mon, 04 Jun 2018 12:50:20 GMT):
Has joined the channel.

hrt031293 (Mon, 04 Jun 2018 12:51:58 GMT):
Hello experts, Does anyone tried the chaincodein node.js?

hrt031293 (Mon, 04 Jun 2018 12:51:58 GMT):
Hello experts, Had anyone tried the chaincodein node.js?

MihaiAA (Mon, 04 Jun 2018 14:15:24 GMT):
Has joined the channel.

Gaoqi (Mon, 04 Jun 2018 20:32:00 GMT):
Has joined the channel.

vish146 (Wed, 06 Jun 2018 18:12:32 GMT):
Has joined the channel.

kevinmcmahon (Thu, 07 Jun 2018 04:29:04 GMT):
Has joined the channel.

tfls08 (Thu, 07 Jun 2018 07:03:32 GMT):
Has joined the channel.

mvkmvk (Thu, 07 Jun 2018 18:16:17 GMT):
Given I'm using the NewAES256EncrypterEntity to encrypt entities which have attributes relating to other entities (aka foreign key constraints). When processing such an encrypted entity and fetching information from the related entity I leak this information in the read-write-set. Is there a way to do a shim.GetState without it appearing in the RWSet (fully knowing that this might have an impact on consistency)?

abraham (Fri, 08 Jun 2018 04:14:05 GMT):
Has joined the channel.

wangrangli (Fri, 08 Jun 2018 05:29:57 GMT):
Has joined the channel.

aKesav (Fri, 08 Jun 2018 07:40:09 GMT):
Has joined the channel.

migrenaa (Fri, 08 Jun 2018 13:33:23 GMT):
Has joined the channel.

jeno.g (Sat, 09 Jun 2018 11:23:50 GMT):
Has joined the channel.

JuanOrtellado (Sat, 09 Jun 2018 17:36:17 GMT):
Has joined the channel.

willianzhao (Sun, 10 Jun 2018 12:50:19 GMT):
Has joined the channel.

DavorKljajic (Mon, 11 Jun 2018 07:14:33 GMT):
Has joined the channel.

patelvasu (Mon, 11 Jun 2018 07:17:30 GMT):
Has joined the channel.

alex4ip (Tue, 12 Jun 2018 00:36:53 GMT):
Has joined the channel.

Khairul_danial (Tue, 12 Jun 2018 04:20:58 GMT):
Has joined the channel.

frustrated-chain (Tue, 12 Jun 2018 20:58:34 GMT):
Has joined the channel.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I want to implement a currency in hyperledger-fabric through chaincode api but having a problem: I can not take tag, set owner for coin. In other aspect, coin implementation depend on chaincode interface.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I want to implement a currency in hyperledger-fabric through chaincode api but having a problem: I can not take tag, set owner for coin. In other aspect, coin implementation depend on chaincode interface. Have anyone has good idea? which package in hyperledger-fabric I can use to issue transaction? I don't wan't implement currency through chaincode interface. Please help me, experts.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I want to implement a currency in hyperledger-fabric through chaincode api but having a problem: I can not take tag, set owner for coin. In other aspect, coin implementation depend on chaincode interface. Have anyone has good idea? which package in hyperledger-fabric I can use to issue transaction? I don't want implement currency through chaincode interface. Please help me, experts.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I want to implement a currency in hyperledger-fabric through chaincode api but having a problem: I can not take tag, set owner for coin. In other aspect, coin's implementation depend on chaincode interface. Have anyone has good idea? which package in hyperledger-fabric I can use to issue transaction? I don't want implement currency through chaincode interface. Please help me, experts.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I'm implementing a currency in hyperledger-fabric through chaincode api but having a problem: I can not take tag, set owner for coin. In other aspect, coin's implementation depend on chaincode interface. Have anyone has good idea? which package in hyperledger-fabric I can use to issue transaction? I don't want implement currency through chaincode interface. Please help me, experts.

tronglx (Wed, 13 Jun 2018 08:02:11 GMT):
Hi all, I'm implementing a currency in hyperledger-fabric through chaincode api but having a problem: I cannot take tag, set owner for coin. In other aspect, coin's implementation depend on chaincode interface. Have anyone has good idea? which package in hyperledger-fabric I can use to issue transaction? I don't want implement currency through chaincode interface. Please help me, experts.

gen_el (Wed, 13 Jun 2018 09:58:59 GMT):
How do i enforce user permission in the golang chaincode?

gen_el (Wed, 13 Jun 2018 09:58:59 GMT):
How do i enforce user permissions on READ and/or WRITE in the golang chaincode?

gen_el (Wed, 13 Jun 2018 10:23:26 GMT):
Also, can we have "scheduled chaincode functions"?

shsedghi (Wed, 13 Jun 2018 15:23:01 GMT):
Has joined the channel.

shsedghi (Wed, 13 Jun 2018 15:40:44 GMT):
I am trying to move the functionality of chaincode Docker in new 1.1 chiancode-dev set (1 orderer, one peer, one cli and one chaincode) to my Mac to build an IDE environment. Chaincode docker talks to port 7052 which does not exist in the docker compose. and not accessible from host. Any idea, how this command works inside the chaincod docker :CORE_PEER_ADDRESS=127.0.0.1:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc

jrosmith (Wed, 13 Jun 2018 16:38:17 GMT):
@mvkmvk i dont believe theres a way to coerce `GetState` to not appear in the rwset, but if you're just looking up a key you could use [GetQueryResult](https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L138) to perform a rich query for the same key...the query isnt rerun during validation so i _think_ that means the contents aren't in the readset, but I'm not entirely sure. i'm sure you could run a check and find out

jrosmith (Wed, 13 Jun 2018 16:38:51 GMT):
@tronglx i'm not sure i understand what youre asking, are you trying to say you want to to make a coin implementation but not write any chaincode?

jrosmith (Wed, 13 Jun 2018 16:41:05 GMT):
@gen_el you can access user information using the [cid library](https://github.com/hyperledger/fabric/tree/release-1.1/core/chaincode/lib/cid). as for scheduled functions _inside_ of the chaincode, no, and i wouldn't recommend putting anything in there. if you wanted to create an out of band solution where an external client makes a chaincode request at a certain time interval, sure, totally possible.

tom.appleyard (Wed, 13 Jun 2018 17:07:39 GMT):
Hey All, has anyone seen this error before when trying to instantiate chaincode or can you remember how to fix it? ```2018-06-13 16:50:11.586 UTC [dockercontroller] Start -> ERRO 03a start-could not start container: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13 16:50:11.604 UTC [chaincode] Launch -> ERRO 03b launchAndWaitForRegister failed: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13T16:50:11.607344005Z error starting container 2018-06-13 16:50:11.604 UTC [endorser] simulateProposal -> ERRO 03c [mychannel][ee4edca9] failed to invoke chaincode name:"lscc" , error: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13T16:50:11.607371483Z error starting container ```

tom.appleyard (Wed, 13 Jun 2018 17:07:39 GMT):
Hey All, has anyone seen this error before when trying to instantiate chaincode or can you remember how to fix it. It successfully compiles locally (and runs when I try to run it). Thanks! ```2018-06-13 16:50:11.586 UTC [dockercontroller] Start -> ERRO 03a start-could not start container: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13 16:50:11.604 UTC [chaincode] Launch -> ERRO 03b launchAndWaitForRegister failed: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13T16:50:11.607344005Z error starting container 2018-06-13 16:50:11.604 UTC [endorser] simulateProposal -> ERRO 03c [mychannel][ee4edca9] failed to invoke chaincode name:"lscc" , error: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} 2018-06-13T16:50:11.607371483Z error starting container ```

gen_el (Wed, 13 Jun 2018 18:35:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6JQGyrQiJRiQDEgpY) @jrosmith Thanks! Also, was wondering how do i retrieve all "writeset" for a previous transaction? Still learning.

anillewis (Thu, 14 Jun 2018 01:31:46 GMT):
Has joined the channel.

pauljithink (Thu, 14 Jun 2018 01:41:42 GMT):
Has joined the channel.

JonathanC (Thu, 14 Jun 2018 17:20:53 GMT):
Has joined the channel.

CodeReaper (Thu, 14 Jun 2018 22:39:44 GMT):
is there any way to add a go get for your chaincode image creation somewhere in between? I have a package which can't be vendored due to some bug- https://github.com/ethereumproject/go-ethereum/issues/237

yacovm (Thu, 14 Jun 2018 22:50:41 GMT):
the vendoring is done at chaincode packaging @CodeReaper

yacovm (Thu, 14 Jun 2018 22:50:51 GMT):
the chaincode instantiation only compiles

yacovm (Thu, 14 Jun 2018 22:50:55 GMT):
it does not do `go get`

yacovm (Thu, 14 Jun 2018 22:51:13 GMT):
otherwise you'd have problems when the internet connection is crappy or when github is down

yacovm (Thu, 14 Jun 2018 22:51:29 GMT):
which is what happens in node.js chaincode I believe

CodeReaper (Thu, 14 Jun 2018 22:52:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fJoqHhEsKWTfFAE8j) @yacovm I know its a package error, not fabric's

CodeReaper (Thu, 14 Jun 2018 22:52:50 GMT):
But I want to go get the package inside the chaincode container at time of its image creation if possible

yacovm (Thu, 14 Jun 2018 22:55:44 GMT):
what do you mean get the package at time of the creation?

yacovm (Thu, 14 Jun 2018 22:55:52 GMT):
"get" is what i don't understand

yacovm (Thu, 14 Jun 2018 22:56:00 GMT):
you want to do `go get` ?

CodeReaper (Thu, 14 Jun 2018 22:59:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fbD23pxGfppAuD4df) @yacovm yes

yacovm (Thu, 14 Jun 2018 22:59:18 GMT):
i don't think it's a good idea

yacovm (Thu, 14 Jun 2018 22:59:24 GMT):
if you want to put something in the chaincode package

yacovm (Thu, 14 Jun 2018 22:59:30 GMT):
just put it in the chaincode pakcage

yacovm (Thu, 14 Jun 2018 22:59:43 GMT):
and don't hack the chaincode image creation process with network IO

yacovm (Thu, 14 Jun 2018 22:59:59 GMT):
the chaincode package has the chaincode in the form of a tar.gz or something like that

yacovm (Thu, 14 Jun 2018 23:00:08 GMT):
(if my memory doesn't betray me)

yacovm (Thu, 14 Jun 2018 23:00:20 GMT):
you can just programmatically add your files

yacovm (Thu, 14 Jun 2018 23:00:29 GMT):
and then you take this modified chaincode file

yacovm (Thu, 14 Jun 2018 23:00:40 GMT):
and then you instantiate the peer

CodeReaper (Thu, 14 Jun 2018 23:01:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BHqCAjpjakzj29B5g) @yacovm Got it

CodeReaper (Thu, 14 Jun 2018 23:01:39 GMT):
Thanks

yacovm (Thu, 14 Jun 2018 23:03:18 GMT):
i never tried it myself but i know guys who did @CodeReaper

yacovm (Thu, 14 Jun 2018 23:03:23 GMT):
they said it worked

yacovm (Thu, 14 Jun 2018 23:06:17 GMT):
``` message ChaincodeDeploymentSpec { // Prevent removed tag re-use reserved 2; reserved "effective_date"; enum ExecutionEnvironment { DOCKER = 0; SYSTEM = 1; } ChaincodeSpec chaincode_spec = 1; bytes code_package = 3; ExecutionEnvironment exec_env= 4; } ``` you need to modify `code_package` and it is created using `GetDeploymentPayload` - and according to the code it looks like it's a tar.gz like i said, @CodeReaper

CodeReaper (Thu, 14 Jun 2018 23:08:43 GMT):
It looks to be messing up with the sensitive stuff here, I'll see if any other package can handle my thirst first, or if I can manage to create my own package and create its interior build myself and vendor that one.

CodeReaper (Thu, 14 Jun 2018 23:08:43 GMT):
It looks to be messing up with the sensitive stuff here, I'll see if any other package can handle my thirst first, or if I can manage to customize and create my own package and create its interior build myself and vendor that one.

purandam (Fri, 15 Jun 2018 05:50:30 GMT):
Has joined the channel.

purandam (Fri, 15 Jun 2018 05:50:38 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 (Fri, 15 Jun 2018 05:50:38 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 (Fri, 15 Jun 2018 05:50:38 GMT):
Form node sdk chaincode try to use some external api for validation purpose. Issue -1 Step 1- Using "http" to call the external api from smart contract. Step-2 - From http request , getting proper response from the given url. Step-3 - Using "callback" return all the value to invoked function. Step-4- try to use stub.putState(result) Step- 5- Below error [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). How to resolve the issue? Issue -2 Even I try to return the value from chaincode to middle layer then also not returning any value. In middle layer we are getting null value though all value display in console .

purandam (Fri, 15 Jun 2018 05:50:38 GMT):
Form node sdk chaincode try to use some external api for validation purpose. Issue -1 Step 1- Using "http" to call the external api from smart contract. Step-2 - From http request , getting proper response from the given url. Step-3 - Using "callback" return all the value to invoked function. Step-4- try to use stub.putState(result) Step- 5- Below error [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). How to resolve the issue? Issue -2 Even I try to return the value from chaincode to middle layer then also not returning any value. In middle layer we are getting null value though all value display in console .

AnkitSingh5 (Fri, 15 Jun 2018 06:44:25 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. Any help is appreciated.

AnkitSingh5 (Fri, 15 Jun 2018 06:44:25 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. Any help is appreciated.

AnkitSingh5 (Fri, 15 Jun 2018 06:44:25 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. Any help is appreciated.

AnkitSingh5 (Fri, 15 Jun 2018 06:44:25 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.

paulananth (Fri, 15 Jun 2018 12:16:41 GMT):
Has joined the channel.

szytko (Fri, 15 Jun 2018 13:40:48 GMT):
Has joined the channel.

szytko (Fri, 15 Jun 2018 13:41:14 GMT):
Hi there, together with our team we are having a discussion regarding the pros/cons of writing chaincode using NodeJS or Go lang, what are your thoughts/experiences about that?

muralisr (Fri, 15 Jun 2018 13:52:47 GMT):
@szytko its largely a question of your synergy in your env with regards to language and development skills. The other consideration would be what APIs are needed. They are sure to be in golang shim but new features may lag behind in some aspects (testing, usage, etc)...this would be something you'll have to check

szytko (Fri, 15 Jun 2018 13:56:10 GMT):
@muralisr thanks for the answer. But are there any differences between node and go, taking into account performance/speed ?

muralisr (Fri, 15 Jun 2018 14:01:38 GMT):
I don't know but given that the protocol to communication with the fabric is same and the processing on the fabric side is common, I'd say that there shouldn't be a significant difference (if any) between the two. ..but I don't know for sure

szytko (Fri, 15 Jun 2018 14:06:28 GMT):
okay I see, I'm wondering if we for example invoke 1000 or 10000 chaincode functions at the same time, how does it affect the load of the server

sh777 (Fri, 15 Jun 2018 14:54:08 GMT):
Hi there, I'm looking into the "peer chaincode package" and I couldn't understand it. I thought packaging is like I packaged it from one machine and then I could install the package to another machine with copying the source code. Can someone explain it to me a little bit about what it use for?

sh777 (Fri, 15 Jun 2018 14:54:08 GMT):
Hi there, I'm looking into the "peer chaincode package" and I couldn't understand it. I thought packaging is like I packaged it from one machine and then I could install the package to another machine without copying the source code. Can someone explain it to me a little bit about what it use for?

tinytiny123 (Fri, 15 Jun 2018 15:15:23 GMT):
Has joined the channel.

tinytiny123 (Fri, 15 Jun 2018 15:28:46 GMT):
Hey I'm having trouble instantiating chaincode via the java sdk. I keep getting the following error: instantiation policy violation: signature set did not satisfy policy The requesting user is the CA-Admin and should most definitely have permissions to do so. We tried it with the default chaincode endorsement policies and changed them to even accept any member. Really tried a lot of different things and none of them seemed to work. Help would be appreciated

muralisr (Sat, 16 Jun 2018 11:32:00 GMT):
@sh777 `I thought packaging is like I packaged it from one machine and then I could install the package to another machine without copying the source code.` that is correct. once you create a chaincode with `peer chaincode package -n -p -v `, you can simply install it on any machine with `peer chaincode install `

muralisr (Sat, 16 Jun 2018 11:32:36 GMT):
@tinytiny123 can you check in #fabric-sdk-java please ?

ricardoshuree (Sat, 16 Jun 2018 14:51:30 GMT):
Has joined the channel.

nk307 (Mon, 18 Jun 2018 09:03:06 GMT):
Has joined the channel.

AspramShadyan (Mon, 18 Jun 2018 12:42:23 GMT):
Has joined the channel.

AspramShadyan (Mon, 18 Jun 2018 12:43:25 GMT):
Hi everyone. I need to know whether I can make transactions to transfer ether or other cryptocurrencies using Hyperledger Fabri blockchain?

AspramShadyan (Mon, 18 Jun 2018 12:43:25 GMT):
Hi everyone. I need to know whether I can make transactions to transfer ether or other cryptocurrencies using Hyperledger Fabric blockchain?

szytko (Mon, 18 Jun 2018 14:19:29 GMT):
Hi @AspramShadyan Hyperledger Fabric itself doesn't have cryptocurrency built-in, but I think you could implement it using chaincode

AspramShadyan (Mon, 18 Jun 2018 14:20:56 GMT):
ok @szytko. Thanks a lot.

firozmi (Tue, 19 Jun 2018 11:22:29 GMT):
Has joined the channel.

sgiessmann (Tue, 19 Jun 2018 12:16:18 GMT):
Has joined the channel.

mdvenkatesh (Tue, 19 Jun 2018 12:36:21 GMT):
Has joined the channel.

ajmeraharsh (Tue, 19 Jun 2018 12:36:48 GMT):
Has joined the channel.

mdvenkatesh (Tue, 19 Jun 2018 12:37:23 GMT):
hi I want to use primary key as Date and store the data I have modified my code err = stub.PutState(timeKey,objBytes) if err != nil { fmt.Println("Error putting state on routeBytesToWrite") return shim.Error("Error creating route") }

mdvenkatesh (Tue, 19 Jun 2018 12:37:23 GMT):
hi I want to use primary key as Datetime and store the data I have modified my code ``` ``` err = stub.PutState(timeKey,objBytes) if err != nil { fmt.Println("Error putting state on routeBytesToWrite") return shim.Error("Error creating route") }

mdvenkatesh (Tue, 19 Jun 2018 12:37:53 GMT):
but my coach db is taking user input id as priarey key

mdvenkatesh (Tue, 19 Jun 2018 12:37:53 GMT):
but my coach db is taking user input id as primary key

mdvenkatesh (Tue, 19 Jun 2018 12:37:53 GMT):
but my couch db is taking user input id as primary key

timw255 (Tue, 19 Jun 2018 12:50:01 GMT):
Has joined the channel.

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to [hastebin](hastehin.com)?

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to [hastebin](hastebin.com)?

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to [hastebin(hastebin.com)?

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to [hastebin(hastebin.com)?

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to [hastebin](hastebin.com)?

jrosmith (Tue, 19 Jun 2018 12:58:13 GMT):
@mdvenkatesh can you please explain which example youre using and post the modified code to hastebin.com?

minukk (Tue, 19 Jun 2018 13:09:51 GMT):
Has joined the channel.

mdvenkatesh (Tue, 19 Jun 2018 18:18:39 GMT):
I have upploded my code there plese have a look I am trying to to make unique key as date time plese help me @jrosmith

mdvenkatesh (Tue, 19 Jun 2018 18:19:28 GMT):
https://hastebin.com/wusetafena.go

jrosmith (Tue, 19 Jun 2018 18:27:31 GMT):
@mdvenkatesh a few things: i would discourage using `time.Now()` as the request will come to different peers at different times due to network latency. none of the peers will agree on what the value to write is and the transaction won't be committed. use [the client's transaction timestamp](https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetTxTimestamp) instead so that all peers agree on the time at which the transaction occurs. as a follow up, you're saying that `stub.PutState(key, []byte(value))` is not succeeding or is inputting the wrong key?

jrosmith (Tue, 19 Jun 2018 18:27:31 GMT):
@mdvenkatesh a few things: i would discourage using `time.Now()` as the request will come to different peers at different times due to network latency. none of the peers will agree on what the value to write is and the transaction won't be committed. use [the client\'s transaction timestamp](https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetTxTimestamp) instead so that all peers agree on the time at which the transaction occurs. as a follow up, you're saying that `stub.PutState(key, []byte(value))` is not succeeding or is inputting the wrong key?

jrosmith (Tue, 19 Jun 2018 18:27:31 GMT):
@mdvenkatesh a few things: i would discourage using `time.Now()` as the request will come to different peers at different times due to network latency. none of the peers will agree on what the value to write is and the transaction won't be committed. use [the clients transaction timestamp](https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetTxTimestamp) instead so that all peers agree on the time at which the transaction occurs. as a follow up, you're saying that `stub.PutState(key, []byte(value))` is not succeeding or is inputting the wrong key?

mdvenkatesh (Tue, 19 Jun 2018 18:34:31 GMT):
i am using single peer so i think anything will be fine stub.PutState(key, []byte(value)) is taking key value but not my time method @jrosmith

jrosmith (Tue, 19 Jun 2018 18:41:53 GMT):
[time.Now](https://golang.org/pkg/time/#Now) returns something of type Time, not a string. you have key declared as a string at the beginning of your function.

mdvenkatesh (Tue, 19 Jun 2018 19:00:45 GMT):
will GetTxTimestamp() (*timestamp.Timestamp, error) will return what type

mdvenkatesh (Tue, 19 Jun 2018 19:00:45 GMT):
will GetTxTimestamp() (*timestamp.Timestamp, error) will return what type @jrosmith

mdvenkatesh (Tue, 19 Jun 2018 19:04:20 GMT):
https://hastebin.com/agexecawuy.go plese inform if there are any bugs @jrosmith

mdvenkatesh (Wed, 20 Jun 2018 05:26:17 GMT):
Hi guys I want to write a Rest api to support composite search means we are having totally 13 fields and if the user types any field it should search from your coachdb database any suggestions how to do it any documention

mbwhite (Wed, 20 Jun 2018 09:14:50 GMT):
Has joined the channel.

RobertDiebels (Wed, 20 Jun 2018 10:30:46 GMT):
Hey guys, I'm getting the following error on a fabric-peer: `Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincodes/simple: no buildable Go source files in /chaincode/input/src/chaincodes/simple`. I'm using the node SDK to install the chaincode (which succeeds), I just can't find out how the go-files get mounted into cc-env container and where they're mounted from. Please advise.

Rachit_gaur (Wed, 20 Jun 2018 10:33:29 GMT):
Has joined the channel.

Rachit_gaur (Wed, 20 Jun 2018 10:33:34 GMT):
Hi i have setup my chaincode endorsement policy such that 2 organization have to sign it out of 3..How can i pass the signs so that transaction is approved. I am using Oracle Blockchain Beta..and calling my arguments through rest API's..Can i pass some parameters which enable signing or is there some other method?

Rachit_gaur (Wed, 20 Jun 2018 11:16:01 GMT):
How to endorse the chaincode for signing before transactions? and what parameters will be passed to sign the chaincode?

st (Wed, 20 Jun 2018 11:45:22 GMT):
Has joined the channel.

st (Wed, 20 Jun 2018 11:48:05 GMT):
Has left the channel.

akoenig (Thu, 21 Jun 2018 13:21:37 GMT):
Hi, is there a way to query to blockchain directly and not the worldstate? For example I want to get all Transactions wich are sigend with the certifacte 0815.

pyzhang (Thu, 21 Jun 2018 15:51:17 GMT):
Has joined the channel.

hoangntt (Fri, 22 Jun 2018 03:36:48 GMT):
Has joined the channel.

hoangntt (Fri, 22 Jun 2018 03:39:59 GMT):
Hi guys. I'm build a network with fabric hyperledger. I'm getting an error when I call invoke: [Error endorsing invoke: rpc error: code = Unknown desc = error executing chaincode: failed to execute transaction: timeout expired while executing transaction - ] I'm using chaincode with nodejs. Anyone can help?

hoangntt (Fri, 22 Jun 2018 03:39:59 GMT):
Hi guys. I'm building a network with fabric hyperledger. I'm getting an error when I call invoke: [Error endorsing invoke: rpc error: code = Unknown desc = error executing chaincode: failed to execute transaction: timeout expired while executing transaction - ] I'm using chaincode with nodejs. Anyone can help?

purandam (Fri, 22 Jun 2018 06:42:40 GMT):
Form node sdk chaincode try to use some external api for validation purpose. Issue -1 Step 1- Using "http" to call the external api from smart contract. Step-2 - From http request , getting proper response from the given url. Step-3 - Using "callback" return all the value to invoked function. Step-4- try to use stub.putState(result) Step- 5- Below error [[843804c0 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING). How to resolve the issue? Issue -2 Even I try to return the value from chaincode to middle layer then also not returning any value. In middle layer we are getting null value though all value display in console .

nvxtien (Fri, 22 Jun 2018 11:25:11 GMT):
Has joined the channel.

jrosmith (Fri, 22 Jun 2018 12:36:12 GMT):
@purandam i dont use the node version of chaincode, but the go version requires two arguments to any `PutState` call.

purandam (Fri, 22 Jun 2018 12:39:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WvP2zRRXe3S8qrRxm) @jrosmith I am using Node js. But need to take confirmation is there any scope from node sdk chain code to call the external API. [ Using Fabric composer , I able to call external api from smart contract .]

jrosmith (Fri, 22 Jun 2018 12:44:59 GMT):
@purandam fabric does not place any restrictions on what can be performed within chaincode, its up to the developer to follow best practices

MihaiAA (Fri, 22 Jun 2018 13:06:38 GMT):
Hello. Instantiating a node chaincode(behind a proxy) gives the error below. Is there a way to configure npm inside the generated ccenv container in order to step over it? $>docker logs -f frosty_heisenberg 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

dharuq (Fri, 22 Jun 2018 14:45:09 GMT):
Has joined the channel.

dharuq (Fri, 22 Jun 2018 14:45:37 GMT):
Hello! Anyone knows how to use "github.com/hyperledger/fabric/core/chaincode/lib/cid"?

StevenDS 1 (Sat, 23 Jun 2018 10:03:40 GMT):
Has joined the channel.

sureshtedla (Sat, 23 Jun 2018 23:27:43 GMT):
Has joined the channel.

sureshtedla (Sat, 23 Jun 2018 23:27:48 GMT):
Hii

Event (Sun, 24 Jun 2018 08:37:32 GMT):
Has joined the channel.

Event (Sun, 24 Jun 2018 08:38:10 GMT):
Hi, I am new to this chat and Hyperledger. Are there any coders and UI Developers interested to collaborate on an exciting project? I have entire business logic but need help with coding and making a functional UI, as first step. Any suggestions are most welcome. Thanks.

naveedh27 (Sun, 24 Jun 2018 16:25:44 GMT):
Is it possible to Join 2 assets in a query?

Jaline (Mon, 25 Jun 2018 02:59:42 GMT):
Has joined the channel.

szytko (Mon, 25 Jun 2018 09:46:53 GMT):
Hi, is it possible to use https://golang.org/pkg/crypto/rsa in the chaincode?

jrosmith (Mon, 25 Jun 2018 14:08:00 GMT):
@naveedh27 if you're reference a sql style join then no, as fabric uses NoSQL dbs for storing world state. you can use a [rich queries](http://docs.couchdb.org/en/2.0.0/api/database/find.html#selector-syntax)

jrosmith (Mon, 25 Jun 2018 14:09:03 GMT):
@szytko fabric does not limit which go packages you can and can't use. just keep in mind that for valid endorsement results, multiple peers will need to agree on final world state.

jrosmith (Mon, 25 Jun 2018 14:09:35 GMT):
@Event this channel is dedicated to chaincode development, you may have better luck in #fabric , #fabric-questions , or #jobs

Event (Mon, 25 Jun 2018 16:30:08 GMT):
ok Thnx @jrosmith

vave (Mon, 25 Jun 2018 16:40:36 GMT):
Has joined the channel.

vave (Mon, 25 Jun 2018 16:48:57 GMT):
Hey guys ,I already deploy fabric on my ubuntu. then I downloaded fabric-samples and tried to run balance-transfer .I changed url and caName in network-config.yaml ,replaced crypto-config files. When I post a http request "http://localhost:4000/users" and args is {"username":"bruce","orgName":"org1"},Response code is 200,but result is {"success":false,"message":"failed Error:Invalid network configuration due to missing configuration data"}.Any help will be appreciated, thx~

naveedh27 (Mon, 25 Jun 2018 19:02:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AAup8oss97cqRy26m) @jrosmith Thanks for your answer

mcoblenz (Mon, 25 Jun 2018 19:43:40 GMT):
Has joined the channel.

mcoblenz (Mon, 25 Jun 2018 19:44:47 GMT):
Hi all. Is there a standard solution for chaincode whose behavior depends on time (i.e. time in the real world)? Some equivalent of oraclize, for example, to get data from outside sources safely?

alext234 (Tue, 26 Jun 2018 04:32:00 GMT):
Has joined the channel.

Unni_1994 (Tue, 26 Jun 2018 06:36:50 GMT):
Hi All,Is cross chaincode invocation possible in multi channel scenario?

SherifMuhammed (Tue, 26 Jun 2018 06:46:02 GMT):
Has joined the channel.

jrosmith (Tue, 26 Jun 2018 13:10:50 GMT):
@Unni_1994 yes, but across channels there is only [read-only access](https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L65)

jrosmith (Tue, 26 Jun 2018 13:11:57 GMT):
@mcoblenz there is not a standard solution, you would have to roll your own implementation of an oracle

JigneshVasoya (Tue, 26 Jun 2018 13:56:11 GMT):
Has joined the channel.

JigneshVasoya (Tue, 26 Jun 2018 13:56:40 GMT):
I have a single peer in channel and I have installed&instantiated 2 chaincodes on it say CC1 and CC2 I write some key-value using CC1 and try to query CC2 with the key CC2 is not able to read the key. It returns null on 'GetState' Am I doing anything wrong here?

puneetsharma86 (Wed, 27 Jun 2018 07:34:03 GMT):
Has joined the channel.

RobertDiebels (Wed, 27 Jun 2018 08:15:26 GMT):
Has left the channel.

MihaiAA (Wed, 27 Jun 2018 12:58:28 GMT):
Hello. Instantiating a node chaincode(behind a proxy) gives the error below. Is there a way to configure npm inside the generated ccenv container in order to step over it? $>docker logs -f frosty_heisenberg 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

davidkel (Wed, 27 Jun 2018 15:42:38 GMT):
@MihaiAA include a relevant .npmrc file as part of your chaincode source code

AvikHazra (Thu, 28 Jun 2018 07:30:40 GMT):
Has joined the channel.

Nghiadt (Thu, 28 Jun 2018 07:46:51 GMT):
Has joined the channel.

oqf (Thu, 28 Jun 2018 09:29:23 GMT):
Has joined the channel.

clouddead (Thu, 28 Jun 2018 15:01:06 GMT):
Has joined the channel.

gen_el (Thu, 28 Jun 2018 15:52:27 GMT):
Currently, does `GetQueryResult` in shim.ChaincodeStubInterface, get executed at the validation phase?

mondraymond (Thu, 28 Jun 2018 16:33:30 GMT):
Has joined the channel.

vagnerasilva (Thu, 28 Jun 2018 22:21:42 GMT):
Has joined the channel.

tensingh.anburaj (Fri, 29 Jun 2018 05:50:30 GMT):
Has joined the channel.

Legiit (Fri, 29 Jun 2018 06:45:53 GMT):
Has joined the channel.

Legiit (Fri, 29 Jun 2018 06:46:07 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 🙂

yoheiueda (Fri, 29 Jun 2018 09:39:50 GMT):
Has joined the channel.

ArvsIndrarys (Fri, 29 Jun 2018 14:52:33 GMT):
Hi guys ! I encounter some problem when using my chaincode on a real environment, I got the following error : ``` Error: Error sending transaction invoke: could not send: rpc error: code = Unavailable desc = transport is closing - version:1 response: payload:"\n \251\352vq\322\255=\020 \010L\262\017\306\345\336\014\201\242\341\363\304-x\225\236~N\371V\242I\022l\nX\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\001\022@\n\004mycc\0228\n\026\n\024\000patient:\000PAT1\000MED1\000\032\036\n\024\000patient:\000PAT1\000MED1\000\032\006\"MED1\"\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: ``` (sorry for putting something that ugly) The thing is, my queries do work so I don't get it and in my unit testing, everything is fine. And I don't understand the payload as the logging on my chaincode container looks like everything is working, and my code on successfull invoke is `return shim.Success(nil)`. Can someone help me on this one?

ArvsIndrarys (Fri, 29 Jun 2018 14:52:33 GMT):
Hi guys ! I encounter some problem when using my chaincode on a real environment, I got the following error : ``` Error: Error sending transaction invoke: could not send: rpc error: code = Unavailable desc = transport is closing - version:1 response: payload:"\n \251\352vq\322\255=\020 \010L\262\017\306\345\336\014\201\242\341\363\304-x\225\236~N\371V\242I\022l\nX\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\001\022@\n\004mycc\0228\n\026\n\024\000patient:\000PAT1\000MED1\000\032\036\n\024\000patient:\000PAT1\000MED1\000\032\006\"MED1\"\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: ``` (sorry for putting something that ugly) The thing is, my queries do work and my unit testing is fine so I don't get it. And I don't understand the payload as the logging on my chaincode container looks like everything is working, and my code on successfull invoke is `return shim.Success(nil)`. Can someone help me on this one?

ArvsIndrarys (Fri, 29 Jun 2018 14:52:33 GMT):
Hi guys ! I encounter some problem when using my chaincode on a real environment, I got the following error : ``` Error: Error sending transaction invoke: could not send: rpc error: code = Unavailable desc = transport is closing - version:1 response: payload:"\n \251\352vq\322\255=\020 \010L\262\017\306\345\336\014\201\242\341\363\304-x\225\236~N\371V\242I\022l\nX\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\001\022@\n\004mycc\0228\n\026\n\024\000patient:\000PAT1\000MED1\000\032\036\n\024\000patient:\000PAT1\000MED1\000\032\006\"MED1\"\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: ``` (sorry for putting something that ugly) The thing is, my queries do work and my unit testing is fine so I don't get it. Besides I don't understand the payload as the logging on my chaincode container looks like everything is working, and my code on successfull invoke is `return shim.Success(nil)`. Can someone help me on this one?

mark.zhang (Sat, 30 Jun 2018 02:46:08 GMT):
Has joined the channel.

SorianoTech (Sun, 01 Jul 2018 07:50:55 GMT):
Has joined the channel.

sigma67 (Sun, 01 Jul 2018 19:49:15 GMT):
Has joined the channel.

kdnmih (Mon, 02 Jul 2018 13:33:13 GMT):
Has joined the channel.

danny_lee (Mon, 02 Jul 2018 23:07:14 GMT):
Has joined the channel.

edevil (Tue, 03 Jul 2018 10:59:14 GMT):
Has joined the channel.

tripleOrange (Tue, 03 Jul 2018 17:32:32 GMT):
Has joined the channel.

mdvenkatesh (Wed, 04 Jul 2018 08:02:20 GMT):

dataincouchdb.PNG

mdvenkatesh (Wed, 04 Jul 2018 08:03:17 GMT):
thes is my couch db for a tanscation can any one explain where I am having the previous hash

BabuPallam (Wed, 04 Jul 2018 22:20:04 GMT):
Has joined the channel.

ibmamnt (Thu, 05 Jul 2018 05:13:19 GMT):
Has joined the channel.

vladyslavmunin (Thu, 05 Jul 2018 10:03:37 GMT):
Hi , is it possible to update collection configuration file for work with private tx , I found that collection file is setting when we instantiate chaincode , and there is an option in collections-config in upgrade chaincode command, but is it possible to change 'authorized' peer for concrete transaction on flight ? or I still have to setup separate channel for this? e.g. in the same channel i want to have private tx between A and B and B and C , and not private between A , B , C

C0rWin (Thu, 05 Jul 2018 10:39:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BzAD8Wd5m9qoWq3qA) @vladyslavmunin You can define two collections, one available for org A and B, while second one available for B and C... Normal (w/o collection name) writes will be available for A, B and C as usual.

vladyslavmunin (Thu, 05 Jul 2018 11:30:33 GMT):
@C0rWin so , potentially if I have N members in channel and I want to anticipate potential private 'collections ' between all parties , I can create n*(n-1)/2 collections ( collection to each between two nodes). I 'm right?

vladyslavmunin (Thu, 05 Jul 2018 11:30:33 GMT):
@C0rWin so , potentially if I have N members in channel and I want to anticipate potential private 'collections ' between all parties , I can create n*(n-1)/2 collections ( collection to each between two nodes). am I right?

vladyslavmunin (Thu, 05 Jul 2018 11:30:33 GMT):
@C0rWin so , potentially if I have N members in channel and I want to anticipate potential private 'collections ' between all parties , I can create n*(n-1)/2 collections ( collection between each two nodes). am I right?

Rachit_gaur (Thu, 05 Jul 2018 12:53:13 GMT):
I have been using hyperledger fabric to develop my chaincode and have successfully instantiated on a channel with multiple organizations. The endorsement policies have been set to be signed by all the organization using the consensus protocol, but I am not able to understand how would I accept the transaction when I call the invoke function Do I have to pass some parameters in the arguments for the same? Please help me understand how to enable signing in the case of all the organizations agreeing to the transaction

brelane (Thu, 05 Jul 2018 15:38:55 GMT):
Has joined the channel.

NilsPe (Thu, 05 Jul 2018 17:27:15 GMT):
Has joined the channel.

NilsPe (Thu, 05 Jul 2018 17:32:32 GMT):
Hi everyone, my application will have some functionality to "sign" an existing object, imagine a legal contract. I was wondering if it would be possible to use the internal state versioning (like in read-sets) to find out which version of an object someone was referring to instead of passing the whole object. Is there a way to do it? Is this even a good design?

NilsPe (Thu, 05 Jul 2018 17:33:22 GMT):
Maybe to add one thing: this is done via middleware, so a user can not interact with the system directly.

elciusferreira (Thu, 05 Jul 2018 19:04:13 GMT):
Has joined the channel.

IronStrong (Fri, 06 Jul 2018 08:30:41 GMT):
Has joined the channel.

mdvenkatesh (Fri, 06 Jul 2018 09:01:05 GMT):
Error: Failed to find private key for certificate in '/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem': Could not find matching private key for SKI: Failed getting key for SKI [[35 82 133 149 146 105 156 16 132 67 89 164 40 192 154 38 221 237 30 176 127 56 69 175 231 44 237 186 220 146 95 137]]: Key with SKI 2352859592699c10844359a428c09a26dded1eb07f3845afe72cedbadc925f89 not found in /etc/hyperledger/fabric-ca-server/msp/keystore

mdvenkatesh (Fri, 06 Jul 2018 09:01:26 GMT):
can any one say what it is saying and how to rectify it

mdvenkatesh (Fri, 06 Jul 2018 09:02:49 GMT):
deploying is completed without errors but while opeaning the logs it is showing me the following issue

mdvenkatesh (Fri, 06 Jul 2018 12:07:57 GMT):
hi Guys I have deployed marbles project but I am confused where the authentication is taken for private key an d public key

mdvenkatesh (Fri, 06 Jul 2018 12:08:04 GMT):
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/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk -b admin:adminpw' -d volumes: - ./channel/crypto-config/peerOrganizations/peerOrg1/ca/:/etc/hyperledger/fabric-ca-server-config container_name: ca_peerOrg1

mdvenkatesh (Fri, 06 Jul 2018 12:09:12 GMT):
there is no /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem these in your folder how my poc is getting publickey and privatekey

mdvenkatesh (Fri, 06 Jul 2018 12:09:12 GMT):
there is no /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem in your folder how my app is getting publickey and privatekey can anyone explain

ApurvTandon (Fri, 06 Jul 2018 13:31:09 GMT):
Has joined the channel.

Johnnyhoboy (Fri, 06 Jul 2018 15:01:14 GMT):
Has joined the channel.

khaledMD (Sat, 07 Jul 2018 21:42:09 GMT):
Has joined the channel.

medhak19 (Mon, 09 Jul 2018 01:06:32 GMT):
Hello, I have installed fabric 1.1 network and was exploring new chaincode feature of fabric 1.1 which makes use of client identity chaincode library using node js sdk. Following are the observations. 1. Chaincode install is successful, however chaincode instantiation fails with following error: 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 The package "github.com/hyperledger/fabric/core/chaincode/lib/cid" doesn't seem to be inbuilt in fabric 1.1 images 2. I used govendor tool to make this package available locally in vendor folder. Chaincode install was successful, but chaincode instantiation again failed, but this time with following error: 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: 2 "# github.com/example_cc/go/vendor/golang.org/x/crypto/sha3 chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go:13:6: missing function body # github.com/example_cc/go/vendor/golang.org/x/sys/unix chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:13:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:10:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:14:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:12:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:13:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:14:6: missing function body chaincode/input/src/github.com/example_cc/go/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:15:6: missing function body " at new createStatusError (/root/fabric/1.1_network/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:64:15) at /root/fabric/1.1_network/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:583:15 [2018-07-09 06:32:22.966] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-07-09 06:32:22.966] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-07-09 06:32:22.966] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:14013) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:14013) [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 clue on how to resolve this error ? Thanks and Regards, Medha.

nishant_thite (Mon, 09 Jul 2018 02:40:08 GMT):
Has joined the channel.

aaronchipper (Mon, 09 Jul 2018 04:53:59 GMT):
Has joined the channel.

qq13556575424 (Mon, 09 Jul 2018 06:25:54 GMT):
Has joined the channel.

gitesh-tyagi (Mon, 09 Jul 2018 06:34:02 GMT):
Has joined the channel.

RaeHowe (Mon, 09 Jul 2018 07:10:22 GMT):
Has joined the channel.

RaeHowe (Mon, 09 Jul 2018 07:27:58 GMT):

Clipboard - July 9, 2018 3:27 PM

RaeHowe (Mon, 09 Jul 2018 07:28:58 GMT):
@medhak19 I see "fabric-release-1.2" has the lib:cid ,you can try download the file to your directory

RaeHowe (Mon, 09 Jul 2018 07:50:21 GMT):
Hi all, I have a question: about interface function:PutPrivateData, DelPrivateData etc,I want to know the first parameter:collection string the parameter how to use?

NilsPe (Mon, 09 Jul 2018 09:36:25 GMT):
Hi @medhak19 , I am running 1.1 on docker with cid. Do you include also the dependencies of cid in the vendor folder? I have 4 dependencies defined in my vendor json: "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/common/attrmgr" "github.com/hyperledger/fabric/core/chaincode/lib/cid" "github.com/pkg/errors"

llhl001 (Tue, 10 Jul 2018 01:37:36 GMT):
Has joined the channel.

EricYang (Tue, 10 Jul 2018 04:26:09 GMT):
Has joined the channel.

medhak19 (Tue, 10 Jul 2018 06:49:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qbkdjwfjapgaWBdci) @NilsPe Hello @NilsPe ,

medhak19 (Tue, 10 Jul 2018 06:57:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qbkdjwfjapgaWBdci) @NilsPe Hello @NilsPe , Yes my vendor folder has above 4 dependencies. Could you please let me know the go version and govendor version you are using? I was facing some issue with govendoring with my go version 1.10.3, hence I installed go 1.9.1 and was able to do govendoring successfully.(Not sure whether versions will matter here ) My go version: go version go1.9.1 linux/amd64 My govendor version: v1.0.9

Asch (Tue, 10 Jul 2018 07:27:00 GMT):
Has joined the channel.

NilsPe (Tue, 10 Jul 2018 12:25:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ABWHJzTWrtWpeBWxT) @medhak19 I am running go1.10.3 windows/amd64 and govendor v1.0.9

akoenig (Tue, 10 Jul 2018 12:39:31 GMT):
Hi, when I try to execute a chaincode more than once I get an error like this "2018-07-10 12:35:34.650 UTC [chaincode] ExecuteChaincode -> ERRO 1449 txid: 2d9f71d06c9a2da49087f975734c1d23f6707abeda11e172b8209c422d33afeb(foo) exists" but only sometimes. Any idea?

asadhayat (Tue, 10 Jul 2018 12:41:46 GMT):
@medhak19 this article may be useful http://www.webofspider.com/tutorials/using-client-identity-chaincode-library-in-hyperledger-fabric-chaincode/

medhak19 (Tue, 10 Jul 2018 13:36:12 GMT):
@asadhayat , @NilsPe , thank you for your help. I was able to get cid working with 1.1. I followed the steps for govendoring again and everything worked fine, probably I was doing something wrong in the govendoring process earlier.

NoLimitHoldem (Wed, 11 Jul 2018 05:04:12 GMT):
Has joined the channel.

jayeshjawale95 (Wed, 11 Jul 2018 07:28:54 GMT):
Has joined the channel.

Rosan (Wed, 11 Jul 2018 10:08:21 GMT):
Hi @hoangntt , >>Hi guys. I'm building a network with fabric hyperledger. I'm getting an error when I call invoke: [Error endorsing invoke: rpc error: code = Unknown desc = error executing chaincode: failed to execute transaction: timeout expired while executing transaction - ] I'm using chaincode with nodejs. Anyone can help?

PyiTheinKyaw (Wed, 11 Jul 2018 12:12:37 GMT):
Has joined the channel.

RockyRacer (Wed, 11 Jul 2018 12:46:45 GMT):
Has joined the channel.

RockyRacer (Wed, 11 Jul 2018 12:50:21 GMT):
hi, `go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim` does not retrieve files

RockyRacer (Wed, 11 Jul 2018 12:50:27 GMT):
I get `/opt/gopath/src/github.com/hyperledger/fabric exists but /opt/gopath/src/github.com/hyperledger/fabric/.git does not - stale checkout?`

RockyRacer (Wed, 11 Jul 2018 12:51:00 GMT):
any thought on this?

KaranBlockchain (Wed, 11 Jul 2018 13:31:30 GMT):
Has joined the channel.

KaranBlockchain (Wed, 11 Jul 2018 13:31:59 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 of how to start with my own sample application which can have a moderator and 2 participants. Any help will be appreciated.

KaranBlockchain (Wed, 11 Jul 2018 13:31:59 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. Any help will be appreciated.

KaranBlockchain (Wed, 11 Jul 2018 13:31:59 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. Any help will be appreciated.

medhak19 (Wed, 11 Jul 2018 15:15:36 GMT):
Hello all, I am exploring attribute based access control in chaincode using new cid package introduced in fabric 1.1 I successfully registered a user Roger with some attributes using fabric-ca-client command and can see all the attributes when I run "fabric-ca-client user list --id Roger as shown below: root@pt-corcto15834:~# fabric-ca-client identity list --id Roger --caname ca-usorg --tls.client.certfile /root/fabric-ca/client/msp/signcerts/cert.pem --tls.certfiles /root/cls/network/crypto-config/peerOrganizations/usorg.bank.com/ca/ca.usorg.bank.com-cert.pem --url 'https://ca.usorg.bank.com:7054' Name: Roger, Type: user, Affiliation: org1.department1, Max Enrollments: -1, Attributes: [{Name:hf.EnrollmentID Value:Roger ECert:true} {Name:hf.Type Value:user ECert:true} {Name:hf.Affiliation Value:org1.department1 ECert:true} {Name:app1Admin Value:true ECert:true} {Name:email Value:rogerf@gmail.com ECert:false} {Name:attr1 Value:val1 ECert:false}] However I am not able to fetch the attributes attr1 and email from chaincode The code snippet: <> val, ok, err := cid.GetAttributeValue(stub, "email") if err != nil { logger.Errorf("error fetching attribute value: %s", err) } if !ok { // The client identity does not possess the attribute logger.Errorf("ci doesn't posses attribute") } logger.Info("****************Attribute value: ", val) <> When this chaincode is called, the logger always prints "ci doesn't posses attribute". Which means though err is null, ok is false. The following code snippet works as expected, i.e logger prints "enroll ID" as Roger. This proves that cid is getting executed for correct user i.e. Roger. <> cert, err := cid.GetX509Certificate(stub) enrollID := cert.Subject.CommonName logger.Info("$$$$$$$$$$$$$$$$$enroll ID: " , enrollID) <> Any pointers ? Am I missing anything here. I also have couple of questions: 1. id, err := cid.GetID(stub) Here I am getting following value for id: eDUwOTo6Q049Um9nZXIsT1U9dXNlcitPVT1vcmcxK09VPWRlcGFydG1lbnQxOjpDTj1jYS51c29yZy5iYW5rLmNvbSxPPXVzb3JnLmJhbmsuY29tLEw9U2FuIEZyYW5jaXNjbyxTVD1DYWxpZm9ybmlhLEM9VVM= What does this value signify? 2. Is it possible to register a user with attributes using node sdk ? I never got it working. + All examples/articles of cid (client identity chaincode library) provide only 1 way to register user with attributes and that is using command: "fabric-ca-client". Does that mean node SDK does not yet support this?

dharuq (Wed, 11 Jul 2018 23:48:42 GMT):
Hello! Is it possible to invoke throughout a chaincode another chaincode that was installed by different organizations and different channel?

noif (Thu, 12 Jul 2018 05:56:22 GMT):
Has joined the channel.

WadeLu (Thu, 12 Jul 2018 07:31:16 GMT):
Has joined the channel.

rbole (Thu, 12 Jul 2018 07:47:34 GMT):
Has joined the channel.

supay (Thu, 12 Jul 2018 08:02:05 GMT):
Has joined the channel.

supay (Thu, 12 Jul 2018 08:02:11 GMT):
hey, is it possible to dynamically create smart-contracts on hyperledger?

mdvenkatesh (Thu, 12 Jul 2018 08:14:43 GMT):
Hi Guys I am working on the marbles latest version updated in GitHub I am getting path error previously it worked fine but giving me some errors now help regarding this "path": "$HOME/marbles/fabric-samples/fabcar/hfc-key-store" } }, "channels": { "mychannel": { "orderers": [ "fabric-orderer" ], "peers": { "fabric-peer-org1": { "x-chaincode": {} } }, "chaincodes": [ "marbles:v4" ], "x-blockDelay": 10000 } }, "organizations": { "Org1MSP": { "mspid": "Org1MSP", "peers": [ "fabric-peer-org1" ], "certificateAuthorities": [ "fabric-ca" ], "x-adminCert": { "path": "$HOME/marbles/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem" }, "x-adminKeyStore": { "path": "$HOME/marbles/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/" } I checked with that path

BhaskarNarayan (Thu, 12 Jul 2018 09:22:07 GMT):
Has joined the channel.

asadhayat (Thu, 12 Jul 2018 13:43:04 GMT):
How to get affiliation in chaincode?

asadhayat (Thu, 12 Jul 2018 13:43:04 GMT):
How to get user's affiliation in chaincode?

gsgx (Thu, 12 Jul 2018 15:00:21 GMT):
Has joined the channel.

tamseo (Thu, 12 Jul 2018 18:08:14 GMT):
Has joined the channel.

dharuq (Fri, 13 Jul 2018 09:50:50 GMT):
Is it possible to have two different object types in one chaincode?

mp (Fri, 13 Jul 2018 10:17:56 GMT):
Is it possible to issue aggregation queries to couchdb state ( ie I have index on field docType and would like to get count of docs by type)

mp (Fri, 13 Jul 2018 10:17:56 GMT):
Is it possible to issue aggregation queries to couchdb state ( ie I have index on field docType and would like to get count of docs by type) also when creating index in couchdb we get design doc like this: { "_id": "_design/indexType", ... "language": "query", "views": { "indexType": { "map": { "fields": { "doctype": "asc" }, "partial_filter_selector": {} }, "reduce": "_count", "options": { "def": { "fields": [ "doctype" ....

mp (Fri, 13 Jul 2018 10:17:56 GMT):
Is it possible to issue aggregation queries to couchdb state ( ie I have index on field docType and would like to get count of docs by type)? also when creating index in couchdb we get design doc like this: { "_id": "_design/indexType", ... "language": "query", "views": { "indexType": { "map": { "fields": { "doctype": "asc" }, "partial_filter_selector": {} }, "reduce": "_count", "options": { "def": { "fields": [ "doctype" ....

mp (Fri, 13 Jul 2018 10:17:56 GMT):
Is it possible to issue aggregation queries to couchdb state from chaincode ( ie I have index on field docType and would like to get count of docs by type)? also when creating index in couchdb we get design doc like this: { "_id": "_design/indexType", ... "language": "query", "views": { "indexType": { "map": { "fields": { "doctype": "asc" }, "partial_filter_selector": {} }, "reduce": "_count", "options": { "def": { "fields": [ "doctype" ....

mp (Fri, 13 Jul 2018 10:21:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=s6HTFsSoaC58gGCQc) @dharuq Yes, its absolutely ok.

dharuq (Fri, 13 Jul 2018 14:38:32 GMT):
Is it possible to invoke throughout a chaincode another chaincode that was installed by the same organization but is installed in a different channel?

jiulama (Sat, 14 Jul 2018 07:10:24 GMT):
Has joined the channel.

mastersingh24 (Sat, 14 Jul 2018 14:13:39 GMT):
@dharuq - Chaincode to chaincode calls across channels are possible with the following limitations: 1) Each peer you invoke must be a member of both channels 2) Each peer must have the chaincode installed 3) You can only make read-only (query) calls across channels

dharuq (Sat, 14 Jul 2018 17:33:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MtMu4wqWNuqkxqkFK) @mastersingh24 thanks

dharuq (Sat, 14 Jul 2018 17:33:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MtMu4wqWNuqkxqkFK) @mastersingh24 So it is not possible to share information between channels right?

stone-ch (Sun, 15 Jul 2018 15:34:02 GMT):
Has joined the channel.

Legiit (Sun, 15 Jul 2018 18:29:48 GMT):
Is there an easy way to check chaincode syntax? As this results in a timeout when installing/instantiating the chaincode and takes forever to find the error

jpgalmeida (Sun, 15 Jul 2018 21:30:39 GMT):
Has joined the channel.

muralisr (Sun, 15 Jul 2018 21:55:19 GMT):
@Legiit few things you could do (1) do `go build` to make sure chaincode builds (2) run in dev mode to for faster turnaround (3) change the default values of `startuptimeout` and `executetimeout` under chaincode in core.yaml ... (strongly suggest 1 and 2 regardless)

richy7734 (Mon, 16 Jul 2018 09:33:04 GMT):
Has joined the channel.

richy7734 (Mon, 16 Jul 2018 09:38:01 GMT):
Hi all, I am trying out Attribute based access control using GoLang and facing an issue in getting the attribute in the chaincode. I'm using "cid.GetAttributeValue()" function and the function returns nothing, it prints blank and the found variable is set to false.

richy7734 (Mon, 16 Jul 2018 09:38:01 GMT):
Hi all, I am trying out Attribute based access control using GoLang and facing an issue in getting the attribute in the chaincode. I'm using "cid.GetAttributeValue()" function and the function returns nothing, it prints blank and the found variable is set to false. The things I have done are: 1. Registered a user defined attribute named "firstName" with value "*" to the admin 2. Enrolled that admin to the network 3. Registered and enrolled the user with the same attribute "firstName" 4. Invoked a chaincode to get the attribute value using the enrolled user

richy7734 (Mon, 16 Jul 2018 09:38:01 GMT):
Hi all, I am trying out Attribute based access control using GoLang and facing an issue in getting the attribute in the chaincode. I'm using "cid.GetAttributeValue()" function and the function returns nothing, it prints blank and the found variable is set to false. The things I have done are: 1. Registered a user defined attribute named "firstName" with value "*" to the admin 2. Enrolled that admin to the network 3. Registered and enrolled the user with the same attribute "firstName" (with ecert flag set to true) 4. Invoked a chaincode to get the attribute value using the enrolled user

johnlohith (Mon, 16 Jul 2018 09:47:34 GMT):
Has joined the channel.

tejpowar (Mon, 16 Jul 2018 10:01:12 GMT):
Has joined the channel.

asadhayat (Mon, 16 Jul 2018 11:49:07 GMT):
Is there a way to get user's affiliation in chaincode???

asadhayat (Mon, 16 Jul 2018 11:49:07 GMT):
Is there a way to get user's affiliation in chaincode??? @mastersingh24

dharuq (Mon, 16 Jul 2018 12:00:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MtMu4wqWNuqkxqkFK) @mastersingh24 thanks

andrew-coleman (Mon, 16 Jul 2018 12:07:03 GMT):
Has joined the channel.

johnlohith (Mon, 16 Jul 2018 12:33:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ms2AYe52mufSd9WCo) @dharuq yes. check this out .. https://fabric-shim.github.io/ChaincodeStub.html#invokeChaincode__anchor

dharuq (Mon, 16 Jul 2018 15:14:34 GMT):
thanks @johnlohith

dharuq (Mon, 16 Jul 2018 15:14:34 GMT):
thanks @johnlohith, You know if it is possible to user "getQueryResultForQueryString" with values that are ciphered using the encc library?

Russ.corsha (Mon, 16 Jul 2018 19:56:34 GMT):
Has joined the channel.

Russ.corsha (Mon, 16 Jul 2018 20:03:41 GMT):
Hey Guys, Im new to Chaincode dev using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call.

Russ.corsha (Mon, 16 Jul 2018 20:03:41 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call.

Russ.corsha (Mon, 16 Jul 2018 20:03:41 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call. Is this possible?

Russ.corsha (Mon, 16 Jul 2018 20:03:41 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call. Is this possible? ``` // The fabric user private key is saved to the following file: // /crypto-config/allorgs/omitted/@omitted/msp/keystore/_sk // The fabric user public key is saved to the following path: // /crypto-config/allorgs/omitted/@omitted/msp/signcerts/@omitted-cert.pem ```

Russ.corsha (Mon, 16 Jul 2018 20:03:41 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call. Is this possible? If its helpful, these paths are where invoke expects my keys: ``` // The fabric user private key is saved to the following file: // /crypto-config/allorgs/omitted/@omitted/msp/keystore/_sk // The fabric user public key is saved to the following path: // /crypto-config/allorgs/omitted/@omitted/msp/signcerts/@omitted-cert.pem ```

KaranBlockchain (Tue, 17 Jul 2018 09:02:58 GMT):
I am facing an issue while deploying my chaincode and running a Go command for cloning go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim # cd .; git clone https://github.com/hyperledger/fabric /home/ubuntu/go/src/github.com/hyperledger/fabric Cloning into '/home/ubuntu/go/src/github.com/hyperledger/fabric'... fatal: unable to access 'https://github.com/hyperledger/fabric/': Failed to connect to github.com port 443: Connection timed out package github.com/hyperledger/fabric/core/chaincode/shim: exit status 128 I am using an AWS virtual machine and I have checked all my inbound traffic. Request you guys to help on this. Regards, Karan

KaranBlockchain (Tue, 17 Jul 2018 09:02:58 GMT):
Hi All, I am facing an issue while deploying my chaincode and running a Go command for cloning go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim # cd .; git clone https://github.com/hyperledger/fabric /home/ubuntu/go/src/github.com/hyperledger/fabric Cloning into '/home/ubuntu/go/src/github.com/hyperledger/fabric'... fatal: unable to access 'https://github.com/hyperledger/fabric/': Failed to connect to github.com port 443: Connection timed out package github.com/hyperledger/fabric/core/chaincode/shim: exit status 128 I am using an AWS virtual machine and I have checked all my inbound traffic. Request you guys to help on this. Regards, Karan

ascatox (Tue, 17 Jul 2018 09:04:35 GMT):
Hi All! I've a question

ascatox (Tue, 17 Jul 2018 09:05:26 GMT):
Are there some API to interact with the blockchain missing in the Node version of Shim, respect to the Go version?

davidkel (Tue, 17 Jul 2018 09:42:16 GMT):
@ascatox do you think there is something missing in particular ?

ascatox (Tue, 17 Jul 2018 11:08:44 GMT):
No but I'd like to share experiences with the two differente techonologies

ascatox (Tue, 17 Jul 2018 11:08:44 GMT):
No, but I'd like to share experiences with the two differente technologies

ascatox (Tue, 17 Jul 2018 11:08:44 GMT):
No, but I'd like to share experiences with the two different technologies

davidkel (Tue, 17 Jul 2018 11:35:36 GMT):
@ascatox The capabilities in both Go and Node.js Chaincode should be the same.

davidkel (Tue, 17 Jul 2018 11:35:36 GMT):
@ascatox The capabilities in both Go and Node.js Chaincode should be the same from a fabric point of view (obviously each language lends itself to it's own unique capabilities)

ninedraft (Tue, 17 Jul 2018 13:00:47 GMT):
Has joined the channel.

ninedraft (Tue, 17 Jul 2018 13:13:46 GMT):
Hi All!

ninedraft (Tue, 17 Jul 2018 13:18:31 GMT):
I'm trying to run chaincode example from https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html, but chaincode always stops with error `Error starting Chaincode chaincode: error sending: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport```` I'm using `github.com/hyperledger/fabric` v1.2.0``` My current dev environment:`````` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8c675a287967 hyperledger/fabric-ccenv:1.2.0 "/bin/bash -c 'sleep…" 39 minutes ago Up 39 minutes chaincode 18ae2ecd03ac hyperledger/fabric-tools:1.2.0 "/bin/bash -c ./scri…" 39 minutes ago Up 39 minutes cli 5be4e4ea14ba hyperledger/fabric-peer:1.2.0 "peer node start --p…" 39 minutes ago Up 39 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 534b6501812c hyperledger/fabric-orderer:1.2.0 "orderer" 39 minutes ago Up 39 minutes 0.0.0.0:7050->7050/tcp orderer ``` `` ``` ``` startup command: ``` `CORE_PEER_ADDRESS=0.0.0.0:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./hypercontainer ` ``` ``` ``` ```

ninedraft (Tue, 17 Jul 2018 13:18:31 GMT):
I'm trying to run chaincode example from https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html, but chaincode always stops with error `Error starting Chaincode chaincode: error sending: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport```` I'm using `github.com/hyperledger/fabric` v1.2.0``` My current dev environment:`````` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8c675a287967 hyperledger/fabric-ccenv:1.2.0 "/bin/bash -c 'sleep…" 39 minutes ago Up 39 minutes chaincode 18ae2ecd03ac hyperledger/fabric-tools:1.2.0 "/bin/bash -c ./scri…" 39 minutes ago Up 39 minutes cli 5be4e4ea14ba hyperledger/fabric-peer:1.2.0 "peer node start --p…" 39 minutes ago Up 39 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 534b6501812c hyperledger/fabric-orderer:1.2.0 "orderer" 39 minutes ago Up 39 minutes 0.0.0.0:7050->7050/tcp orderer ``` `` ``` ``` startup command: ``` `CORE_PEER_ADDRESS=0.0.0.0:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./hypercontainer ` ```

ninedraft (Tue, 17 Jul 2018 13:18:31 GMT):
I'm trying to run chaincode example from https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html, but chaincode always stops with error `Error starting Chaincode chaincode: error sending: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport```` I'm using `github.com/hyperledger/fabric` v1.2.0``` My current dev environment:`````` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8c675a287967 hyperledger/fabric-ccenv:1.2.0 "/bin/bash -c 'sleep…" 39 minutes ago Up 39 minutes chaincode 18ae2ecd03ac hyperledger/fabric-tools:1.2.0 "/bin/bash -c ./scri…" 39 minutes ago Up 39 minutes cli 5be4e4ea14ba hyperledger/fabric-peer:1.2.0 "peer node start --p…" 39 minutes ago Up 39 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 534b6501812c hyperledger/fabric-orderer:1.2.0 "orderer" 39 minutes ago Up 39 minutes 0.0.0.0:7050->7050/tcp orderer ``` `` ``` ``` startup command: ``` `CORE_PEER_ADDRESS=0.0.0.0:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./hypercontainer `

ninedraft (Tue, 17 Jul 2018 13:18:31 GMT):
I'm trying to run chaincode example from https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html, but chaincode always stops with error `Error starting Chaincode chaincode: error sending: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport```` I'm using `github.com/hyperledger/fabric` v1.2.0``` My current dev environment:`````` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8c675a287967 hyperledger/fabric-ccenv:1.2.0 "/bin/bash -c 'sleep…" 39 minutes ago Up 39 minutes chaincode 18ae2ecd03ac hyperledger/fabric-tools:1.2.0 "/bin/bash -c ./scri…" 39 minutes ago Up 39 minutes cli 5be4e4ea14ba hyperledger/fabric-peer:1.2.0 "peer node start --p…" 39 minutes ago Up 39 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 534b6501812c hyperledger/fabric-orderer:1.2.0 "orderer" 39 minutes ago Up 39 minutes 0.0.0.0:7050->7050/tcp orderer` startup command: ``` `CORE_PEER_ADDRESS=0.0.0.0:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./hypercontainer `

ninedraft (Tue, 17 Jul 2018 13:21:45 GMT):
Has anyone encountered this error? If so, how did you manage to solve it? Are there any guesses about what I'm doing wrong?

yacovm (Tue, 17 Jul 2018 13:24:00 GMT):
https://stackoverflow.com/a/48020091/8211613

yacovm (Tue, 17 Jul 2018 13:24:06 GMT):
@ninedraft

ninedraft (Tue, 17 Jul 2018 13:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aPmRinu2AYJ3CKv6m) @yacovm @yacovm Thanks for help! The docker-compose-simple.yaml is invalid in 1.2.0 repo, the port 7052 is not provided

ninedraft (Tue, 17 Jul 2018 13:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aPmRinu2AYJ3CKv6m) @yacovm Thanks for help! The docker-compose-simple.yaml is invalid in 1.2.0 repo, the port 7052 is not provided

yacovm (Tue, 17 Jul 2018 14:10:12 GMT):
@joe-alewine @pandrejko ⬆️

pandrejko (Tue, 17 Jul 2018 14:10:12 GMT):
Has joined the channel.

ZackPhan (Tue, 17 Jul 2018 20:13:16 GMT):
Has joined the channel.

Ferrymania (Wed, 18 Jul 2018 01:30:01 GMT):
Has joined the channel.

Ferrymania (Wed, 18 Jul 2018 01:33:52 GMT):
Hi,guys! I have seen some chaincode examples,and when some of them define one assest,they use `ObjectType string `json:"docType"` //field for couchdb`, I don't know meaning of the filed and how to use it.

Legiit (Wed, 18 Jul 2018 07:38:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TaH4BEjYaNqtNvkq8) Thanks a ton - what's the equivalent of `go build` for node chaincode?

davidkel (Wed, 18 Jul 2018 07:41:19 GMT):
@Legiit use eslint. Drive it either through your editor, or as part of your unit test launcher that you should have for your code.

Legiit (Wed, 18 Jul 2018 07:43:29 GMT):
Hmm Thanks :P Can we also use babel to use ES6 in chaincode?

Legiit (Wed, 18 Jul 2018 07:43:29 GMT):
Hmm Thanks, I'll spin up a config and give it a try :P Can we also use babel to use ES6 in chaincode?

Legiit (Wed, 18 Jul 2018 07:43:38 GMT):
the ES5 syntax is terrible lawl @davidkel

Legiit (Wed, 18 Jul 2018 07:50:26 GMT):
And a last and final question - can we also pass other types of arguments besides and array? I've tried arraybuffers/json string but it doesn't seem to work The process of parsing objects to arrays in your backend and parsing it back to an object in the chaincode is quite cumbersome and not very maintainable when you'd like to extend your data model/object

davidkel (Wed, 18 Jul 2018 07:51:47 GMT):
@Legiit fabric currently uses node 8.9.4 so you can use ES6 + async/await

davidkel (Wed, 18 Jul 2018 07:51:47 GMT):
@Legiit fabric currently uses node 8.9.4 so you can use ES6 + async/await directly

Legiit (Wed, 18 Jul 2018 08:02:38 GMT):
I mean ES6 imports/exports, arrow functions etc :D & Any advice regarding the arguments? @davidkel Very much appreciated :)

davidkel (Wed, 18 Jul 2018 08:05:20 GMT):
@Legiit Whatever is supported by node 8.9.4 you can use. I don't believe you can do much else than invoke chaincode from client side with an array of strings for the arguments

Legiit (Wed, 18 Jul 2018 08:09:46 GMT):
Alright thanks ^^

riccardopersiani (Wed, 18 Jul 2018 08:56:40 GMT):
Has joined the channel.

riccardopersiani (Wed, 18 Jul 2018 08:56:56 GMT):
Hello, I have some problem with the function `registerChaincodeEvent()`. After using SetEvent() in my go chaincode, the event is not registered and the timeout runs out. Here is a link for more details on my problem: https://stackoverflow.com/questions/51363178/hyperledger-fabric-registerchaincodeevent-method-not-getting-the-event-from-ch. Thanks

davidkel (Wed, 18 Jul 2018 09:13:14 GMT):
@riccardopersiani events are only emitted when a block is committed to the chain. Looking at your SO entry implies that you don't submit the proposal to the ordering servicew

davidkel (Wed, 18 Jul 2018 09:13:14 GMT):
@riccardopersiani events are only emitted when a block is committed to the chain. Looking at your SO entry implies that you don't submit the proposal to the ordering service

riccardopersiani (Wed, 18 Jul 2018 09:16:30 GMT):
if I use `event_hub.registerBlockEvent()` the event is recorded as it shoul, if I launch the invoke.js; but this does not happen for custom events, if I use `registerChaincodeEvent()`. Really I cannot figure out what my problem is. Is there any working example of this function?

riccardopersiani (Wed, 18 Jul 2018 09:16:30 GMT):
if I use `event_hub.registerBlockEvent()` the event is recorded as it should, if I launch the invoke.js; but, this does not happen for custom events, if I use `registerChaincodeEvent()`. Really I cannot figure out what my problem is. Is there any working example of this function?

riccardopersiani (Wed, 18 Jul 2018 10:55:13 GMT):
Could anyone please help me with this one?

FlavioSS (Wed, 18 Jul 2018 10:55:38 GMT):
Has joined the channel.

mdvenkatesh (Wed, 18 Jul 2018 11:43:34 GMT):
how can i see the ledger database i tried hypledgerexplorer but i am getting some errors is there any alternate ways to see ledger database\

mdvenkatesh (Wed, 18 Jul 2018 11:44:06 GMT):
i have created an block chain application but i am unable to see the ledger database i can see only world database in couchdb how can i see the ledger database i tried hypledgerexplorer but i am getting some errors is there any alternate ways to see ledger database\

cryoventures (Wed, 18 Jul 2018 12:00:16 GMT):
Has joined the channel.

Hz (Thu, 19 Jul 2018 03:11:09 GMT):
Has joined the channel.

vietanh (Thu, 19 Jul 2018 09:13:40 GMT):
Has joined the channel.

SandeepPerugu (Thu, 19 Jul 2018 09:49:09 GMT):
Has joined the channel.

riccardopersiani (Thu, 19 Jul 2018 10:25:52 GMT):
Sorry for posting again the question; but I really need to know if someone was able to use successfully the function `registerChaincodeEvent()`. Is better to user a *ChannelEventHub* or just an *EventHub*? Here is a link for more details on my problem: https://stackoverflow.com/questions/51363178/hyperledger-fabric-registerchaincodeevent-method-not-getting-the-event-from-ch.

davidkel (Thu, 19 Jul 2018 11:35:31 GMT):
@riccardopersiani I would highly recommend moving away from EventHub and going to ChannelEventHub. Hyperledger composer deals with chaincode events. The client side code is here https://github.com/hyperledger/composer/blob/ee98244425d687026d25608a609451ad056d6093/packages/composer-connector-hlfv1/lib/hlfconnection.js#L272 The actual event emission is done by the composer runtime here https://github.com/hyperledger/composer/blob/ee98244425d687026d25608a609451ad056d6093/packages/composer-runtime-hlfv1/lib/nodeeventservice.js#L50 which is an example of node chaincode doing event emission, but should be easy to see the equivalent in golang

Rachit_gaur (Thu, 19 Jul 2018 12:04:16 GMT):
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response: payload:"\n X\242\350j\220\2708u\003Q\3710\032\276n_\3222\026\245\252m\301>\371]\337:\201\010A|\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: Can someone help me resolve this error?

giuseppegalano (Thu, 19 Jul 2018 12:40:00 GMT):
Has joined the channel.

ascatox (Thu, 19 Jul 2018 12:49:03 GMT):
Hi All! I'm trying to test my chaincode when I instantiate my chaincode, I got this error: ` Unknown desc = failed to init chaincode: handler not found for chaincode dcot-chaincode:2.0``

ascatox (Thu, 19 Jul 2018 12:49:22 GMT):
the install works properly

ascatox (Thu, 19 Jul 2018 12:49:22 GMT):
the install operation works properly

ascatox (Thu, 19 Jul 2018 12:49:22 GMT):
the install operation works properly.

ascatox (Thu, 19 Jul 2018 12:53:23 GMT):
The strangest part of this problem is that, uninstalling golang in the server where's HLF1.1 installed the problem disappears in magical way.

ascatox (Thu, 19 Jul 2018 12:53:23 GMT):
The strangest part of this problem is that, uninstalling **Go** in the server where's HLF1.1 installed the problem disappears in magical way.

ascatox (Thu, 19 Jul 2018 12:53:23 GMT):
The strangest part of this problem is that, uninstalling **Go** in the server where HLF1.1 is installed the problem disappears in magical way.

umadiraj (Thu, 19 Jul 2018 14:40:18 GMT):
Has joined the channel.

umadiraj (Thu, 19 Jul 2018 14:46:51 GMT):
One clarification regarding smart contracts in Fabric. Does fabric chaincode(smart contracts) executes in parallel ?

yacovm (Thu, 19 Jul 2018 15:33:01 GMT):
yes

mwenyan (Thu, 19 Jul 2018 16:38:19 GMT):
Has joined the channel.

Ferrymania (Fri, 20 Jul 2018 07:07:06 GMT):
Hi guys.I have modifyed the chaincode , and run the network again and reinstall the chaincode ,but the modifyed content didn't come into effect.But I use cli bash see where I install the chaincode ,its content indeed have been modifyed

riccardopersiani (Fri, 20 Jul 2018 08:03:57 GMT):
Hi guys, why anyone is pushing for developing solution with the Fabric Composer? Would not be better to implement solution via low level code? Is not that clear to me...

mavericklam (Fri, 20 Jul 2018 08:47:08 GMT):
hey guys, I am having a question when I try to use NodeJS chaincode. How to iterate the result returned in class StateQueryIterator?

mavericklam (Fri, 20 Jul 2018 08:47:28 GMT):
I can see any introduction in the documentation

mavericklam (Fri, 20 Jul 2018 08:47:30 GMT):
cant

mavericklam (Fri, 20 Jul 2018 08:47:51 GMT):
https://fabric-shim.github.io/StateQueryIterator.html

davidkel (Fri, 20 Jul 2018 08:54:33 GMT):
@mavericklam cut down example from the tests ``` async function getAllResults(iterator, getKeys) { let allResults = []; while (true) { let res = await iterator.next(); let theVal = (getKeys) ? res.value.key : res.value.value.toString('utf8'); allResults.push(theVal); if (res.done) { await iterator.close(); return allResults; } } } ```

mavericklam (Fri, 20 Jul 2018 08:59:10 GMT):
@davidkel thanks!!!! may I know if iterator.next() is async?

davidkel (Fri, 20 Jul 2018 08:59:38 GMT):
@mavericklam yes because you have to await on it

mavericklam (Fri, 20 Jul 2018 09:02:24 GMT):
@davidkel is there any indicator like hasNext() to stop the loop?

mavericklam (Fri, 20 Jul 2018 09:02:55 GMT):
or res.done can do the same trick?

davidkel (Fri, 20 Jul 2018 09:10:45 GMT):
@mavericklam No it doesn't have a hasNext call

mavericklam (Fri, 20 Jul 2018 09:25:01 GMT):
@davidkel I got an error of "TypeError: Cannot read property 'value' of undefined". is there anything wrong?

mavericklam (Fri, 20 Jul 2018 09:25:04 GMT):
this is my code

mavericklam (Fri, 20 Jul 2018 09:25:13 GMT):
try{ resultsIterator = await stub.getStateByPartialCompositeKey("time~transcId", [time]) } catch(err){ throw new Error(err) } while (true) { result = await resultsIterator.next(); console.log(result.value.value) let theVal = result.value.value.toString('utf8'); resultsArray.push(theVal); if (result.done) { await resultsIterator.close(); } }

jayeshjawale95 (Fri, 20 Jul 2018 09:42:11 GMT):
Hi guys, has this method getEventHubsForOrg been deprecated or removed, as i am trying to run balance transfer from fabric sample, it is thowing error:: [2018-07-20 13:30:13.776] [ERROR] Join-Channel - Failed to join all peers to channel. cause:TypeError: client.getEventHubsForOrg is not a function

jayeshjawale95 (Fri, 20 Jul 2018 10:04:43 GMT):
OK GOTIT, package dependency fabric client is broken, restored to previous version, worked fine

jayeshjawale95 (Fri, 20 Jul 2018 10:04:43 GMT):
OK GOTIT, package dependency fabric client is broken, switched to previous version, worked fine

davidkel (Fri, 20 Jul 2018 10:37:52 GMT):
@mavericklam the above example from the tests assumes there will always be 1 result. You may need to handle the situation where there are no results. plus in your example you will loop forever, nothing breaks out of the loop

mavericklam (Fri, 20 Jul 2018 10:39:38 GMT):
@davidkel got it got it, thanks!!!!!

akoenig (Fri, 20 Jul 2018 11:17:32 GMT):
Hi, is there a way to get all functions of a chaincode? E.g. in my ChainCode "foo" is a method "bar" with the inputs "xyz" and "zyx". Is there a way to get those infos? I need this to give the user some information about the existing methods of the chaincode which he maybe wants to use.

riccardopersiani (Fri, 20 Jul 2018 11:43:33 GMT):
Hello, i was able to check a custom event using `registerChaincodeEvent()`, but the problem is that the event returned does not have a payload(undefined). Anyone know how to get it? In the official documentation is written the following: "to see the event payload, the channel_event_hub must be connected(true)", but actually my channel event hub is connected to true with the `eh.connect()` after the `event_monitor`.

umadiraj (Fri, 20 Jul 2018 15:11:39 GMT):
Hi, if there is an infinite loop in a chaincode (runaway execution) is it possible in fabric to stop such chaincodes?

am (Fri, 20 Jul 2018 16:58:28 GMT):
Has joined the channel.

httran88 (Fri, 20 Jul 2018 18:56:51 GMT):
Has joined the channel.

httran88 (Fri, 20 Jul 2018 18:59:32 GMT):
Hello All, I am having some weird issues, sometimes it happens and sometimes it doesn't. I use a script to docker compose down, then clean and up again to restart my network. I use CLI tool to create/join peers to channel then chaincode container to install/instantiate a peer at the end of the restart. Sometimes my chaincode gets to init and somehow the connection to peer/orderer is disconnected and the chaincode container ends up in "Exited" status. Does someone know what may be causing this? I am not using chaincode dev mode: ```2018-07-20 18:31:02.492 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode (build level: 1.1.0) starting up ... 2018-07-20 18:31:02.492 UTC [bccsp] initBCCSP -> DEBU 002 Initialize BCCSP [SW] 2018-07-20 18:31:02.492 UTC [shim] userChaincodeStreamGetter -> DEBU 003 Peer address: peer0.org1.example.com:7052 2018-07-20 18:31:02.494 UTC [shim] userChaincodeStreamGetter -> DEBU 004 os.Args returns: [chaincode -peer.address=peer0.org1.example.com:7052] 2018-07-20 18:31:02.494 UTC [shim] chatWithPeer -> DEBU 005 Registering.. sending REGISTER 2018-07-20 18:31:02.495 UTC [shim] func1 -> DEBU 006 []Received message REGISTERED from shim 2018-07-20 18:31:02.495 UTC [shim] handleMessage -> DEBU 007 []Handling ChaincodeMessage of type: REGISTERED(state:created) 2018-07-20 18:31:02.496 UTC [shim] beforeRegistered -> DEBU 008 Received REGISTERED, ready for invocations 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 009 [6c9b680c]Received message READY from shim 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 00a [6c9b680c]Handling ChaincodeMessage of type: READY(state:established) 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 00b [6c9b680c]Received message INIT from shim 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 00c [6c9b680c]Handling ChaincodeMessage of type: INIT(state:ready) 2018-07-20 18:31:02.496 UTC [shim] beforeInit -> DEBU 00d Entered state ready 2018-07-20 18:31:02.496 UTC [shim] beforeInit -> DEBU 00e [6c9b680c]Received INIT, initializing chaincode 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 00f [6c9b680c]Init get response status: 200 ex02 Init 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 010 [6c9b680c]Init succeeded. Sending COMPLETED 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 011 [6c9b680c]Move state message COMPLETED 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 012 [6c9b680c]Handling ChaincodeMessage of type: COMPLETED(state:ready) 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 013 [6c9b680c]send state message COMPLETED 2018-07-20 18:31:26.574 UTC [grpc] Printf -> DEBU 014 transport: http2Client.notifyError got notified that the client transport was broken EOF. 2018-07-20 18:31:26.574 UTC [shim] func1 -> ERRO 015 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing```

httran88 (Fri, 20 Jul 2018 18:59:32 GMT):
Hello All, I am having some weird issues, sometimes it happens and sometimes it doesn't. I use a script to docker compose down, then clean and up again to restart my network. I use CLI tool to create/join peers to channel then chaincode container to install/instantiate a peer at the end of the restart. Sometimes my chaincode gets to init and somehow the connection to peer/orderer is disconnected and the chaincode container ends up in "Exited" status. Does someone know what may be causing this? I am not using chaincode dev mode: ```2018-07-20 18:31:02.492 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode (build level: 1.1.0) starting up ... 2018-07-20 18:31:02.492 UTC [bccsp] initBCCSP -> DEBU 002 Initialize BCCSP [SW] 2018-07-20 18:31:02.492 UTC [shim] userChaincodeStreamGetter -> DEBU 003 Peer address: peer0.org1.example.com:7052 2018-07-20 18:31:02.494 UTC [shim] userChaincodeStreamGetter -> DEBU 004 os.Args returns: [chaincode -peer.address=peer0.org1.example.com:7052] 2018-07-20 18:31:02.494 UTC [shim] chatWithPeer -> DEBU 005 Registering.. sending REGISTER 2018-07-20 18:31:02.495 UTC [shim] func1 -> DEBU 006 []Received message REGISTERED from shim 2018-07-20 18:31:02.495 UTC [shim] handleMessage -> DEBU 007 []Handling ChaincodeMessage of type: REGISTERED(state:created) 2018-07-20 18:31:02.496 UTC [shim] beforeRegistered -> DEBU 008 Received REGISTERED, ready for invocations 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 009 [6c9b680c]Received message READY from shim 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 00a [6c9b680c]Handling ChaincodeMessage of type: READY(state:established) 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 00b [6c9b680c]Received message INIT from shim 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 00c [6c9b680c]Handling ChaincodeMessage of type: INIT(state:ready) 2018-07-20 18:31:02.496 UTC [shim] beforeInit -> DEBU 00d Entered state ready 2018-07-20 18:31:02.496 UTC [shim] beforeInit -> DEBU 00e [6c9b680c]Received INIT, initializing chaincode 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 00f [6c9b680c]Init get response status: 200 ex02 Init 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 010 [6c9b680c]Init succeeded. Sending COMPLETED 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 011 [6c9b680c]Move state message COMPLETED 2018-07-20 18:31:02.496 UTC [shim] handleMessage -> DEBU 012 [6c9b680c]Handling ChaincodeMessage of type: COMPLETED(state:ready) 2018-07-20 18:31:02.496 UTC [shim] func1 -> DEBU 013 [6c9b680c]send state message COMPLETED 2018-07-20 18:31:26.574 UTC [grpc] Printf -> DEBU 014 transport: http2Client.notifyError got notified that the client transport was broken EOF. 2018-07-20 18:31:26.574 UTC [shim] func1 -> ERRO 015 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing``` Thank you for help

junewalk2 (Sat, 21 Jul 2018 02:46:41 GMT):
Has joined the channel.

mavericklam (Mon, 23 Jul 2018 05:43:06 GMT):
Hi all, I have a problem when I running nodeJS chaincode in the example balance transfer. When I try to call stub.getQueryResult(), it pops error of "ExecuteQuery not supported for leveldb"

mavericklam (Mon, 23 Jul 2018 05:43:10 GMT):
can clue?

mavericklam (Mon, 23 Jul 2018 05:43:13 GMT):
any clue?

mavericklam (Mon, 23 Jul 2018 06:14:38 GMT):
looks like need to switch to CouchDB instead... thanks

arash_sr7 (Mon, 23 Jul 2018 09:42:04 GMT):
Has joined the channel.

anzalbeg (Mon, 23 Jul 2018 10:46:39 GMT):
Has joined the channel.

anzalbeg (Mon, 23 Jul 2018 10:48:01 GMT):
Hello everyone, Can anyone help? I am getting the issue "[[69b0d0ec PUT_STATE ERROR]]No ledger context for %!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING)" while instantiating the chaincode using cli container

sm1972 (Mon, 23 Jul 2018 13:36:38 GMT):
Has joined the channel.

hamptonsmith (Mon, 23 Jul 2018 14:31:54 GMT):
I added a history query to my chaincode. Unit tests pass locally. Attempting to instantiate the code, I see: ``` chaincode/input/src/wagoncc/cc.go:993:38: cannot use entry (type *"github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification) as type *"wagoncc/vendor/github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification in argument to marshalHistoryEntry ``` Problem is, there's nothing vendored in my code: ``` $ find $GOPATH -name *vendor* /* this space blank */ $ ``` Nor do there appear to be any hidden cache directories: ``` $ find $GOPATH -name '.*' /* this space blank */ $ ``` My current assumption is that some previously-vendored version of this code is hanging around in a cache somewhere in the network itself, but I've totally torn down the network (while keeping the servers in place--they are very much pets and not cattle at this point), done my best to obliterate all state, ensured that `docker containers ls -a`, `docker image ls -a`, and `docker volume ls` all return nothing (including on my local machine where I run the CLI image), then brought everything up _de novo_, but I still see the issue. I've run out of ideas. Any thoughts on sneaky places I can check or better ways to debug this issue?

hamptonsmith (Mon, 23 Jul 2018 14:47:28 GMT):
Note that I _have_ "in-line vendored" the library in question: ``` $ find $GOPATH -path */queryresult /opt/gopath/src/github.com/hyperledger/fabric/protos/ledger/queryresult ``` But without this, I see errors during chaincode installation: ``` $ peer chaincode install ...snip... can't load package: package github.com/hyperledger/fabric/protos/ledger/queryresult: cannot find package "github.com/hyperledger/fabric/protos/ledger/queryresult" in any of: /opt/go/src/github.com/hyperledger/fabric/protos/ledger/queryresult (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/protos/ledger/queryresult (from $GOPATH) ```

iamksseo (Tue, 24 Jul 2018 01:56:10 GMT):
Has joined the channel.

MeghaGupta (Tue, 24 Jul 2018 08:22:42 GMT):
Hi need help ... I want to get full block information with transaction based on asset id. How I can achieve it

MeghaGupta (Tue, 24 Jul 2018 08:23:33 GMT):
I know from shim api I can get state by asset id but this gives world state data ,I need blockchain data

MeghaGupta (Tue, 24 Jul 2018 08:23:44 GMT):
How I can get that

MeghaGupta (Tue, 24 Jul 2018 08:23:48 GMT):
Please help

fabiomolinar (Tue, 24 Jul 2018 15:04:24 GMT):
Has joined the channel.

jakereps (Tue, 24 Jul 2018 22:45:55 GMT):
Has joined the channel.

labcoinpoc (Wed, 25 Jul 2018 02:06:06 GMT):
Has joined the channel.

rajanashutosh (Wed, 25 Jul 2018 05:04:15 GMT):
Has joined the channel.

rajanashutosh (Wed, 25 Jul 2018 05:05:06 GMT):
Hi All, Is der a way to install chaincodes in all the peers together in a multi-host VM environment running on docker swarm environment ?

Varun2887 (Wed, 25 Jul 2018 05:33:50 GMT):
@rajanashutosh is there any tutorial to host peers on multiple host, i am struggling to host it...

rajanashutosh (Wed, 25 Jul 2018 05:54:09 GMT):
@Varun2887 Its simple, first go to docker tutorials and set up multiclustered environment. Then once joined the cluster then use docker stack deploy --compose-file networkname (Should be configured in your compose.yml as well)

rajanashutosh (Wed, 25 Jul 2018 05:54:16 GMT):
You can refer https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f

rajanashutosh (Wed, 25 Jul 2018 05:55:00 GMT):
Clustered env.. use docker swarm, as i found kubernetes config bit complicated.

Varun2887 (Wed, 25 Jul 2018 06:01:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3wsrimocimPs8WxgK) @rajanashutosh so true

kariyappals (Wed, 25 Jul 2018 07:47:22 GMT):
Has joined the channel.

SadhviNayak (Wed, 25 Jul 2018 10:45:20 GMT):
Has joined the channel.

gen_el (Wed, 25 Jul 2018 11:38:37 GMT):
I am having issues deploying a chain code we built that calls grpc services. The vendored grpc packages seems to be the problem as `GenerateDockerBuild` leg during chain code instantiation fails.

sm1972 (Wed, 25 Jul 2018 13:27:25 GMT):
Hi all - I am having issues packaging a javascript chaincode file, in the cli bash I have entered: peer chaincode package -n chaincode -l js -p home/scott/Desktop/chaincode.js -v 0.0.1 ccpack.out and the error I receive is 'Error: error getting chaincode code chaincode: failed to determine platform type: Unknown chaincodeType: UNDEFINED'

l1nux (Wed, 25 Jul 2018 18:05:53 GMT):
In fabric is there a way to see all failed transactions? Also how to resubmit a failed transaction? Is there any sample codes showing how to send transaction, catch failed transaction then resubmit?

krishnamvv (Thu, 26 Jul 2018 02:56:44 GMT):
Has joined the channel.

steynsawan (Thu, 26 Jul 2018 07:09:32 GMT):
Has joined the channel.

mostafa.elsayyad (Thu, 26 Jul 2018 07:31:23 GMT):
Hello guys, If I update in chaincode which reflects in ledger .. does it erases all existing data like the composer does?

mostafa.elsayyad (Thu, 26 Jul 2018 07:31:26 GMT):
thanks in advance

sm1972 (Thu, 26 Jul 2018 14:14:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Zq8DoWPzcQYYbG5nR) ..so, for language (-l arg) you just put in -l node that sorted that error, having issues with the path to the file, however, I think its a case of moving the file to the gopath/src directory...

nhrishi (Fri, 27 Jul 2018 05:46:01 GMT):
private

nhrishi (Fri, 27 Jul 2018 11:16:08 GMT):
Hi, I have a quick question, in chaincode instantiation, we need to pass a POLICY and with private collection, we can also pass a policy at collection level in JSON. Does the policy in collection JSON overrides a Policy passed to the command ? OR is there any way to make policy at command level optional ?

nhrishi (Fri, 27 Jul 2018 11:16:08 GMT):
Hi, I have a quick question, in chaincode instantiation, we need to pass a POLICY in the command and with private collection, we can also pass a policy at collection level in JSON. Does the policy in collection JSON overrides a Policy passed to the command ? OR is there any way to make policy at command level optional ?

nhrishi (Fri, 27 Jul 2018 11:16:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fMf8bJpHNxBzMg7yt) @dave.enyeart Thanks Dave, Got it. I have few more questions for clarification. Sorry some might be dump questions but just want to be clear - 1. At a chaincode level, we can only have one endorsement policy. Currently, I have to instantiate a different chaincodes for different endorsement policies and respective distribution policies which results in different namespaces and have to query explicitly from different chaincodes to collect all the data. Is it possible to have an ability to define a unique endorsement policy for a given distribution policy or policies? Is this something we’re planning to address in ownable state enhancement? 2. Can an organization X have a same collection name (distribution policy name) in two different distribution policies (collections) for two different organizations so org X can query private shared data with 2 diff organization from the same collection? 3. Can we have an organization in the endorsement policy that’s not in any of distribution policy in collection JSON? 4. Are we looking to add a querying capability to query across collections for a given chaincode ? I thought we were planning to have it in current v1.2 version. 5. Are we looking to add a querying capability to query across collections and across chaincodes for a given channel?

dave.enyeart (Fri, 27 Jul 2018 11:58:43 GMT):
@nhrishi The policies are different... the endorsement policy on the chaincode instantiation defines who must endorse each transaction. The distribution policy in the collection JSON defines who the private data gets distributed to. For example the endorsement policy may be any three orgs, while the distribution policy for a particular collection may be four specific orgs. A different collection within the same chaincode may be different set of four orgs.

rajanashutosh (Mon, 30 Jul 2018 05:25:24 GMT):
When we insert JSON data using chaincode its being saved as plain-text. I entered manually the Couch-db container and viewed it whether this is normal or any issues with my configuration.

akoenig (Mon, 30 Jul 2018 07:24:23 GMT):
Hi, is there a way to get all functions of a chaincode? E.g. in my ChainCode "foo" is a method "bar" with the inputs "xyz" and "zyx". Is there a way to get those infos? I need this to give the user some information about the existing methods of the chaincode which he maybe wants to use.

VinayChaudharyOfficial (Mon, 30 Jul 2018 10:13:24 GMT):
Can anyone help me on the mentioned error ..... [orderer/multichain] newLedgerResources -> CRIT 066 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

muralisr (Mon, 30 Jul 2018 12:50:20 GMT):
@VinayChaudharyOfficial please check in #fabric-orderer ... but I think you might be using mismatched configtx.yaml / fabric release (e.g., configtx.yaml from 1.1 with fabric 1.2)

muralisr (Mon, 30 Jul 2018 12:52:03 GMT):
@akoenig there is no "function" discovery ... you could simpy add one for your chaincode as a special query api perhaps ?

bestbeforetoday (Mon, 30 Jul 2018 12:52:38 GMT):
Has joined the channel.

satyajitdeshmukh (Mon, 30 Jul 2018 14:53:49 GMT):
Has joined the channel.

albert.lacambra (Mon, 30 Jul 2018 19:20:37 GMT):
One question about js shim

albert.lacambra (Mon, 30 Jul 2018 19:20:49 GMT):
I am not an really good at js

albert.lacambra (Mon, 30 Jul 2018 19:20:53 GMT):
async function getAllResults(iterator, getKeys) { let allResults = []; while (true) { let res = await iterator.next(); if (res.value.namespace) console.log(res.value.namespace); if (res.value.key) console.log(res.value.key); if (res.value.tx_id) console.log(res.value.tx_id); if (res.value.channel_id) console.log(res.value.channel_id); if (res.value.timestamp) console.log(res.value.timestamp); if (res.value.is_delete) console.log(res.value.is_delete); let theVal = (getKeys) ? res.value.key : res.value.value.toString('utf8'); allResults.push(theVal); console.log(theVal); if (res.done) { console.log('end of data'); await iterator.close(); return allResults; } } }

albert.lacambra (Mon, 30 Jul 2018 19:20:53 GMT):
async function getAllResults(iterator, getKeys) { let allResults = []; while (true) { let res = await iterator.next(); .... let theVal = (getKeys) ? res.value.key : res.value.value.toString('utf8'); allResults.push(theVal); console.log(theVal); if (res.done) { console.log('end of data'); await iterator.close(); return allResults; } } }

albert.lacambra (Mon, 30 Jul 2018 19:21:44 GMT):
is this code non blocking with a while true?

albert.lacambra (Mon, 30 Jul 2018 19:22:28 GMT):
is not looping until res is done?

kesavants (Tue, 31 Jul 2018 02:55:51 GMT):
Has joined the channel.

kesavants (Tue, 31 Jul 2018 02:57:40 GMT):
Any one knows how to unmarshall ccprovider.ChaincodeData InstantiationPolicy byte[] to struct I want see the instatitaionPolicy of the chain code

Legiit (Tue, 31 Jul 2018 05:59:37 GMT):
Hey, does anyone know how to mock the stub in chaincode? I am trying to test my code with Jest (Node Chaincode)

davidkel (Tue, 31 Jul 2018 06:08:38 GMT):
@Legiit Sinon is a popular mocking library https://sinonjs.org/

akoenig (Tue, 31 Jul 2018 07:07:27 GMT):
@muralisr what do you mean with "special query api"? My idea was maybe to use swagger in golang

Legiit (Tue, 31 Jul 2018 07:10:04 GMT):
how would one, for example mock fabric-stub for a `stub.getQueryResult(queryString)`?

Legiit (Tue, 31 Jul 2018 07:10:04 GMT):
how would one, for example mock fabric-stub for a `stub.getQueryResult(queryString)`? @davidkel

nhrishi (Tue, 31 Jul 2018 07:16:01 GMT):
Hi, I'm using v1.2 and getting below error in the chaincode - when a chaincode is invoking another chaincode - Error "Transaction has already performed queries on pvt data. Writes are not allowed". Both chaincodes have same endorsement and distribution policies.

nhrishi (Tue, 31 Jul 2018 07:16:01 GMT):
Hi, I'm using v1.2 and getting below error in the chaincode - when a chaincode is invoking another chaincode - Error "Transaction has already performed queries on pvt data. Writes are not allowed". Both chaincodes have same endorsement and distribution policies. Can someone please helo.

nhrishi (Tue, 31 Jul 2018 07:16:01 GMT):
Hi, I'm using v1.2 and getting below error in the chaincode - when a chaincode is invoking another chaincode - Error "Transaction has already performed queries on pvt data. Writes are not allowed". Both chaincodes have same endorsement and distribution policies. Can someone please help. Thanks.

jayeshjawale95 (Tue, 31 Jul 2018 07:19:45 GMT):
Hi, getting this error in chaincode container ssl_transport_security.cc:238] Could not get common name of subject from certificate.

davidkel (Tue, 31 Jul 2018 07:26:55 GMT):
@Legiit ``` mockStub = sinon.createStubInstance(ChaincodeStub); mockIterator = sinon.createStubInstance(StateQueryIterator); mockStub.getQueryResult.resolves(mockIterator); mockIterator.next.resolves(/*sample data in appropriate format*/); ... ```

ragpach2 (Tue, 31 Jul 2018 09:57:17 GMT):
Has joined the channel.

Aejnor (Tue, 31 Jul 2018 10:51:46 GMT):
Has joined the channel.

jg507 (Tue, 31 Jul 2018 20:51:13 GMT):
Has joined the channel.

Legiit (Wed, 01 Aug 2018 07:34:58 GMT):
Is there a full example somewhere? I am completely unknown with testing :sweat_smile: In the small snippet, there's no direction where you call the actual code to test @davidkel

Legiit (Wed, 01 Aug 2018 07:34:58 GMT):
Is there a full example somewhere? I am completely unknown with testing :sweat_smile: In the small snippet, there's no direction where you call the actual code to test & where I would have my query string @davidkel

Legiit (Wed, 01 Aug 2018 07:36:02 GMT):
The "problem" I am having is what data to pass and what to expect, as I think, when you stub/mock it, you're basically not using the actual object, so It's no way possible that you get the filtered data back, right?

Legiit (Wed, 01 Aug 2018 07:36:02 GMT):
The "problem" I am having is what data to pass and what to expect, as I think, when you stub/mock it, you're basically not using the actual object, so It's no way possible that you get the filtered data back, right?

Legiit (Wed, 01 Aug 2018 07:36:02 GMT):
The "problem" I am having is what data to pass and what to expect, as I think, when you stub/mock it, you're basically not using the actual object, so It's no way possible that you get the filtered data back, right? and `ChaincodeStub ` & `StateQueryIterator` are these from fabric-shim itself? When I import these I get `Cannot find module './build/Release/x509' from 'index.js'` in `jest-resolve`

davidkel (Wed, 01 Aug 2018 08:08:24 GMT):
@Legiit A StateQueryIterator returns the followng ``` {done: boolean, value: KV } ``` where KV is defined in the protobuf definitions for a query result. That protobuf has the following definition ``` message KV { string namespace = 1; string key = 2; bytes value = 3; } ``` which would be converted to node by grpc as ``` { ```

davidkel (Wed, 01 Aug 2018 08:08:24 GMT):
@Legiit A StateQueryIterator returns the followng ``` {done: boolean, value: KV } ``` where KV is defined in the protobuf definitions for a query result. That protobuf has the following definition ``` message KV { string namespace = 1; string key = 2; bytes value = 3; } ``` which would be converted to node by grpc as ``` { namespace: string, key: string, value: Buffer } ``` Buffer is a node object which has methods to extract the data as you wish

davidkel (Wed, 01 Aug 2018 08:08:24 GMT):
@Legiit A StateQueryIterator returns the following (which is a standard iterator structure) ``` { done: boolean, value: KV } ``` done indicates whether the iterator has completed (ie if set to true there is no more data) where KV is defined in the protobuf definitions for a query result. That protobuf has the following definition ``` message KV { string namespace = 1; string key = 2; bytes value = 3; } ``` which would be converted to node by grpc as ``` { namespace: string, key: string, value: Buffer } ``` Buffer is a node object which has methods to extract the data as you wish

davidkel (Wed, 01 Aug 2018 08:08:24 GMT):
@Legiit A StateQueryIterator returns the following (which is a standard iterator structure) ``` { done: boolean, value: KV } ``` done indicates whether the iterator has completed (ie if set to true there is no more data, so no point calling next again) where KV is defined in the protobuf definitions for a query result. That protobuf has the following definition ``` message KV { string namespace = 1; string key = 2; bytes value = 3; } ``` which would be converted to node by grpc as ``` { namespace: string, key: string, value: Buffer } ``` Buffer is a node object which has methods to extract the data as you wish

davidkel (Wed, 01 Aug 2018 08:22:00 GMT):
you should be able to import as follows ``` const {Stub, StateQueryIterator} = require('fabric-shim/lib/stub'); ``` (note the change of name from ChaincodeStub to Stub as the example I gave above used a different way to import and gave it a different name)

nhrishi (Wed, 01 Aug 2018 08:45:35 GMT):
Hi, I am experimenting on v1.2 version. I just observed GetTransient function returns map[string][]uint8 instead of map[string][]byte as per specification. Can anyone pls advise.

Rachit_gaur (Wed, 01 Aug 2018 09:03:40 GMT):
How to create a new user using fabric sdk for node?

VinayChaudharyOfficial (Wed, 01 Aug 2018 09:14:16 GMT):
@muralisr thank a lot ... can you pls give your suggestion on error as ....................... a_peerNsp1 | Error: Failed to find private key for certificate in '/etc/hyperledger/fabric-ca-server-config/ca.nsp1.orh.in-cert.pem': Could not find matching private key for SKI: Failed getting key for SKI [[19 183 185 215 150 209 173 189 141 211 33 75 11 34 106 63 95 245 80 175 29 192 167 149 238 113 87 25 84 178 116 179]]: Key with SKI 13b7b9d796d1adbd8dd3214b0b226a3f5ff550af1dc0a795ee71571954b274b3 not found in /etc/hyperledger/fabric-ca-server - FABRIC_CA_SERVER_CA_NAME=ca-nsp1/msp/keystore couchdb2 | [notice] 2018-08-01T14:27:26.753716Z nonode@nohost <0.335.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:403) <= mem3_shards:load_shards_from_disk/1(line:378) <= mem3_shards:load_shards_from_disk/2(line:407) <= mem3_shards:for_docid/3(line:91) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134) couchdb2 | [error] 2018-08-01T14:27:26.753921Z nonode@nohost emulator -------- Error in process <0.473.0> with exit value: couchdb2 | {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{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}]}]}

AbhinandanDarbey (Wed, 01 Aug 2018 09:27:53 GMT):
Has joined the channel.

AbhinandanDarbey (Wed, 01 Aug 2018 09:34:21 GMT):
Can anyone help me with chaincode calling another chaincode?

AbhinandanDarbey (Wed, 01 Aug 2018 09:37:46 GMT):
Can anyone help me with chaincode calling another chaincode? I have a network of 3 orgs and two channels. channelone: org1,org2, chaincode- fabcar channeltwo: org1,org3, chaincode- fabphone I want to query chaincode- fabphone using fabcar.

nhrishi (Wed, 01 Aug 2018 10:26:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TdNQT2mq4pDjbLPgx) @AbhinandanDarbey Hi Abhinandan, you need to use stub.InvokeChaincode in chaincode with appropriate parameters. here is a definition for it- https://gowalker.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub

nhrishi (Wed, 01 Aug 2018 12:30:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Yb2cXZ3wZYGnmRPxp) @dave.enyeart @muralisr Could you please advise on this. I'm getting this error in the chaincode.

dave.enyeart (Wed, 01 Aug 2018 12:32:08 GMT):
@nhrishi See the documented limitations here: http://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#querying-private-data

dave.enyeart (Wed, 01 Aug 2018 12:32:08 GMT):
@nhrishi See the documented limitations here: `http://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#querying-private-data`

dave.enyeart (Wed, 01 Aug 2018 12:32:12 GMT):
second bullet

riccardopersiani (Wed, 01 Aug 2018 15:58:48 GMT):
hi, how is possible to import a dependance from Github to the chaincode in Node? Should be done in the `package.json`?

jrosmith (Wed, 01 Aug 2018 16:39:24 GMT):
@riccardopersiani if youre using nodejs, yes. npm can reference specific github repos

walmon (Wed, 01 Aug 2018 22:15:02 GMT):
Hello everybody! We are leading an open source project to build javascript fullstack smart contract systems. If you want to check it out you can read more here: https://medium.com/worldsibu/writing-smart-contracts-using-convector-a-fullstack-typescript-framework-e089da0f4ee1

huy.nguyen (Thu, 02 Aug 2018 03:32:36 GMT):
Has joined the channel.

rajanashutosh (Thu, 02 Aug 2018 04:10:24 GMT):
Hello everyone, Currently when we are saving the json data into underlying db its getting stored in the form or plain text. Please let me know if in case der is any private and public key encryption mechanism available to encrypt so that only relying parties can view the transaction as an when required even though it gets replicated to other Orgs as well ?

rajanashutosh (Thu, 02 Aug 2018 04:59:06 GMT):
Hi All, Is there any news or alternatives to the below proposal made? https://jira.hyperledger.org/browse/FAB-5131

nhrishi (Thu, 02 Aug 2018 07:13:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Hzge3fmfyPaZ2MDm7) @dave.enyeart Thanks @dave.enyeart It worked.Are we looking to address this limitation in the next release (v1.3) ?

Legiit (Thu, 02 Aug 2018 07:25:07 GMT):
Thanks @davidkel, I'll give it a shot! will report back ^^

GowriR (Thu, 02 Aug 2018 07:48:39 GMT):
Has joined the channel.

GowriR (Thu, 02 Aug 2018 07:56:04 GMT):
Hi all, do you know how to set CORE_VM_DOCKER_ATTACHSTDOUT or CORE_CHAINCODE_LOGGING_LEVEL=info? The peer tries to get the fabric--ccenv container up and the container gets deleted immediately. I want to increase the log level to see more messages

GowriR (Thu, 02 Aug 2018 08:01:35 GMT):
Hi all, I am trying to write my own chaincode from a sample code (I copied the entire folder - including the vendor folder). I am new to go. When i run chaincode instantiate from nodejs code - I can see the fabric-ccenv containers getting created and getting deleted almost immediately. Any help in this regard would be great

dave.enyeart (Thu, 02 Aug 2018 10:51:38 GMT):
@nhrishi No, we can't allow it since non-members by design don't have the private data and therefore can't validate query result sets against private data.

kryp70 (Thu, 02 Aug 2018 12:55:34 GMT):
Has joined the channel.

mhomaid (Thu, 02 Aug 2018 14:23:47 GMT):
Has joined the channel.

nhrishi (Thu, 02 Aug 2018 16:04:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=XxXmbKi4kRMh3HBaN) @dave.enyeart Ok sure. I have few more questions. Would send an email on mailing group later. Thanks Dave.

sarah (Thu, 02 Aug 2018 18:02:41 GMT):
Has joined the channel.

sarah (Thu, 02 Aug 2018 18:33:06 GMT):
Hey everyone, I've been facing an error while using the `InstantiateCC` method provided by the `fabric-sdk-go/pkg/client/resmgmt` package (https://github.com/hyperledger/fabric-sdk-go/blob/55ab46a8c2a69288dda370dd335a85a300d15aa5/pkg/client/resmgmt/resmgmt.go#L121:6) and am hoping to get some help. I have two orgs (Org0, Org1), each with two peers (peer0, peer1) who have joined a common channel and I've installed the same cc onto all 4 peers. The description for `InstantiateCC` states that instantiation will happen for *all* peers in the channel. In reality, instantiation only happens for the peers belonging to the org whose context is calling `InstantiateCC`. The dev containers for those 2 peers are launched fine and I'm able to invoke methods through any peer on that one org. I then try to instantiate through the client context for the other org, but the peers believe the chaincode has already been launched on the channel (which is has, but not for the peers of this org), so an error is thrown (`Chaincode status Code: (500) UNKNOWN. Description: chaincode with name 'exchangeCC' already exists`). Has anyone successfully made a similar scenario happen or have any ideas how to solve this?

yacovm (Thu, 02 Aug 2018 18:47:53 GMT):
@sarah you're misinterpreting the situation

yacovm (Thu, 02 Aug 2018 18:48:09 GMT):
you only need to instantiate *once* a chaincode for a given channel

yacovm (Thu, 02 Aug 2018 18:48:32 GMT):
what an instantiate does, is simply create a binding between the chaincode that is installed, to the channel

yacovm (Thu, 02 Aug 2018 18:49:24 GMT):
> chaincode with name 'exchangeCC' already exists tells you that you already instantiated the chaincode on the channel

sarah (Thu, 02 Aug 2018 18:54:58 GMT):
yes, I agree that I should only have to instantiate *once* per chaincode on a given channel. But, although all 4 peers have joined the channel, only 2 of them (those belonging to the org whose client context is calling `InstantiateCC`) actually have the `fabric-ccenv` launched and then `dev-peer...chaincodename:version` created. So the other two peers don't have a container with instantiated chaincode.

sarah (Thu, 02 Aug 2018 18:56:19 GMT):
so when I try to invoke any methods through peers of the org who I didn't use to call `InstantiateCC`, it fails to find any peers because that peer doesn't have chaincode instantiated for it

sarah (Thu, 02 Aug 2018 18:56:19 GMT):
so when I try to invoke any methods through peers of the org who I didn't use to call `InstantiateCC`, it fails to find any peers because those peers don't have chaincode instantiated for them.

sarah (Thu, 02 Aug 2018 18:57:58 GMT):
i.e. I have a client context for org0, I use that client context to call InstantiateCC, and containers launch for dev-peer0.org... and dev-0peer1.org0... but nothing launches for org1. The logs for those peers say that chaincode has already been launched.

sarah (Thu, 02 Aug 2018 18:57:58 GMT):
i.e. I have a client context for org0, I use that client context to call InstantiateCC, and containers launch for dev-peer0.org... and dev-peer1.org0... but nothing launches for org1. The logs for those peers say that chaincode has already been launched.

sarah (Thu, 02 Aug 2018 18:57:58 GMT):
i.e. I have a client context for org0, I use that client context to call InstantiateCC, and containers launch for dev-peer0.org0... and dev-peer1.org0... but nothing launches for org1. The logs for those peers say that chaincode has already been launched.

yacovm (Thu, 02 Aug 2018 19:01:30 GMT):
> so when I try to invoke any methods through peers of the org who I didn't use to call `InstantiateCC`, it fails to find any peers because those peers don't have chaincode instantiated for them. how do you know that's the reason?

yacovm (Thu, 02 Aug 2018 19:01:52 GMT):
> i.e. I have a client context for org0, I use that client context to call InstantiateCC, and containers launch for dev-peer0.org0... and dev-peer1.org0... but nothing launches for org1 chaincode launches upon demand....

yacovm (Thu, 02 Aug 2018 19:02:01 GMT):
on a peer that is invoked

yacovm (Thu, 02 Aug 2018 19:02:12 GMT):
not on all the network because you instantiated

sarah (Thu, 02 Aug 2018 19:02:16 GMT):
I'm assuming that's the reason, since there is no container with that chaincode launched for those peers

yacovm (Thu, 02 Aug 2018 19:02:30 GMT):
that's not the reason....

sarah (Thu, 02 Aug 2018 19:02:36 GMT):
what is the reason?

yacovm (Thu, 02 Aug 2018 19:02:52 GMT):
let's start from you showing the logs on these peers

yacovm (Thu, 02 Aug 2018 19:03:08 GMT):
of those that you can't invoke on

sarah (Thu, 02 Aug 2018 19:03:44 GMT):
`simulateProposal() resulted in chaincode name:"lscc"`

sarah (Thu, 02 Aug 2018 19:03:44 GMT):
`simulateProposal() resulted in chaincode name:"lscc" response status 500`

yacovm (Thu, 02 Aug 2018 19:04:18 GMT):
that's not a log

sarah (Thu, 02 Aug 2018 19:04:50 GMT):
which logs do you want? that is from `docker logs`

yacovm (Thu, 02 Aug 2018 19:05:33 GMT):
i want the relevant lines from the log of the peer

sarah (Thu, 02 Aug 2018 19:36:05 GMT):
I'm not sure which you consider relevant other than the line I previously sent `docker logs peer0.org1 2018-08-02 18:54:24.657 UTC [ledgermgmt] initialize -> INFO 001 Initializing ledger mgmt 2018-08-02 18:54:24.760 UTC [ledgermgmt] initialize -> INFO 002 ledger mgmt initialized 2018-08-02 19:00:28.879 UTC [ledgermgmt] CreateLedger -> INFO 003 Creating ledger [exchange-channel] with genesis block 2018-08-02 19:00:28.918 UTC [ledgermgmt] CreateLedger -> INFO 004 Created ledger [exchange-channel] with genesis block 2018-08-02 19:01:30.426 UTC [endorser] ProcessProposal -> ERRO 005 [exchange-channel][a7e35874] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: a7e358747fbf65e4eb0f8a404827ff7cc0147a4258719f33ab1803f0861c1623`

sarah (Thu, 02 Aug 2018 19:36:05 GMT):
I'm not sure which you consider relevant other than the line I previously sent ```docker logs peer0.org1 2018-08-02 18:54:24.657 UTC [ledgermgmt] initialize -> INFO 001 Initializing ledger mgmt 2018-08-02 18:54:24.760 UTC [ledgermgmt] initialize -> INFO 002 ledger mgmt initialized 2018-08-02 19:00:28.879 UTC [ledgermgmt] CreateLedger -> INFO 003 Creating ledger [exchange-channel] with genesis block 2018-08-02 19:00:28.918 UTC [ledgermgmt] CreateLedger -> INFO 004 Created ledger [exchange-channel] with genesis block 2018-08-02 19:01:30.426 UTC [endorser] ProcessProposal -> ERRO 005 [exchange-channel][a7e35874] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: a7e358747fbf65e4eb0f8a404827ff7cc0147a4258719f33ab1803f0861c1623```

sarah (Thu, 02 Aug 2018 19:36:17 GMT):
that is everything

yacovm (Thu, 02 Aug 2018 19:45:42 GMT):
> so when I try to invoke any methods through peers of the org who I didn't use to call `InstantiateCC`, it fails to find any peers because those peers don't have chaincode instantiated for them. can you elaborate on this please? @sarah ?

sarah (Thu, 02 Aug 2018 19:50:11 GMT):
my thought process is that because there is no container named `dev-peer0.org1-chaincodename:version` or `dev-peer1.org1-chaincodename:version`, the chaincode is not instantiated on peers of org1. Those containers do exist for peers of org0. When I use a fabric client set up wrt the context of an admin user of org0, I can invoke methods belonging to that chaincode. I cannot invoke methods belonging to that chaincode from peers belonging to org1.

yacovm (Thu, 02 Aug 2018 19:51:15 GMT):
what do you mean "from peers" ?

yacovm (Thu, 02 Aug 2018 19:51:24 GMT):
what is the error you get when you try?

yacovm (Thu, 02 Aug 2018 19:52:35 GMT):
> my thought process is that because there is no container named `dev-peer0.org1-chaincodename:version` or `dev-peer1.org1-chaincodename:version`, the chaincode is not instantiated on peers of org1 that's not how it works... when you instantiate, it just simulates the `Init()` function of the chaincode on the peer. You can have 100 peers in a single org, instantiate on one of them, and you'll only see a single container

yacovm (Thu, 02 Aug 2018 19:52:54 GMT):
the reason is - a peer spawns the chaincode container only when it needs to

sarah (Thu, 02 Aug 2018 19:55:34 GMT):
by "from peers" I mean that I set up a context creator and channel client for the exchange-channel, using the admin user of each org. So when using the channel client in the context of that org, wouldn't requests go through an available peer belonging to that org? i.e. when I use `channelClient.Execute(channel.Request)`

sarah (Thu, 02 Aug 2018 19:55:55 GMT):
oh I see I didn't know that the containers spawned only when needed

sarah (Thu, 02 Aug 2018 19:56:58 GMT):
when I call `InstantiateCC` why are two containers built? if there's currently no need for both

yacovm (Thu, 02 Aug 2018 19:57:36 GMT):
I have no idea why, to be honest... I would ask in the #fabric-sdk-go channel

yacovm (Thu, 02 Aug 2018 19:57:55 GMT):
But there shouldn't be 2 containers for sure

yacovm (Thu, 02 Aug 2018 19:58:20 GMT):
> So when using the channel client in the context of that org, wouldn't requests go through an available peer belonging to that org? I don't think it should

yacovm (Thu, 02 Aug 2018 19:58:27 GMT):
let's try something

yacovm (Thu, 02 Aug 2018 19:58:38 GMT):
what is the fabric version of the peers?

sarah (Thu, 02 Aug 2018 20:01:12 GMT):
I asked in #fabric-sdk-go as well! When I call instantiate, I list the target peers instead of not including any options, would that have any impact on the # of containers launched?

yacovm (Thu, 02 Aug 2018 20:01:53 GMT):
oh... could be

yacovm (Thu, 02 Aug 2018 20:01:59 GMT):
but let's try something to be certain

yacovm (Thu, 02 Aug 2018 20:02:03 GMT):
what's the fabric version?

yacovm (Thu, 02 Aug 2018 20:02:05 GMT):
of the peers

sarah (Thu, 02 Aug 2018 20:02:42 GMT):
the fabric version on the peers is 1.2.0

yacovm (Thu, 02 Aug 2018 20:02:49 GMT):
very good

yacovm (Thu, 02 Aug 2018 20:03:13 GMT):
please read this tutorial and list the peers of the channel https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

yacovm (Thu, 02 Aug 2018 20:03:22 GMT):
(after you instantiated them, like the status now)

yacovm (Thu, 02 Aug 2018 20:03:38 GMT):
you can get the binary from https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/

yacovm (Thu, 02 Aug 2018 20:04:38 GMT):
so you need to do something similar to `discover --configFile conf.yaml peers --channel mychannel --server peer0.org1.example.com:7051`

yacovm (Thu, 02 Aug 2018 20:05:13 GMT):
and this would tell you whether the peers all "have" the instantiate transaction in them

sarah (Thu, 02 Aug 2018 20:05:34 GMT):
great I will do that now!

sarah (Thu, 02 Aug 2018 20:26:27 GMT):
within bash of a peer, I can't seem to use the `discover` CLI. I'm getting `discover: command not found`

yacovm (Thu, 02 Aug 2018 20:29:00 GMT):
that's why i said you need to get it from that link

yacovm (Thu, 02 Aug 2018 20:29:05 GMT):
and copy that into the container via `docker cp`

sarah (Thu, 02 Aug 2018 20:29:29 GMT):
ohhh gotcha. I just clicked on the tutorial link and tried to start from there. I'll do that now, thanks

yacovm (Thu, 02 Aug 2018 20:30:15 GMT):
you can also just compile it from source

yacovm (Thu, 02 Aug 2018 20:30:18 GMT):
`make discover`

yacovm (Thu, 02 Aug 2018 20:30:23 GMT):
in the fabric repo https://github.com/hyperledger/fabric

yacovm (Thu, 02 Aug 2018 21:05:55 GMT):
... maybe i shouldn't have said to compile from source.... i don't want to be held responsible or accountable for any psychological damage

sarah (Thu, 02 Aug 2018 21:39:41 GMT):
ok at last the discover command has worked

sarah (Thu, 02 Aug 2018 21:40:31 GMT):
it is showing ledger height 2 for both Org0MSP and Org1MSP, and lists exchangeCC under each

sarah (Thu, 02 Aug 2018 21:40:31 GMT):
so `discover` run on a peer of org0 lists exchangeCC on both peers of the network

sarah (Thu, 02 Aug 2018 21:41:01 GMT):
some psychological damage

sarah (Thu, 02 Aug 2018 21:44:00 GMT):
going to check org1 now

sarah (Thu, 02 Aug 2018 21:49:27 GMT):
each peer in org1 also has exchangeCC listed under "Chaincodes"

yacovm (Thu, 02 Aug 2018 22:35:31 GMT):
@sarah that means that the instantiate worked

yacovm (Thu, 02 Aug 2018 22:35:41 GMT):
and all peers see the chaincode in the channel

sarah (Thu, 02 Aug 2018 22:36:11 GMT):
:frowning2: hmm

sarah (Thu, 02 Aug 2018 22:36:11 GMT):
:frowning2: hmm

yacovm (Thu, 02 Aug 2018 22:36:25 GMT):
> some psychological damage I am sorry... with time you get used to the pain and you start to think it's not real pain

yacovm (Thu, 02 Aug 2018 22:36:34 GMT):
so I think you use the go SDK in the wrong way

yacovm (Thu, 02 Aug 2018 22:36:39 GMT):
you don't need to specify peers

yacovm (Thu, 02 Aug 2018 22:36:43 GMT):
let us try something more

yacovm (Thu, 02 Aug 2018 22:37:07 GMT):
`discover endorsers --channel mychannel --chaincode exchangeCC --target peer0.blabla:port`

yacovm (Thu, 02 Aug 2018 22:37:07 GMT):
`discover endorsers --channel mychannel --chaincode exchangeCC --server peer0.blabla:port`

sarah (Thu, 02 Aug 2018 22:37:16 GMT):
I don't specify peers, just the admin/org when I set up the client context, which I think I need to do

sarah (Thu, 02 Aug 2018 22:38:22 GMT):
ya I also think it is a problem with the endorsers! I set the policy as SignedByAnyPeer but that didn't do anything besides produce the output `NO_PEERS_FOUND. Description: targets were not provided` when I attempt to execute a cc request. I will try `discoverer endorsers` now!

sarah (Thu, 02 Aug 2018 22:38:22 GMT):
ya I also think it is a problem with the endorsers! I set the policy as SignedByAnyPeer but that didn't do anything besides produce the output `NO_PEERS_FOUND. Description: targets were not provided` when I attempt to execute a cc request. I will try `discover endorsers` now!

sarah (Thu, 02 Aug 2018 23:14:12 GMT):
that returned `[server returned: failed constructing descriptor for chaincodes: ]`

sarah (Thu, 02 Aug 2018 23:19:13 GMT):
maybe related to this unresolved issue... https://jira.hyperledger.org/browse/FAB-10891

yacovm (Fri, 03 Aug 2018 05:06:31 GMT):
And what do the peer logs say pf the peet you targeted @sara ?

yacovm (Fri, 03 Aug 2018 05:06:31 GMT):
And what do the peer logs say (the peer you targeted), @sarah ?

tinywell (Fri, 03 Aug 2018 05:55:14 GMT):
Has left the channel.

ManuelRauber (Fri, 03 Aug 2018 07:01:32 GMT):
Has joined the channel.

ManuelRauber (Fri, 03 Aug 2018 10:12:31 GMT):
Hi everyone, I hope I'm in the right channel here. If not, please let me know. I've started developing a new Shim for .NET which I have proposed on Jira here: https://jira.hyperledger.org/browse/FAB-11460 I'd love to get some feedback, if this is something which I could contribute to HLF. Thanks in advance for your time and feel free to drop me all your questions. :)

yacovm (Fri, 03 Aug 2018 10:13:38 GMT):
yeah I think that might be great

yacovm (Fri, 03 Aug 2018 10:14:02 GMT):
I don't like C# myself but I think if you can make it run stably on linux containers it's not bad

yacovm (Fri, 03 Aug 2018 10:14:20 GMT):
basically the flow goes like this

yacovm (Fri, 03 Aug 2018 10:14:32 GMT):
1) You get a working PoC that works with the peer

yacovm (Fri, 03 Aug 2018 10:14:32 GMT):
1) You get a working PoC that works with the peer that proves it's possible

yacovm (Fri, 03 Aug 2018 10:14:46 GMT):
2) You send an email publishing the JIRA in the mailing list

yacovm (Fri, 03 Aug 2018 10:15:16 GMT):
3) If the community sees it's a useful and good idea, then I guess the linux foundation might create a project for you under https://github.com/hyperledger/

yacovm (Fri, 03 Aug 2018 10:15:48 GMT):
@rjones please correct me if I'm wrong on the steps

rjones (Fri, 03 Aug 2018 10:15:48 GMT):
Has joined the channel.

ManuelRauber (Fri, 03 Aug 2018 10:20:26 GMT):
@yacovm Thanks for your answer. I've a working PoC (linked in Jira), its running on linux, macOS and Windows (thanks to .NET Core) and I did the mail to the mailing list. :-)

yacovm (Fri, 03 Aug 2018 10:20:30 GMT):
you can take a look at the java shim

yacovm (Fri, 03 Aug 2018 10:20:32 GMT):
for reference

sstone1 (Fri, 03 Aug 2018 10:23:18 GMT):
Has joined the channel.

ManuelRauber (Fri, 03 Aug 2018 10:24:01 GMT):
Jep, and your flow seems to be right, the same was told by @cbf as well as written down in the docs: https://hyperledger-fabric.readthedocs.io/en/release-1.2/CONTRIBUTING.html#making-feature-enhancement-proposals

cbf (Fri, 03 Aug 2018 10:24:01 GMT):
Has joined the channel.

yacovm (Fri, 03 Aug 2018 10:25:15 GMT):
also we sometimes have playbacks

yacovm (Fri, 03 Aug 2018 10:25:19 GMT):
#fabric-playbacks

yacovm (Fri, 03 Aug 2018 10:25:43 GMT):
if you want to propose to schedule one (it's recorded) you can do it to promote your idea

ManuelRauber (Fri, 03 Aug 2018 10:26:14 GMT):
You mean to record a video about the idea itself and show the working PoC?

yacovm (Fri, 03 Aug 2018 10:26:33 GMT):
it's usually a presentation where you go over the details

yacovm (Fri, 03 Aug 2018 10:26:41 GMT):
but some add to the mix a live demo

yacovm (Fri, 03 Aug 2018 10:27:07 GMT):
you can look at examples here https://wiki.hyperledger.org/projects/fabric/playbacks

ManuelRauber (Fri, 03 Aug 2018 10:28:05 GMT):
Oh, thanks! Sounds good. I'll take a look at this next week, since it takes some preparation time to create a good recording :)

yacovm (Fri, 03 Aug 2018 10:29:37 GMT):
nooo

yacovm (Fri, 03 Aug 2018 10:29:40 GMT):
it's not a recording

yacovm (Fri, 03 Aug 2018 10:29:53 GMT):
it's a recorded live screen-sharing session

yacovm (Fri, 03 Aug 2018 10:30:05 GMT):
you don't record - you get recorded

ManuelRauber (Fri, 03 Aug 2018 10:32:43 GMT):
Ah, sorry. Now I understand. :)

ManuelRauber (Fri, 03 Aug 2018 10:32:55 GMT):
Well, it's the same then, preparation time is needed as well :D

sstone1 (Fri, 03 Aug 2018 10:34:04 GMT):
@ManuelRauber this is great, i've been saying for ages that .NET would be a great win for Fabric - once you have JavaScript, Java, .NET you cover such a huge developer base! @mbwhite is doing some work on chaincode in FAB-11246, he's gonna reach out to you to discuss how the same could be applied to .NET in future.

yacovm (Fri, 03 Aug 2018 10:35:42 GMT):
wait, javascript is a language? :O

ManuelRauber (Fri, 03 Aug 2018 10:37:26 GMT):
@sstone1 Thanks! Sounds good :) It would also be interesting to convert the JavaScript Chaincode to TypeScript, then you get the definitions (just saw that in FAB-11246) as well as JavaScript for Node.js also (and if someone wants, he/she could use Node.js with TS as well). So I'm waiting patiently for @mbwhite :)

sstone1 (Fri, 03 Aug 2018 10:38:38 GMT):
Yeah, the Typescript stuff is on the way as well

sstone1 (Fri, 03 Aug 2018 10:38:47 GMT):
Have you considered doing a Fabric SDK for .NET btw?

sstone1 (Fri, 03 Aug 2018 10:38:55 GMT):
For building .NET client applications that submit transactions?

ManuelRauber (Fri, 03 Aug 2018 10:39:51 GMT):
I've taken a look into the Node.js SDK to get an overview how much code that is. If .NET is relevant for HLF, I would be willing to start the SDK as well, so .NET is fully covered. For now, I just have started with the Shim to get some feedback from HLF

ManuelRauber (Fri, 03 Aug 2018 10:39:51 GMT):
I've taken a look into the Node.js SDK to get an overview how much code that is. If .NET is relevant for HLF, I would be willing to start the .NET SDK as well, so .NET is fully covered. For now, I just have started with the Shim to get some feedback from HLF

sstone1 (Fri, 03 Aug 2018 10:41:49 GMT):
That’d be cool, and agree that’s the right thing to do!

ManuelRauber (Fri, 03 Aug 2018 10:42:50 GMT):
Hope so. Let's see when and what feedback will be posted into Jira. :)

ManuelRauber (Fri, 03 Aug 2018 10:44:09 GMT):
Not sure, if I should update the jira ticket with that information as well?

sstone1 (Fri, 03 Aug 2018 10:50:02 GMT):
Yeah, the more information the better I think :+1:

ManuelRauber (Fri, 03 Aug 2018 10:52:42 GMT):
Thanks, Just updated the Jira a bit

GowriR (Fri, 03 Aug 2018 12:47:58 GMT):
Hi all my fabric-ccenv container gets deleted as soon as it is started by the peer. The Go chaincode is mostly a rip off from the sample chaincode, with relevant changes. Is there anyway i can debug the problem.

GowriR (Fri, 03 Aug 2018 12:49:20 GMT):
below is a snippet of the error messages 2018-07-28 21:13:32.538 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2c8 2018-07-28 21:13:32.538 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } 2018-07-28 21:13:33.864 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2c9 2018-07-28 21:13:33.863 UTC [grpc] Printf -> DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2ca 2018-07-28 21:13:34.536 UTC [shim] userChaincodeStreamGetter -> ERRO 005 context deadline exceeded 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2cb error trying to connect to local peer 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2cc github.com/utilityWorkflow/vendor/github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2cd /chaincode/input/src/github.com/utilityWorkflow/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:111 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2ce github.com/utilityWorkflow/vendor/github.com/hyperledger/fabric/core/chaincode/shim.Start 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2cf /chaincode/input/src/github.com/utilityWorkflow/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:150 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d0 main.main 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d1 /chaincode/input/src/github.com/utilityWorkflow/utility_workflow.go:378 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d2 runtime.main 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d3 /opt/go/src/runtime/proc.go:198 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d4 runtime.goexit 2018-07-28 21:13:34.545 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v1] func2 -> INFO 2d5 /opt/go/src/runtime/asm_amd64.s:2361 2018-07-28 21:13:34.607 UTC [dockercontroller] func2 -> INFO 2d6 Container dev-peer0.utilityorg.demandresponse.com-utilitycc-v1 has closed its IO channel

zmaro (Fri, 03 Aug 2018 15:16:11 GMT):
Has joined the channel.

sarah (Fri, 03 Aug 2018 15:21:12 GMT):
@yacovm the peer logs pointed me in the direction of an incorrect endorsement policy...turns out I accidentally had Org0, Org1 instead of Org0MSP and Org1MSP

mbwhite (Fri, 03 Aug 2018 15:22:54 GMT):
FYI, as part of the work on the updates to the chaincode api for node mentioned earlier today. Part of this is a updated example/sample. This is to be considered a work-in-progress - but it is on github at https://github.com/mbwhite/chaincode-commericalpaper The plan is to add Go and other languages in the same sample and intergate with the rest of the samples. Github is a 'staging' place at present. Hopefully a real example will help provide clarity on the direction being taken.

yacovm (Fri, 03 Aug 2018 15:26:01 GMT):
@sarah - I see, so after you pass a correct EP - do things work?

sarah (Fri, 03 Aug 2018 15:29:39 GMT):
yes they do :smile: thanks for all of your help. I learned a lot!

sarah (Fri, 03 Aug 2018 15:29:39 GMT):
@yacovm yes they do :smile: thanks for all of your help. I learned a lot!

pankajanand26 (Fri, 03 Aug 2018 15:32:36 GMT):
Has joined the channel.

GopalPanda (Fri, 03 Aug 2018 19:16:33 GMT):
@mbwhite

akshay.sood (Sat, 04 Aug 2018 06:46:29 GMT):
Has joined the channel.

muralisr (Sat, 04 Aug 2018 17:52:02 GMT):
@sarah we should take a look at the logs on peer0/Org1 and peer1/Org1 when you try to do an invoke on the chaincode on those peers

mohamedbaza (Sun, 05 Aug 2018 06:42:01 GMT):
Has joined the channel.

mohamedbaza (Sun, 05 Aug 2018 06:45:34 GMT):
Hello. I am a new to hyperledger fabric. I understand How hyperledger works. The chain code still confuse me. Also, the syntax of the chaincode. For example , I read code like this in the init method: func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response . Any explain to this line

muralisr (Sun, 05 Aug 2018 15:02:25 GMT):
@mohamedbaza The chaincode interface supports two basic calls - Init and Invoke. Init is called exactly once when the chaincode is "instantiated" on the ledger and Invoke is called for every proposal sent to it. The "stub" refers to an interface supplied to those calls which the chaincode developer can use to interact with the system. For example various "Put" and "Get" methods on the stub interface allow one to write / read states from ledger. Response the return value that encapsultes status (success/error) and payload

mohamedbaza (Sun, 05 Aug 2018 16:08:34 GMT):
@muralisr thanks for your nice explaination. what is peer.response in the "invoke declaration" refer to?? Also (t *SampleChaincode) ?

muralisr (Sun, 05 Aug 2018 16:16:51 GMT):
It is the return data from the call to Invoke (contains status and payload of the response)

muralisr (Sun, 05 Aug 2018 16:16:51 GMT):
It is the return data from the call to Invoke (contains status and payload of the response)... note we are basically discussing GOLANG syntax at this point `(t *SampleChaincode)` is better understood from GO syntax angle ... nothing inherently chaincode-specific about it

KaranBlockchain (Sun, 05 Aug 2018 16:27:38 GMT):
Hi All, I am new to Chaincode and I have written my first program to insert a key-value pair username and fileuploadstatus but I am getting few errors. Below is my code

KaranBlockchain (Sun, 05 Aug 2018 16:27:55 GMT):
package main import( "errors" "fmt" pb "github.com/hyperledger/fabric/protos/peer" //"encoding/json" "github.com/hyperledger/fabric/core/chaincode/shim" ) type SampleChaincode struct { } var logger = shim.NewLogger("my logger") //Create a struct for these 2 values type testuser struct{ Username string `json:"username"` Fileuploaded string `json:"fileuploaded"` } //A function to create user on the ledger func CreateUser(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if len(args) < 2 { logger.Error("Invalid number of args") return shim.Success(errors.New("Expected atleast 1 argument for user creation")) } var Username = args[0] var UsernameInput = args[1] //trying to understand err := stub.PutState(Username, []byte(UsernameInput)) if err != nil { logger.Error("Could not save new User to ledger", err) return shim.Success(err) } var customEvent = "{eventType: 'UserCreation', description:" + Username + "' Successfully created'}" err = stub.SetEvent("evtSender", []byte(customEvent)) if err != nil { return shim.Success(err) } logger.Info("Successfully saved a supply chain user") return shim.Success(nil) } func Checkuploadstatus(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() logger.Debug("Entering supplychain application") if len(args) < 1 { logger.Error("Invalid number of arguments") return shim.Success(errors.New("Missing details")) } var Fileuploadedstatusforuser = args[0] bytes, err := stub.GetState(Fileuploadedstatusforuser) if err != nil { logger.Error("Could not fetch Fileuploadedstatus with "+ Fileuploadedstatusforuser +" from ledger", err) return shim.Success(err) } return shim.Success(bytes) } func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() return shim.Success(nil) //Here also I think I am wrong because I haven't put anything } func (t *SampleChaincode) Query(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function == "Checkuploadstatus" { return Checkuploadstatus(stub, args) } return shim.Success(nil) } func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function == "CreateUser" { return CreateUser(stub, args) } else { return nil, errors.New(username + " does not have access to create a User") } return shim.Success(nil) } func main() { lld, _ := shim.LogLevel("DEBUG") fmt.Println(lld) logger.SetLevel(lld) fmt.Println(logger.IsEnabledFor(lld)) err := shim.Start(new(SampleChaincode)) if err != nil { logger.Error("Could not start SampleChaincode") } else { logger.Info("SampleChaincode successfully started") } }

KaranBlockchain (Sun, 05 Aug 2018 16:28:51 GMT):
While compiling I am getting below errors: go build # _/home/ubuntu/go/src/Chaincodeexample ./Samplesupplychain.go:28:39: cannot use errors.New("Expected atleast 1 argument for user creation") (type error) as type []byte in argument to shim.Success ./Samplesupplychain.go:37:28: cannot use err (type error) as type []byte in argument to shim.Success ./Samplesupplychain.go:43:28: cannot use err (type error) as type []byte in argument to shim.Success ./Samplesupplychain.go:57:39: cannot use errors.New("Missing details") (type error) as type []byte in argument to shim.Success ./Samplesupplychain.go:65:28: cannot use err (type error) as type []byte in argument to shim.Success ./Samplesupplychain.go:80:33: too many arguments in call to Checkuploadstatus have (shim.ChaincodeStubInterface, []string) want (shim.ChaincodeStubInterface) ./Samplesupplychain.go:90:26: too many arguments in call to CreateUser have (shim.ChaincodeStubInterface, []string) want (shim.ChaincodeStubInterface) ./Samplesupplychain.go:92:13: too many arguments to return have (nil, error) want (peer.Response) ./Samplesupplychain.go:92:36: undefined: username

KaranBlockchain (Sun, 05 Aug 2018 16:29:05 GMT):
Can anyone please help?

muralisr (Sun, 05 Aug 2018 16:46:52 GMT):
@KaranBlockchain try this please ```package main import( "fmt" pb "github.com/hyperledger/fabric/protos/peer" //"encoding/json" "github.com/hyperledger/fabric/core/chaincode/shim" ) type SampleChaincode struct { } var logger = shim.NewLogger("my logger") //Create a struct for these 2 values type testuser struct{ Username string `json:"username"` Fileuploaded string `json:"fileuploaded"` } //A function to create user on the ledger func CreateUser(stub shim.ChaincodeStubInterface, args []string) pb.Response { if len(args) < 2 { logger.Error("Invalid number of args") return shim.Error("Expected atleast 1 argument for user creation") } var Username = args[0] var UsernameInput = args[1] //trying to understand err := stub.PutState(Username, []byte(UsernameInput)) if err != nil { logger.Error("Could not save new User to ledger", err) return shim.Error(err.Error()) } var customEvent = "{eventType: 'UserCreation', description:" + Username + "' Successfully created'}" err = stub.SetEvent("evtSender", []byte(customEvent)) if err != nil { return shim.Error(err.Error()) } logger.Info("Successfully saved a supply chain user") return shim.Success(nil) } func Checkuploadstatus(stub shim.ChaincodeStubInterface, args []string) pb.Response { logger.Debug("Entering supplychain application") if len(args) < 1 { logger.Error("Invalid number of arguments") return shim.Error("Missing details") } var Fileuploadedstatusforuser = args[0] bytes, err := stub.GetState(Fileuploadedstatusforuser) if err != nil { logger.Error("Could not fetch Fileuploadedstatus with "+ Fileuploadedstatusforuser +" from ledger", err) return shim.Error(err.Error()) } return shim.Success(bytes) } func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { //you aren't using this so don' t need this //function, args := stub.GetFunctionAndParameters() return shim.Success(nil) //Here also I think I am wrong because I haven't put anything } func (t *SampleChaincode) Query(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function == "Checkuploadstatus" { return Checkuploadstatus(stub, args) } return shim.Success(nil) } func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function == "CreateUser" { return CreateUser(stub, args) } else { errorMsg := fmt.Sprintf("invalid function %s ", function) return pb.Response{ Status: shim.ERROR, Message: errorMsg } } return shim.Success(nil) } func main() { lld, _ := shim.LogLevel("DEBUG") fmt.Println(lld) logger.SetLevel(lld) fmt.Println(logger.IsEnabledFor(lld)) err := shim.Start(new(SampleChaincode)) if err != nil { logger.Error("Could not start SampleChaincode") } else { logger.Info("SampleChaincode successfully started") } }```

KaranBlockchain (Sun, 05 Aug 2018 16:59:56 GMT):
It worked perfectly and I can see the source file now thanks a lot Murali :) Really helpful I am going to deploy it on the fabric now

Legiit (Mon, 06 Aug 2018 09:10:07 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.2/enable_tls.html

Legiit (Mon, 06 Aug 2018 09:10:18 GMT):
is this the correct resource to serve your HLF network over HTTPS?

RobertDiebels (Mon, 06 Aug 2018 09:14:30 GMT):
Has joined the channel.

RobertDiebels (Mon, 06 Aug 2018 09:15:17 GMT):
Hi guys. I'm getting a MVCC_READ_CONFLICT in one of my contracts.

RobertDiebels (Mon, 06 Aug 2018 09:16:46 GMT):
I'm testing fabric performance using caliper with a rate of 3 Tx/s. Is there a way I can avoid getting this error other than using the delta solution proposed here: https://github.com/hyperledger/fabric-samples/tree/release/high-throughput

RobertDiebels (Mon, 06 Aug 2018 09:17:08 GMT):
Here's the relevant bit of chaincode: ```` ```

RobertDiebels (Mon, 06 Aug 2018 09:17:08 GMT):
Here's the relevant bit of chaincode: ```` ``func (*AddTokenCallFunction) Start(stub shim.ChaincodeStubInterface, args []string) pb.Response { if len(args) != 2 { s := fmt.Sprintf(ERROR_INCORRECT_AMOUNT_OF_ARGUMENTS, "add-tokens", 2, len(args)) return shim.Error(s) } account := args[0] tokens := args[1] currentTokensBytes, err := stub.GetState(account) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens := binary.LittleEndian.Uint64(currentTokensBytes) tokensToAdd, err := strconv.ParseUint(tokens, 10, 64) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens += tokensToAdd tokenBytes, err := UintToBytes(currentAmountOfTokens) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } err = stub.PutState(account, tokenBytes) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } return shim.Success(nil) }``

RobertDiebels (Mon, 06 Aug 2018 09:17:08 GMT):
Here's the relevant bit of chaincode: ``func (*AddTokenCallFunction) Start(stub shim.ChaincodeStubInterface, args []string) pb.Response { if len(args) != 2 { s := fmt.Sprintf(ERROR_INCORRECT_AMOUNT_OF_ARGUMENTS, "add-tokens", 2, len(args)) return shim.Error(s) } account := args[0] tokens := args[1] currentTokensBytes, err := stub.GetState(account) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens := binary.LittleEndian.Uint64(currentTokensBytes) tokensToAdd, err := strconv.ParseUint(tokens, 10, 64) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens += tokensToAdd tokenBytes, err := UintToBytes(currentAmountOfTokens) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } err = stub.PutState(account, tokenBytes) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } return shim.Success(nil) }``

RobertDiebels (Mon, 06 Aug 2018 09:17:08 GMT):
Here's the relevant bit of chaincode: ``` func (*AddTokenCallFunction) Start(stub shim.ChaincodeStubInterface, args []string) pb.Response { if len(args) != 2 { s := fmt.Sprintf(ERROR_INCORRECT_AMOUNT_OF_ARGUMENTS, "add-tokens", 2, len(args)) return shim.Error(s) } account := args[0] tokens := args[1] currentTokensBytes, err := stub.GetState(account) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens := binary.LittleEndian.Uint64(currentTokensBytes) tokensToAdd, err := strconv.ParseUint(tokens, 10, 64) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } currentAmountOfTokens += tokensToAdd tokenBytes, err := UintToBytes(currentAmountOfTokens) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } err = stub.PutState(account, tokenBytes) if err != nil { s := fmt.Sprintf(ERROR_SYSTEM, err.Error()) return shim.Error(s) } return shim.Success(nil) } ```

akshay.lawange (Mon, 06 Aug 2018 09:28:16 GMT):
Hi, got an error while invoking a function on chaincode. Has anyone faced this issue?

akshay.lawange (Mon, 06 Aug 2018 09:29:09 GMT):
``` 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 ```

YILMAZKORKMAZ (Mon, 06 Aug 2018 11:54:21 GMT):
Has joined the channel.

muralisr (Mon, 06 Aug 2018 12:49:46 GMT):
@akshay.lawange `Error: 2 UNKNOWN: access denied: channel [globalchannel] creator org [oMSP]` typically means the signer identity is not authorized

vijay5378 (Mon, 06 Aug 2018 12:57:18 GMT):
When I try to start my chaincode after building, I get the error:

vijay5378 (Mon, 06 Aug 2018 12:57:18 GMT):
When I try to start my chaincode after building, I get the error:/fabric/go/src/SalesContract$ ./SalesContract 2018-08-06 12:53:22.169 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode (build level: ) starting up ... 2018-08-06 12:53:22.169 UTC [bccsp] initBCCSP -> DEBU 002 Initialize BCCSP [SW] 2018-08-06 12:53:22.169 UTC [shim] userChaincodeStreamGetter -> DEBU 003 Peer address: peer001.proxycapital:7051 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 004 parsed scheme: "" 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 005 scheme "" not registered, fallback to default scheme 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 006 ccResolverWrapper: sending new addresses to cc: [{peer001.proxycapital:7051 0 }] 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 007 ClientConn switching balancer to "pick_first" 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 008 pickfirstBalancer: HandleSubConnStateChange: 0xc42028f840, CONNECTING 2018-08-06 12:53:22.173 UTC [grpc] Printf -> DEBU 009 pickfirstBalancer: HandleSubConnStateChange: 0xc42028f840, READY 2018-08-06 12:53:22.173 UTC [shim] userChaincodeStreamGetter -> DEBU 00a os.Args returns: [./SalesContract] 2018-08-06 12:53:22.173 UTC [shim] chatWithPeer -> DEBU 00b Registering.. sending REGISTER Error starting SalesContract chaincode: error sending: rpc error: code = Unavailable desc = transport is closing

vijay5378 (Mon, 06 Aug 2018 12:57:18 GMT):
When I try to start my chaincode after building, I get the error:/fabric/go/src/SalesContract$ ./SalesContract 2018-08-06 12:53:22.169 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode (build level: ) starting up ... 2018-08-06 12:53:22.169 UTC [bccsp] initBCCSP -> DEBU 002 Initialize BCCSP [SW] 2018-08-06 12:53:22.169 UTC [shim] userChaincodeStreamGetter -> DEBU 003 Peer address: peer001.myorg:7051 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 004 parsed scheme: "" 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 005 scheme "" not registered, fallback to default scheme 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 006 ccResolverWrapper: sending new addresses to cc: [{peer001.myorg:7051 0 }] 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 007 ClientConn switching balancer to "pick_first" 2018-08-06 12:53:22.170 UTC [grpc] Printf -> DEBU 008 pickfirstBalancer: HandleSubConnStateChange: 0xc42028f840, CONNECTING 2018-08-06 12:53:22.173 UTC [grpc] Printf -> DEBU 009 pickfirstBalancer: HandleSubConnStateChange: 0xc42028f840, READY 2018-08-06 12:53:22.173 UTC [shim] userChaincodeStreamGetter -> DEBU 00a os.Args returns: [./SalesContract] 2018-08-06 12:53:22.173 UTC [shim] chatWithPeer -> DEBU 00b Registering.. sending REGISTER Error starting SalesContract chaincode: error sending: rpc error: code = Unavailable desc = transport is closing

alek (Mon, 06 Aug 2018 13:23:53 GMT):
Has joined the channel.

KaranBlockchain (Mon, 06 Aug 2018 15:13:42 GMT):
Hi , I have a successfully compiled chaincode and I am trying to register it on an Admin peer but not able to do it. Can anyone please help me registering my chaincode and then start it. ./createPeerAdminCard.sh Development only script for Hyperledger Fabric control Running 'createPeerAdminCard.sh' FABRIC_VERSION is unset, assuming hlfv11 FABRIC_START_TIMEOUT is unset, assuming 15 (seconds) Using composer-cli at v0.19.12 Successfully created business network card file to Output file: /tmp/PeerAdmin@hlfv1.card Command succeeded Deleted Business Network Card: PeerAdmin@hlfv1 Command succeeded Successfully imported business network card Card file: /tmp/PeerAdmin@hlfv1.card Card name: PeerAdmin@hlfv1 Command succeeded The following Business Network Cards are available: Connection Profile: hlfv1 âââââââââââââââââââ¬ââââââââââââ¬âââââââââââââââââââ â Card Name â UserId â Business Network â âââââââââââââââââââ¼ââââââââââââ¼ââââââââââââââââââ⤠â PeerAdmin@hlfv1 â PeerAdmin â â âââââââââââââââââââ´ââââââââââââ´âââââââââââââââââââ Issue composer card list --card to get details a specific card Command succeeded Hyperledger Composer PeerAdmin card has been imported, host of fabric specified as 'localhost'

rjones (Mon, 06 Aug 2018 15:17:14 GMT):
Has left the channel.

nhrishi (Mon, 06 Aug 2018 17:40:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TaYLQ6LDQ22m4iNbg) @muralisr Thanks @muralisr . Appreciate your help. We were not deleting the key value store on client side

mogarg (Mon, 06 Aug 2018 22:37:29 GMT):
Has joined the channel.

mogarg (Mon, 06 Aug 2018 22:39:16 GMT):
I have created and successfully deployed a chaincode based on basic-network. I have tested it using cli interface. However, I wish to interact it using rest apis. I have tried to find the ip address of the docker container running the peer however the requests timeout after a while

mogarg (Mon, 06 Aug 2018 22:39:21 GMT):
Can anyone help with this?

aguel (Tue, 07 Aug 2018 05:59:49 GMT):
Has joined the channel.

GowriR (Tue, 07 Aug 2018 06:11:42 GMT):
Hi all what are the steps to do go vendoring? Any docoumentation on that specific to fabric chaincodes? When i type go version on my VM I get hypledvm@hypledvm-VirtualBox:~/go/src/demandresponsepoc/chaincode/src/github.com/trade_workflow$ go version 2018-07-29 10:32:54.453 IST [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2018-07-29 10:32:54.454 IST [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... Error starting chaincode error chaincode id not provided

GowriR (Tue, 07 Aug 2018 06:18:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zZZifrhBXFtwEsLpW) @mogarg Hello, i am also facing a similar issue and I feel it is because of several connected problem - 2 of which i listed above and another I am getting is er0.consumerorg.demandresponse.com | 2018-07-29 05:10:08.992 UTC [gossip/election] waitForInterrupt -> DEBU 1318 [30 112 164 231 20 133 158 245 221 229 92 19 179 28 208 91 151 183 210 167 106 250 148 222 114 36 161 220 234 241 236 74] : Entering peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.064 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1319 2018-07-29 05:10:11.063 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.consumerorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.consumerorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.063 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 133f 2018-07-29 05:10:11.062 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.067 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1340 2018-07-29 05:10:11.067 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.510 UTC [gossip/discovery] periodicalSendAlive -> DEBU 131a Sleeping 5s peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.617 UTC [gossip/discovery] periodicalSendAlive -> DEBU 1341 Sleeping 5s peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.925 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 131b 2018-07-29 05:10:11.914 UTC [shim] userChaincodeStreamGetter -> ERRO 003 context deadline exceeded Guess all these are related to GO vendoring. But to even proceed, I need to remove the error - on typing "go version" described above

GowriR (Tue, 07 Aug 2018 06:21:42 GMT):
@mogarg Hello, i am also facing a similar issue and I feel it is because of several connected problem - 2 of which i listed above and another I am getting is er0.consumerorg.demandresponse.com | 2018-07-29 05:10:08.992 UTC [gossip/election] waitForInterrupt -> DEBU 1318 [30 112 164 231 20 133 158 245 221 229 92 19 179 28 208 91 151 183 210 167 106 250 148 222 114 36 161 220 234 241 236 74] : Entering peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.064 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1319 2018-07-29 05:10:11.063 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.consumerorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.consumerorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.063 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 133f 2018-07-29 05:10:11.062 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.067 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1340 2018-07-29 05:10:11.067 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.510 UTC [gossip/discovery] periodicalSendAlive -> DEBU 131a Sleeping 5s peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.617 UTC [gossip/discovery] periodicalSendAlive -> DEBU 1341 Sleeping 5s peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.925 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 131b 2018-07-29 05:10:11.914 UTC [shim] userChaincodeStreamGetter -> ERRO 003 context deadline exceeded Guess all these are related to GO vendoring. But to even proceed, I need to remove the error - on typing "go version" described above

GowriR (Tue, 07 Aug 2018 06:24:17 GMT):
@mogarg Hello, i am also facing a similar issue and I feel it is because of several connected problems - 2 of which i listed above and another I am getting is "er0.consumerorg.demandresponse.com | 2018-07-29 05:10:08.992 UTC [gossip/election] waitForInterrupt -> DEBU 1318 [30 112 164 231 20 133 158 245 221 229 92 19 179 28 208 91 151 183 210 167 106 250 148 222 114 36 161 220 234 241 236 74] : Entering peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.064 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1319 2018-07-29 05:10:11.063 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.consumerorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.consumerorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.063 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 133f 2018-07-29 05:10:11.062 UTC [grpc] Printf -> DEBU 002 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.067 UTC [dev-peer0.utilityorg.demandresponse.com-utilitycc-v0] func2 -> INFO 1340 2018-07-29 05:10:11.067 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: *Error while dialing dial tcp: lookup peer0.utilityorg.demandresponse.com on 127.0.1.1:53: no such host"*; Reconnecting to {peer0.utilityorg.demandresponse.com:7052 } peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.510 UTC [gossip/discovery] periodicalSendAlive -> DEBU 131a Sleeping 5s peer0.utilityorg.demandresponse.com | 2018-07-29 05:10:11.617 UTC [gossip/discovery] periodicalSendAlive -> DEBU 1341 Sleeping 5s peer0.consumerorg.demandresponse.com | 2018-07-29 05:10:11.925 UTC [dev-peer0.consumerorg.demandresponse.com-utilitycc-v0] func2 -> INFO 131b 2018-07-29 05:10:11.914 UTC [shim] userChaincodeStreamGetter -> *ERRO 003 context deadline exceeded*" *Guess all these are related to GO vendoring. But to even proceed, I need to remove the error - on typing "go version" described above*

GowriR (Tue, 07 Aug 2018 06:24:38 GMT):
Re-pasting with better formatting

RobertDiebels (Tue, 07 Aug 2018 07:39:10 GMT):
Can anyone explain why I'm still getting a MVCC_READ_CONFLICT even though I'm now using the example in: https://github.com/hyperledger/fabric-samples/blob/ed81d7b9b17bce5f103ebdae97c3bb12f97cf9a5/high-throughput/chaincode/high-throughput.go

RobertDiebels (Tue, 07 Aug 2018 07:39:56 GMT):
I'd like to do justice to Fabric's performance capabilities when I start writing down the results of my tests.

RobertDiebels (Tue, 07 Aug 2018 07:40:42 GMT):
So far there is hardly any difference between using a PutState() with a regular key and a composite key. I get MVCC_READ_CONFLICT's on both.

qsmen (Tue, 07 Aug 2018 08:18:07 GMT):
Has joined the channel.

qsmen (Tue, 07 Aug 2018 08:18:18 GMT):
hi, suppose a key, just as the car in fabcar, has two attributes, say attr1 and attr2. My question is: can the two attributes be writen by two client applications respectively? and after the second attibute is writen and the ledger is updated, the event can be received by a third client application? Thank you.

StefanKosc (Tue, 07 Aug 2018 11:10:28 GMT):
Has joined the channel.

StefanKosc (Tue, 07 Aug 2018 12:19:36 GMT):
Hi, how to run tests with `mockStub` with arguments passed to `Init` method?

jrosmith (Tue, 07 Aug 2018 12:22:52 GMT):
@mogarg which sdk are you using to interact with the peers?

muralisr (Tue, 07 Aug 2018 13:48:32 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ni6fz7DTYtmpLh8qf

muralisr (Tue, 07 Aug 2018 13:55:21 GMT):
@GowriR `go version` output looks like a chaincode output (this would happen if your chaincode is a folder called "go/mychaincode.go" and did a `go build` there)... so the above output just confuses the issue. I assume your intention with `go version` is to show some information about the `go` env and not to run the chaincode. Secondly (and this includes @mogarg issue as well..) not sure why you think its a vendoring issue. I'll look at the peer logs during instantiate ..if the chaincode built successfully, then its NOT a vendoring issue. The other possibility is the chaincode crashed for some reason. you should be able to look at logs - both peer and chaincode - and other tell tale signs (exited container for example) to determine root cause

muralisr (Tue, 07 Aug 2018 13:55:21 GMT):
@GowriR `go version` output looks like a chaincode output (this would happen if your chaincode is under `go/` folder say "go/mychaincode.go" and did a `go build` there)... so the above output just confuses the issue. I assume your intention with `go version` is to show some information about the `go` env and not to run the chaincode. Secondly (and this includes @mogarg issue as well..) not sure why you think its a vendoring issue. I'll look at the peer logs during instantiate ..if the chaincode built successfully, then its NOT a vendoring issue. The other possibility is the chaincode crashed for some reason. you should be able to look at logs - both peer and chaincode - and other tell tale signs (exited container for example) to determine root cause

muralisr (Tue, 07 Aug 2018 13:55:21 GMT):
@GowriR `go version` output looks like a chaincode output (this would happen if your chaincode is under `go/` folder say "go/mychaincode.go" and did a `go build` there)... so the above output just confuses the issue. I assume your intention with `go version` is to show some information about the `go` env and not to run the chaincode. Secondly (and this includes @mogarg issue as well..) not sure why you think its a vendoring issue. You should look at the peer logs during instantiate ..if the chaincode built successfully, then its NOT a vendoring issue. The other possibility is the chaincode crashed for some reason. you should be able to look at logs - both peer and chaincode - and other tell tale signs (exited container for example) to determine root cause

mulser (Wed, 08 Aug 2018 08:31:39 GMT):
Has joined the channel.

knagware9 (Wed, 08 Aug 2018 08:47:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=YZH6M4HLaia5vSzQA) U

coveloper (Wed, 08 Aug 2018 17:29:33 GMT):
Has joined the channel.

sarah (Wed, 08 Aug 2018 21:07:55 GMT):
I'm having a strange and seemingly out of the blue issue that persists even as I revert to commits that were stable. When instantiating CC on a channel, I'm providing the endorsement policy as usual, but am getting this error in the peer logs: `NO_MATCHING_CERTIFICATE_AUTHORITY_ENTITY. Description: premature execution - chaincode (exchangeCC:0) launched and waiting for registration`. I've tried to view the endorsers for the channel using the `discovery CLI`, but it's returning only: unknown service discovery.Discovery. I used `discover` to create the `conf.yaml` successfully. Anyone encountered a similar issue?

sarah (Wed, 08 Aug 2018 21:07:55 GMT):
I'm having a strange and seemingly out of the blue issue that persists even as I revert to commits that were stable. When instantiating CC on a channel, I'm providing the endorsement policy as usual, but am getting this error in the peer logs: `NO_MATCHING_CERTIFICATE_AUTHORITY_ENTITY. Description: premature execution - chaincode (exchangeCC:0) launched and waiting for registration`. I've tried to view the endorsers for the channel using the `discovery CLI`, but it's returning only `unknown service discovery.Discovery`. I used `discover` to create the `conf.yaml` successfully. Anyone encountered a similar issue?

yacovm (Wed, 08 Aug 2018 22:15:16 GMT):
unknown service? Sounds like you're not using v1.2 @sarah

yacovm (Wed, 08 Aug 2018 22:15:33 GMT):
or you've landed on the wrong port

yacovm (Wed, 08 Aug 2018 22:15:38 GMT):
or the wrong process

messicy (Thu, 09 Aug 2018 03:01:36 GMT):
Has joined the channel.

zjubfd (Thu, 09 Aug 2018 06:24:21 GMT):
Has joined the channel.

zjubfd (Thu, 09 Aug 2018 06:25:22 GMT):
Do fabric support to write a chaincode that org1 can read and write ledger, however org2 can only read

edevil (Thu, 09 Aug 2018 12:58:38 GMT):
I'm trying to use ABAC in my chaincode, but can't seem to pass a certificate when using the shim stub. Is this not possible?

sarah (Thu, 09 Aug 2018 13:57:14 GMT):
@yacovm I checked to make sure they were using v1.2, but now I'm having a larger/different issue. maybe that ^ will sort itself out when I fix the current problem

sarah (Thu, 09 Aug 2018 15:35:47 GMT):
what does it mean when chaincode is "launched and waiting for registration"? registration from whom?

yacovm (Thu, 09 Aug 2018 21:34:18 GMT):
@sarah the chaincode registers itself to the peer

javaprincess0211 (Fri, 10 Aug 2018 00:54:47 GMT):
Has joined the channel.

qsmen (Fri, 10 Aug 2018 03:15:46 GMT):
hi, owner orgs are defined when packaging a chaincode, only org admin can install chaincode on the org's peer. but how to initiate the chaincode? one org admin signature or the majority's signature?THank you.

MichaelShieh (Fri, 10 Aug 2018 04:04:47 GMT):
Has joined the channel.

qsmen (Fri, 10 Aug 2018 04:43:21 GMT):
from the release doc, initiation policy is the same as the endorsement policy. by default, any one org admin can

riccardopersiani (Fri, 10 Aug 2018 08:41:53 GMT):
Hello, when I perform the operation `APIstub.InvokeChaincode`such as `APIstub.InvokeChaincode("fabcar", chainCodeArgs, "mychannel")`; is there a possibility from the chaincode `fabcar`(the chaincode called) to get the *id* of the the caller chaincode? TY. `getCreator()`just return the caller organisation, I want the chaincode id.

salmanbaset (Fri, 10 Aug 2018 13:07:48 GMT):
Has joined the channel.

ahmadzafar (Fri, 10 Aug 2018 13:08:02 GMT):
Has joined the channel.

GowriR (Fri, 10 Aug 2018 14:11:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EdYZL8N9BiWHz66B5) @muralisr thanks so much @muralisr I finally rolled back to an earlier snapshot. Your explanation is nice. I shall try it out.

GowriR (Fri, 10 Aug 2018 14:19:18 GMT):
@muralisr Now am facing a new problem. I have chaincode version 0 installed and instantiated perfectly. Now i want to make a few lines on change in the chaincode and test it again. Hence i install v1 and try to instantiate v1. This fails. Once i remove/stop docker containers and the installed chaincodes from the peer it works. Then i install v0 again and start testing. Is there a better way to do it?

GowriR (Fri, 10 Aug 2018 14:19:43 GMT):
Experts here - I am facing a new problem. I have chaincode version 0 installed and instantiated perfectly. Now i want to make a few lines on change in the chaincode and test it again. Hence i install v1 and try to instantiate v1. This fails. Once i remove/stop docker containers and the installed chaincodes from the peer it works. Then i install v0 again and start testing. Is there a better way to do it?

gmb 2 (Sun, 12 Aug 2018 04:40:58 GMT):
Has joined the channel.

GowriR (Sun, 12 Aug 2018 15:20:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ntvTMYASf35TYBDcT) Any pointers on this issue please

qsmen (Mon, 13 Aug 2018 06:04:47 GMT):
I run "peer chaincode package -n mycc .... " without -i option. According to release 1.2 doc, any org admin of the channel can run "peer chaincode instantiate -n sacc -v 1.0 -c '{"Args":["john","0"]}' -P "AND ('Org1.member','Org2.member' ....". However, the fact is that only the admin who package the chaincode can instanticate the chaincode.

qsmen (Mon, 13 Aug 2018 06:05:17 GMT):
what's the matter? I am wrong or the doc is wrong? Thank you in advance.

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

luckydogchina (Mon, 13 Aug 2018 06:26:05 GMT):

2018-08-13 14-21-26屏幕截图.png

KaranBlockchain (Mon, 13 Aug 2018 08:39:22 GMT):
I am working upon a basic Blockchain POC and I have been able to do following: Installed and started the Hyperledger fabric v1.0 successfully I have list of Docker images running on Fabric hyperledger/fabric-ca, hyperledger/fabric-orderer, hyperledger/fabric-peer, hyperledger/fabric-ccenv , hyperledger/fabric-couchdb I have written Chaincode in go to read and update the ledger and compiled successfully Next - What do I need to do and not able to do and Where I am confused? Register my Chaincode to a peer – How do I find which Peer I need to register I tried to follow this video but it uses YAML and I do not have it and it gives error- https://www.youtube.com/watch?v=76WIJjKNekY&list=PLz3iwtnWFin-yUUgn-zP7KJp0iW0IFas9&index=2 Also followed few more tutorials but still confused what to do https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html Instantiate my Chaincode Query my Chaincode - I will be able to do it once Chaincode is registered and deployed Invoke my Chaincode to update the ledger - Same as above Please help in above step or let me know if there is any good source of clear steps to perform registration and instantiation of chaincode.

KaranBlockchain (Mon, 13 Aug 2018 08:39:22 GMT):
Hi All, I am working upon a basic Blockchain POC and I have been able to do following: Installed and started the Hyperledger fabric v1.0 successfully I have list of Docker images running on Fabric hyperledger/fabric-ca, hyperledger/fabric-orderer, hyperledger/fabric-peer, hyperledger/fabric-ccenv , hyperledger/fabric-couchdb I have written Chaincode in go to read and update the ledger and compiled successfully Next - What do I need to do and not able to do and Where I am confused? Register my Chaincode to a peer – How do I find which Peer I need to register I tried to follow this video but it uses YAML and I do not have it and it gives error- https://www.youtube.com/watch?v=76WIJjKNekY&list=PLz3iwtnWFin-yUUgn-zP7KJp0iW0IFas9&index=2 Also followed few more tutorials but still confused what to do https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html Instantiate my Chaincode Query my Chaincode - I will be able to do it once Chaincode is registered and deployed Invoke my Chaincode to update the ledger - Same as above Please help in above step or let me know if there is any good source of clear steps to perform registration and instantiation of chaincode.

akoenig (Mon, 13 Aug 2018 12:23:50 GMT):
Hi, we have a unitest file for testing the chaincode. And we build the whole application via maven. Have some of you an idea how to run those chaincode tests automaticly via build?

akoenig (Mon, 13 Aug 2018 12:24:10 GMT):
we don't want to use "go test" all the time

GowriR (Mon, 13 Aug 2018 13:27:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DFTRevuxfmgFiZ6YD) Is it because the same function in the same folder though a different version is already running on the channel and now another one cannot be integrated? How do I overcome this? Is it because am in the net mode ? Will going to the Dev mode help?

StefanKosc (Mon, 13 Aug 2018 14:32:06 GMT):
Hi, can chaincode query transactions from the ledger?

mulser (Mon, 13 Aug 2018 16:43:58 GMT):
anyone an idea, how I can create a SignedProposal to call MockStub.MockInvokeWithSignedProposal? or can point me to a tutorial?

VipinB (Mon, 13 Aug 2018 21:17:43 GMT):
Has joined the channel.

kapilV (Tue, 14 Aug 2018 00:19:14 GMT):
Has joined the channel.

qsmen (Tue, 14 Aug 2018 00:58:40 GMT):
oh, nobody responses my question. wrong channel or something else?

KaranBlockchain (Tue, 14 Aug 2018 08:34:16 GMT):
Hi All, I am trying to install chaincode on one peer and trying to do it through CLI but can't see CLI container and instead fabric-ca is there. Can you please help me in installing chaincode on peer? docker instances are as follows : CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 71a086fbb440 hyperledger/fabric-peer:x86_64-1.1.0 "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 5ba2ba6d0320 hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-seâ¦" About a minute ago Up About a minute 0.0.0.0:7054->7054/tcp ca.org1.example.com 1cb39437a72f hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-entâ¦" About a minute ago Up About a minute 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb 52ccd1bd38ed hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" About a minute ago Up About a minute 0.0.0.0:7050->7050/tcp orderer.example.com

PatrickWoodhead (Tue, 14 Aug 2018 10:26:01 GMT):
Has joined the channel.

muralisr (Tue, 14 Aug 2018 13:16:02 GMT):
@KaranBlockchain would need more info... in particular, assuming you are running docker compose file, you probably have a cli service defined there. Would look at how you use that docker file to bring up services

muralisr (Tue, 14 Aug 2018 13:17:25 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wdeguR8PvnDcXihrY

muralisr (Tue, 14 Aug 2018 13:18:43 GMT):
@StefanKosc non-system-chaincodes do not have direct access to ledger .. they have to interact with it via shim interfaces

muralisr (Tue, 14 Aug 2018 13:19:02 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Y9swtZoGjijobQ5Nr

muralisr (Tue, 14 Aug 2018 13:20:34 GMT):
@GowriR the typical approach to installing a new version is to use the "upgrade" command. Alternately you can install a new chaincode name (but won't have access to the previous chaincode's state)

muralisr (Tue, 14 Aug 2018 13:39:00 GMT):
@qsmen not sure what you are running into ...the command `peer chaincode package -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd example02.pack` just generates the package which can be installed on different peers/orgs with the command `peer chaincode install example02.pack`

muralisr (Tue, 14 Aug 2018 13:39:00 GMT):
@qsmen not sure what you are running into. As an example, the command `peer chaincode package -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd example02.pack` just generates the package which can be installed on different peers/orgs with the command `peer chaincode install example02.pack`

KaranBlockchain (Tue, 14 Aug 2018 14:12:30 GMT):
Hi @muralisr I changed my approach slightly and installed sample-networks and I could see the directory ubuntu@ip-172-31-22-155:~/KaranHypeledgerFabric/GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/bin$ ls configtxgen cryptogen fabric-ca-client idemixgen peer configtxlator discover get-docker-images.sh orderer ubuntu@ip-172-31-22-155:~/KaranHypeledgerFabric/GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/bin$ Following which I am manually generating the artifacts but unfortunately cryptogen command is not running and saying cryptogen command not found rFabric/GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/bin$ cryptogen generate --config=./crypto-config.yaml cryptogen: command not found Can you please help me out? Then I will be Creating a Channel Configuration Transaction and starting the network – following which I will Create & Join Channel then update the peer and install chaincode Please confirm if this approach will be fine. I am following below tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html

muralisr (Tue, 14 Aug 2018 16:11:19 GMT):
@KaranBlockchain try the `cryptogen generate --config=./crypto-config.yaml` with a "./" in front as in `./cryptogen generate --config=./crypto-config.yaml` please ... if you are following the procedure in the tutorial, it should otherwise be fine

KaranBlockchain (Wed, 15 Aug 2018 07:31:36 GMT):
Still giving same error - ../github.com/hyperledger/fabric/fabric-samples/fabric-samples/basic-network$ ./cryptogen generate --config=./crypto-config.yaml -bash: ./cryptogen: No such file or directory

KaranBlockchain (Wed, 15 Aug 2018 07:33:33 GMT):
I am using Ubuntu VM

GowriR (Wed, 15 Aug 2018 10:56:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=x2NoHismrfZxcDujB) @muralisr Thanks @muralisr - so the steps would be install and instantiate version 1. Install version 2 and upgrade to version 2. Am I right? If so, I shall try it tomorrow and hope it works. Any pointers on why I see comments from a chain code whose code is commented ? I can’t get a hang on where it is picking it up from

muralisr (Wed, 15 Aug 2018 13:14:15 GMT):
@GowriR ` Any pointers on why I see comments from a chain code whose code is commented ?` - perhaps the old chaincode image is hanging around ?

muralisr (Wed, 15 Aug 2018 13:14:30 GMT):
I'd try cleaning the docker env and try again

davidkhala (Thu, 16 Aug 2018 02:48:05 GMT):
Has joined the channel.

davidkhala (Thu, 16 Aug 2018 02:48:35 GMT):
Is this a good place we can discuss nodejs chaincode?

GowriR (Thu, 16 Aug 2018 03:44:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WFswmXCDuryEida2a) @muralisr Thanks @muralisr - you mean the image or the contatiner created by the peer? I do delete the containers but do not pull the images again

ManuelRauber (Thu, 16 Aug 2018 06:48:20 GMT):
Howdy, yesterday I've updated the Chaincode.NET Shim to support TLS GRPC Connections: - Jira: https://jira.hyperledger.org/browse/FAB-11460 - NuGet: https://www.nuget.org/packages/Thinktecture.HyperledgerFabric.Chaincode - GitHub: https://github.com/thinktecture/fabric-chaincode-netcore/tree/develop

StefanKosc (Thu, 16 Aug 2018 09:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TjikWLqDMGQRBjn72) @muralisr Hi @muralisr, thanks for response, my project requirement is to get parameters of chaincode calls from the past, how can it be achieved?

KaranBlockchain (Thu, 16 Aug 2018 10:24:09 GMT):
Hi, I ran generate.sh file in location fabric-samples/fabric-samples/basic-network$ ls config configtx.yaml crypto-config crypto-config.yaml docker-compose.yml generate.sh init.sh README.md start.sh stop.sh teardown.sh and got below output - /GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/basic-network$ ./generate.sh --config=./crypto-config.yaml org1.example.com 2018-08-16 10:11:55.400 UTC [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'. 2018-08-16 10:11:55.400 UTC [common/tools/configtxgen] main -> INFO 002 Loading configuration 2018-08-16 10:11:55.406 UTC [common/tools/configtxgen/encoder] NewChannelGroup -> WARN 003 Default policy emission is deprecated, please include policy specificiations for the channel group in configtx.yaml 2018-08-16 10:11:55.406 UTC [common/tools/configtxgen/encoder] NewOrdererGroup -> WARN 004 Default policy emission is deprecated, please include policy specificiations for the orderer group in configtx.yaml 2018-08-16 10:11:55.407 UTC [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 005 Default policy emission is deprecated, please include policy specificiations for the orderer org group OrdererOrg in configtx.yaml 2018-08-16 10:11:55.407 UTC [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 006 Default policy emission is deprecated, please include policy specificiations for the orderer org group Org1MSP in configtx.yaml 2018-08-16 10:11:55.407 UTC [common/tools/configtxgen] doOutputBlock -> INFO 007 Generating genesis block 2018-08-16 10:11:55.408 UTC [common/tools/configtxgen] doOutputBlock -> INFO 008 Writing genesis block 2018-08-16 10:11:55.440 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration 2018-08-16 10:11:55.447 UTC [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx 2018-08-16 10:11:55.447 UTC [common/tools/configtxgen/encoder] NewApplicationGroup -> WARN 003 Default policy emission is deprecated, please include policy specificiations for the application group in configtx.yaml 2018-08-16 10:11:55.447 UTC [common/tools/configtxgen/encoder] NewApplicationOrgGroup -> WARN 004 Default policy emission is deprecated, please include policy specificiations for the application org group Org1MSP in configtx.yaml 2018-08-16 10:11:55.448 UTC [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 005 Writing new channel tx 2018-08-16 10:11:55.481 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration 2018-08-16 10:11:55.486 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update 2018-08-16 10:11:55.486 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update I need to confirm if the cryptographic material (x509 certs and signing keys) for our various network entities were generated or not. How can I confirm if I am going in right direction and if I can move forward. Please help regarding this

KaranBlockchain (Thu, 16 Aug 2018 10:28:11 GMT):
Ok. This looks fine - I am able to see the cert files in location fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp. Worked perfectly :) Thanks

RockyRacer (Thu, 16 Aug 2018 12:01:16 GMT):
Hi, I have a doubt, I have installed chaincode on 2 peers of 4 (anchors) but then : - do I need to instantiate it on each peer where it is installed ? or is it done at the channel level (in tutorial they speak about "instantiating chaincode on channel", not on peer) ? - same for upgrading, do we need to upgrade each peer (after having installed new version of chaincode on each) ? or is it done at the channel level too ?

KaranBlockchain (Thu, 16 Aug 2018 12:18:35 GMT):
Ok. So I know what to do now but when I try to install Chaincode on one of my peers it gives and error /GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/first-network$ peer chaincode install -n mycc -v 1.0 -p /home/ubuntu/KaranHypeledgerFabric/GoLang/go/src/ChaincodeExample No command 'peer' found, did you mean: Command 'peet' from package 'pipexec' (universe) Command 'pear' from package 'php-pear' (main) Command 'beer' from package 'gerstensaft' (universe) Command 'pee' from package 'moreutils' (universe) peer: command not found

KaranBlockchain (Thu, 16 Aug 2018 12:18:35 GMT):
Ok. So I know what to do now but when I try to install Chaincode on one of my peers it gives and error /GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/first-network$ peer chaincode install -n mycc -v 1.0 -p /home/ubuntu/KaranHypeledgerFabric/GoLang/go/src/ChaincodeExample No command 'peer' found, did you mean: Command 'peet' from package 'pipexec' (universe) Command 'pear' from package 'php-pear' (main) Command 'beer' from package 'gerstensaft' (universe) Command 'pee' from package 'moreutils' (universe) peer: command not found I do not have any peer.sh with me In my ..../fabric-samples/bin$ folder I have configtxgen cryptogen fabric-ca-client idemixgen peer configtxlator discover get-docker-images.sh orderer as files but I am not sure why it doesn't works

KaranBlockchain (Thu, 16 Aug 2018 12:24:29 GMT):
So I got this error while running Peer command /GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/bin$ ./peer chaincode install -n mycc -v 1.0 -p /home/ubuntu/KaranHypeledgerFabric/GoLang/go/src/ChaincodeExample 2018-08-16 12:21:24.180 UTC [main] main -> ERRO 001 Fatal error when initializing core config : error when reading core config file: Unsupported Config Type ""

jrosmith (Thu, 16 Aug 2018 13:01:41 GMT):
@RockyRacer chaincode is installed on every endorsing peer. instantiation only needs to happen per channel. upgrading a chaincode is really just instantiating a new version. in order to upgrade the new version needs to be installed on every endorsing peering. instantiating the new version only needs to happen per channel.

jrosmith (Thu, 16 Aug 2018 13:01:41 GMT):
@RockyRacer chaincode is installed on every endorsing peer. instantiation only needs to happen once per channel. upgrading a chaincode is really just instantiating a new version. in order to upgrade the new version needs to be installed on every endorsing peering. instantiating the new version only needs to happen once per channel.

muralisr (Thu, 16 Aug 2018 13:08:50 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rSL5ksfe5Ey4w22dG

muralisr (Thu, 16 Aug 2018 13:09:05 GMT):
I did mean trying clearing the images as well @GowriR

muralisr (Thu, 16 Aug 2018 13:09:35 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WMtarsppp6PfXtcHN

RockyRacer (Thu, 16 Aug 2018 13:13:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jjPQKk25hyzav3mJb) @jrosmith Thanks, but the container running the chaincode is created on instantiation right ? For example if I run the instantiation as _peer0.org0_, I get a single container `dev-peer0.org0.example.com-mycc-1.0-xxxxx`

jrosmith (Thu, 16 Aug 2018 13:44:17 GMT):
@RockyRacer the chaincode container is created when a transaction is run against an endorsing peer. the peer that processes the instantiate proposal will run the chaincode's `Init` function. you'll have to run a transaction against the other peers and their respective chaincode containers will appear.

RockyRacer (Thu, 16 Aug 2018 14:54:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kWerP5HMSjg8Ei6SE) @jrosmith OK I started a new network and tried: # install on Org1 peer0 # install on Org1 peer0 # instantiate on Org1 peer0 (this creates a container for Org1 peer0 chaincode) # query ledger from Org2 peer0 (this indeed creates a container for Org2 peer0 chaincode)

RockyRacer (Thu, 16 Aug 2018 14:54:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kWerP5HMSjg8Ei6SE) @jrosmith OK I started a new network and tried: # install chaincode on Org1 peer0 # install chaincode on Org2 peer0 # instantiate chaincode on Org1 peer0 (this creates a container for Org1 peer0 chaincode) # query ledger from Org2 peer0 (this indeed creates a container for Org2 peer0 chaincode)

RockyRacer (Thu, 16 Aug 2018 14:54:49 GMT):
So you are right, I was confused about this, this is clearer now, thank you :)

RockyRacer (Fri, 17 Aug 2018 07:07:22 GMT):
I have another question : When did the chaincode build occurs ? I have a Go chaincode, when I update the code I never need to rebuild (`go build`), I just upgrade the chaincode on the channel and see the modifications. Is a build performed on install/instantiate/upgrade ?

RockyRacer (Fri, 17 Aug 2018 07:07:22 GMT):
I have 2 more questions : 1 - When did the chaincode build occurs ? I have a Go chaincode, when I update the code I never need to rebuild (`go build`), I just upgrade the chaincode on the channel and see the modifications. Is a build performed on install/instantiate/upgrade ? 2 - When I upgrade chaincode, it runs new containers for the new version, but old containers holding the old version are still running, what is the purpose of this? Do we have to do some container cleaning after multiple upgrades ?

Akash-digiledge (Fri, 17 Aug 2018 10:10:16 GMT):
Has joined the channel.

Akash-digiledge (Fri, 17 Aug 2018 10:11:01 GMT):
Hello, am storing date along with data in my hlf so how can i query the data by using date.(Before that date, after that date)..please help me....

RockyRacer (Fri, 17 Aug 2018 12:27:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=APsRuKPBcy3gG8oiw) @Akash-digiledge If you are using couchDB, you can do rich queries in JSON format. I think you have to create a map/view, then use startkey and endkey to deal with dates. See [CouchDB documentation](http://docs.couchdb.org/en/stable/ddocs/views/intro.html)

RockyRacer (Fri, 17 Aug 2018 12:27:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=APsRuKPBcy3gG8oiw) @Akash-digiledge If you are using couchDB, you can do rich queries in JSON format. I think you have to create an index and use a map/view, then use `startkey` and `endkey` to deal with dates. See [Hyperledger](https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html#create-an-index) and [CouchDB](http://docs.couchdb.org/en/stable/ddocs/views/intro.html) documentation

KaranBlockchain (Fri, 17 Aug 2018 12:50:30 GMT):
I ran a command for generating certs and keys - /KaranHypeledgerFabric/GoLang/go/src/github.com/hyperleddger/fabric/fabric-samples/fabric-samples/bin$ ./cryptogen generate --config=/home/ubuntu/KaranHypeledgerFabric/GoLang/go/src/github.com/hyperledger/fabric/fabric-samples/fabric-samples/first-network/crypto-config.yaml and got below successful result org1.example.com org2.example.com But no folder was created containing the MSP files and I am not able to invoke the configtxgen tool to create the orderer genesis block because of non availability of these files. Any idea how this can be resolved?

KaranBlockchain (Fri, 17 Aug 2018 14:48:45 GMT):
root@da6b00718843:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c Karanchannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto /ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tl sca.example.com-cert.pem Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded ``` Any help will be appreciated ```

KaranBlockchain (Fri, 17 Aug 2018 14:48:45 GMT):
``` I am trying to create and configure channel I created and getting below error ``` root@da6b00718843:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c Karanchannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto /ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tl sca.example.com-cert.pem Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded ``` Any help will be appreciated ```

coffeeplease (Fri, 17 Aug 2018 15:30:08 GMT):
Has joined the channel.

coffeeplease (Fri, 17 Aug 2018 15:30:51 GMT):
In 1.1, it doesn't appear as though you can deploy your own custom ESCC/VSCC as mentioned in https://jira.hyperledger.org/browse/FAB-8729

coffeeplease (Fri, 17 Aug 2018 15:31:55 GMT):
But with the new pluggable architecture, I don't see how I can obtain access to the `ChaincodeStubInterface` to handle custom logic based on passed transaction params

coffeeplease (Fri, 17 Aug 2018 15:32:18 GMT):
i.e. how the old pluggable chaincode architecture extended the `Chaincode interface`

coffeeplease (Fri, 17 Aug 2018 15:32:59 GMT):
Is it possible to gain access to the `ChaincodeStubInterface` with the data from the new method signatures?

coffeeplease (Fri, 17 Aug 2018 15:33:28 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.2/pluggable_endorsement_and_validation.html

coffeeplease (Fri, 17 Aug 2018 15:33:46 GMT):
`Endorse(payload []byte, sp *peer.SignedProposal) (*peer.Endorsement, []byte, error)`

coffeeplease (Fri, 17 Aug 2018 15:34:04 GMT):
`Validate(block *common.Block, namespace string, txPosition int, actionPosition int, contextData ...ContextDatum) error`

coffeeplease (Fri, 17 Aug 2018 15:38:05 GMT):
specifically, I want access to something like `args := stub.GetStringArgs()`

coffeeplease (Fri, 17 Aug 2018 18:16:16 GMT):
(or even just the payload's composite key / index name)

GowriR (Sat, 18 Aug 2018 16:29:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AuTjTndSCSPubuXQs) @muralisr Thanks. I shall try that

minskeyguo (Sat, 18 Aug 2018 20:26:49 GMT):
Has joined the channel.

larry618 (Sun, 19 Aug 2018 07:40:43 GMT):
Has joined the channel.

larry618 (Sun, 19 Aug 2018 07:58:16 GMT):
Hi there, I have a question is there any function to get the current ledger blocks height?

muralisr (Sun, 19 Aug 2018 12:40:49 GMT):
@lary

muralisr (Sun, 19 Aug 2018 12:42:07 GMT):
@larry618 the query system chaincode has a "GetBlockByNumber" function which will get you the latest block if you pass math.MaxUint64

larry618 (Sun, 19 Aug 2018 19:43:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qGmQ5nYp8X9svEtJf) @muralisr Thanks, I shall try that😄

kjroger94 (Mon, 20 Aug 2018 05:21:04 GMT):
Has joined the channel.

kjroger94 (Mon, 20 Aug 2018 05:30:54 GMT):
`path/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:21:2: use of vendored package not allowed` what does this mean?

gvorsanger (Mon, 20 Aug 2018 14:58:08 GMT):
Has joined the channel.

harryc (Mon, 20 Aug 2018 22:40:15 GMT):
Has joined the channel.

huikang (Tue, 21 Aug 2018 03:24:36 GMT):
Has joined the channel.

huikang (Tue, 21 Aug 2018 03:26:01 GMT):
Hi, does anyone know where I can find the _fabric coin_ example code in the Fabric Eurosys 2018 paper?

KaranBlockchain (Tue, 21 Aug 2018 11:38:51 GMT):
Hi All,

KaranBlockchain (Tue, 21 Aug 2018 11:47:04 GMT):
Hi All, I am in process of creating a channel and running commands: export CHANNEL_NAME=KaranChannel peer channel create -o orderer.example.com:7050 -c KaranChannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem but I am getting an 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 ``` Can anyone please help? ```

KaranBlockchain (Tue, 21 Aug 2018 11:47:04 GMT):
Hi All, I am in process of creating a channel and running commands: export CHANNEL_NAME=KaranChannel peer channel create -o orderer.example.com:7050 -c KaranChannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem but I am getting an 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 ``` Can anyone please help? ```

KaranBlockchain (Tue, 21 Aug 2018 11:47:04 GMT):
Hi All, I am in process of creating a channel and running commands: export CHANNEL_NAME=KaranChannel peer channel create -o orderer.example.com:7050 -c KaranChannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem but I am getting an 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 ``` Can anyone please help? ```

KaranBlockchain (Tue, 21 Aug 2018 11:47:04 GMT):
Hi All, I am in process of creating a channel and running commands: export CHANNEL_NAME=KaranChannel peer channel create -o orderer.example.com:7050 -c KaranChannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem but I am getting an 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 anyone please help? ```

KaranBlockchain (Tue, 21 Aug 2018 11:47:04 GMT):
Hi All, I am in process of creating a channel and running commands: export CHANNEL_NAME=KaranChannel peer channel create -o orderer.example.com:7050 -c KaranChannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem but I am getting an 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 ``` Can anyone please help?

KaranBlockchain (Tue, 21 Aug 2018 12:24:57 GMT):
I ran root@ee3d5f90f4ff:/opt/gopath/src/github.com/hyperledger/fabric/peer# cat /etc/hosts and got below details for my container, still it doesn't helps me out for how to resolve the above error: ``` 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.19.0.7 ee3d5f90f4ff```

EdProsser (Tue, 21 Aug 2018 14:47:43 GMT):
Has joined the channel.

bdjidi (Tue, 21 Aug 2018 22:47:39 GMT):
Has joined the channel.

yangxier (Wed, 22 Aug 2018 01:58:41 GMT):
Has joined the channel.

johnlohith (Wed, 22 Aug 2018 05:59:57 GMT):
Is there any way to get history of private data using the node SDK for chaincode?

johnlohith (Wed, 22 Aug 2018 06:00:22 GMT):
I've tried using getHistoryForKey(key) but it doesn't work

OviiyaDominic (Wed, 22 Aug 2018 08:39:07 GMT):
Has joined the channel.

rthatcher (Wed, 22 Aug 2018 10:23:08 GMT):
Has joined the channel.

dave.enyeart (Wed, 22 Aug 2018 12:10:02 GMT):
History for private data is intended but not available yet - you can track that feature at https://jira.hyperledger.org/browse/FAB-5094

Legiit (Wed, 22 Aug 2018 13:03:11 GMT):
how do I do a putState and return the object? I return the result of putState, but in my app the eventhub only gives back the txId and statuscode, how could I show the object which was persisted?

jvsclp (Wed, 22 Aug 2018 21:40:55 GMT):
Has joined the channel.

maz_net_au (Thu, 23 Aug 2018 05:01:27 GMT):
Has joined the channel.

kjroger94 (Thu, 23 Aug 2018 06:49:05 GMT):
`// collections_config.json [ { "name": "collectionMarbles", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000 }, { "name": "collectionMarblePrivateDetails", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":3 } ]` here there are 2 policies specified, how do we control which is used when ?

zerppen (Thu, 23 Aug 2018 10:35:43 GMT):
I got a problem that my chaincode executing well but qscc time out .Here is the description: https://jira.hyperledger.org/browse/FAB-10540

grsind19 (Thu, 23 Aug 2018 20:18:19 GMT):
Has joined the channel.

Shaun.Lynch (Fri, 24 Aug 2018 09:17:43 GMT):
Has joined the channel.

Shaun.Lynch (Fri, 24 Aug 2018 09:19:29 GMT):
Hey all, I'm conducting some research into Hyperledger Fabric to better understand the developer experience. The data will be used to understand what kind of developers use Hyperledger Fabric aswell as what learning methods and tooling are generally used. I'm also interested in what it's like to pick up learning Chaincode. Any further questions about the survey I'm happy to answer 😁 https://www.surveygizmo.com/s3/4499667/Blockchain-Developer-Community-Survey

pkarolis (Fri, 24 Aug 2018 10:44:46 GMT):
I was trying to corrupt peer state db and see if my ongoing transactions will be rejected. They were not rejected. My test: running two peers on Hyperledger fabric network with on 1.2 version. I create two objects. Key1>User1 and Key2>UserCompany1. On peer2 couchdb I delete Key2 for UserCompany1. I create a transaction on peer1 which updates object User1. Transaction is successfully committed to network. Given peer2 hasn't got Key2 for UserCompany changes to User1 are not replicated on peer2. However, i don't see any logs indicating this second block was invalid and could not be added to peer2. Update on peer2 is not available either on leveldb or couchdb. I understand Read-Write set check fails validaton on peer2 and hence trx not committed. But I have no of knowing it has failed. how do I make sure that peer2 does not get out out of sync with peer1? Is there a way to find it?

dave.enyeart (Fri, 24 Aug 2018 10:54:52 GMT):
Fabric uses an endorsement policy where peers from different orgs must return the same results for transactions to be validated. If ledger state data had been altered or corrupted (in CouchDB or LevelDB file system) on a peer, then the transaction results would be inconsistent across endorsing peers, the 'bad’ peer/org will be found out, and the application client can throw out the results from the bad peer/org before submitting the transaction for ordering/commit. If client application tries to submit a transaction with inconsistent endorsement regardless, this will be detected on all the peers at validation time and the transaction will be invalidated. If you are doing read-only queries rather than update transactions, then you can similarly query multiple endorsing peers and verify the results from each are consistent. If there is doubt about state database integrity, the state database can be dropped and it will automatically get regenerated from the chain source of truth upon peer restart. If there is doubt about the chain integrity itself, you can run a verification utility to scan the ledger to check its hashes and overall integrity, one such utility can be found here: https://github.com/C0rWin/ledgerfsck. If you find the peer has been corrupted or tampered during the verification check, then the peer itself will need to be rebuilt and the chain will be the transferred from another peer upon re-joining the channel.

Rachit_gaur (Fri, 24 Aug 2018 11:00:34 GMT):
Hi, I have added anchor peers to a channel, do i have to add the other peers as well if they will also be querying the chaincode ?

KaranBlockchain (Fri, 24 Aug 2018 13:49:41 GMT):
I am running script ./byfn.sh up using tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html and none of my peers are getting connected. Can anyone please help and suggest? I am getting below error : ``` 2018-08-24 13:31:09.433 UTC [cli/common] readBlock -> INFO 004 Received block: 0 ===================== Channel 'mychannel' created ===================== Having all peers join the channel... + peer channel join -b mychannel.block + res=1 + set +x Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded peer0.org1 failed to join the channel, Retry after 3 seconds + peer channel join -b mychannel.block + res=1 + set +x Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded peer0.org1 failed to join the channel, Retry after 3 seconds + peer channel join -b mychannel.block + res=1 + set +x Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded peer0.org1 failed to join the channel, Retry after 3 seconds + peer channel join -b mychannel.block + res=1 + set +x Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded peer0.org1 failed to join the channel, Retry after 3 seconds + peer channel join -b mychannel.block + res=1 + set +x Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded !!!!!!!!!!!!!!! After 5 attempts, peer0.org1 has failed to join channel 'mychannel' !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario =========== ERROR !!!! Test failed ```

muralisr (Fri, 24 Aug 2018 22:57:49 GMT):
@KaranBlockchain need more information ...but offhand failures in running canned samples could well be due to enviromental issues (assuming you have not made changes)

muralisr (Fri, 24 Aug 2018 22:57:58 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9cXWXGqZKPsz3KYPt

muralisr (Fri, 24 Aug 2018 22:58:26 GMT):
typically you should not have to @Rachit_gaur ...are you running into any issues or is that just a general question ?

SarahM (Sat, 25 Aug 2018 17:45:10 GMT):
Has joined the channel.

Rachit_gaur (Mon, 27 Aug 2018 05:19:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3zBHCfuCtjpxsxrtD) @muralisr i am running the Marbles_private example provided by hyperledger to get my hands on with the private db concept, i have anchor peer0 of both orgs joined to a channel and if i execute query from peer1 it results into endorsement failure Later i added peer1 as well to the channel and then the query works fine... Does that mean i have to add all the peers to the channel or just the anchor peers? did i miss something? the gossip protocol was enabled to be dynamic when i faced this issue

Rachit_gaur (Mon, 27 Aug 2018 05:38:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=N2QG8mMjN8y8cS7cR) @muralisr i am running the Marbles_private example provided by hyperledger to get my hands on with the private db concept, i have anchor peer0 of both orgs joined to a channel and if i execute query from peer1 it results into endorsement failure Later i added peer1 as well to the channel and then the query works fine... Does that mean i have to add all the peers to the channel or just the anchor peers? did i miss something? the gossip protocol was enabled to be dynamic when i faced this issue

NagatoPeinI1 (Mon, 27 Aug 2018 06:56:19 GMT):
Has joined the channel.

NagatoPeinI1 (Mon, 27 Aug 2018 06:57:44 GMT):
I was trying to invoke one chaincode which is shown installed when i see docker logs of cli container but when i run command inside the peer container it will give this error root@c126dea43168:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode list -C globalchannel --instantiated 2018-08-27 06:47:17.756 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-08-27 06:47:17.756 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-08-27 06:47:17.757 UTC [msp/identity] Sign -> DEBU 003 Sign: plaintext: 0AD2070A6B08031A0C08F5BC8EDC0510...0F0A0D676574636861696E636F646573 2018-08-27 06:47:17.757 UTC [msp/identity] Sign -> DEBU 004 Sign: digest: A3D9B639893832279A0F5A0270E403349AB35E09A3B73BA50352C33654EAF112 Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: 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]) Usage: peer chaincode list [flags]

NagatoPeinI1 (Mon, 27 Aug 2018 06:58:18 GMT):
both for: peer chaincode list -C globalchannel --installed, peer chaincode list -C globalchannel --instantiated

NagatoPeinI1 (Mon, 27 Aug 2018 06:59:26 GMT):
and in UI end it will get this error:

NagatoPeinI1 (Mon, 27 Aug 2018 06:59:30 GMT):
[2018-08-27T06:44:52.496] [DEBUG] Helper - [DiscoveryEndorsementHandler]: endorse - start [2018-08-27T06:44:52.496] [DEBUG] Helper - [DiscoveryEndorsementHandler]: endorse - no discovery results [object Object] [2018-08-27T06:44:52.497] [DEBUG] Helper - [DiscoveryEndorsementHandler]: endorse - not using discovery error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: make sure the chaincode AabcdCC has been successfully instantiated and try again: could not find chaincode with name 'AbcdCC'

Rachit_gaur (Tue, 28 Aug 2018 06:23:31 GMT):
I want to save my key values dynamically from my JSON response , Is there a way to do so?

RobertDiebels (Tue, 28 Aug 2018 11:56:48 GMT):
@NagatoPeinI1 Did you instantiate the chaincode as well? Just installing is not enough.

RobertDiebels (Tue, 28 Aug 2018 11:57:45 GMT):
I'm actually getting the same error message. Even-though I did instantiate: `could not find chaincode with name`. Verified the existence of the chaincode container using `docker ps -a` and it's been up for about an hour. Still getting an error from the peer however. Anyone got a clue on this?

akoenig (Tue, 28 Aug 2018 13:04:13 GMT):
Hi, when we call call "go get" for HLF the version from 1.2 is called. Even if we use HLF 1.1 - is there a way to get the version 1.1 via "go get [version number]" or something like this?

gravity (Tue, 28 Aug 2018 13:36:47 GMT):
Has joined the channel.

gravity (Tue, 28 Aug 2018 13:42:22 GMT):
Hi all I've run `go-get` to download `github.com/hyperledger/fabric/core/chaincode/shim` and `github.com/hyperledger/fabric/protos/peer` to download required libs for a chaincode development but as I can see, an entire repo is downloaded from `github.com/hyperledger/fabric`. is it really needed to be downloaded? and there is one more question: is it a good practice to store that vendor packages (from repos above) with the chaincode project in VCS? for example, if I want to stick to v 1.2, I have to store these libs, because after another release, `go-get` will download a newer version

DiegoLeal (Tue, 28 Aug 2018 14:19:19 GMT):
Has joined the channel.

Shaun.Lynch (Tue, 28 Aug 2018 15:42:07 GMT):
Hey all, I'm conducting some research into Hyperledger Fabric to better understand the developer experience. The data will be used to understand what kind of developers use Hyperledger Fabric aswell as what learning methods and tooling are generally used. Any further questions about the survey I'm happy to answer 😁 https://www.surveygizmo.com/s3/4499667/Blockchain-Developer-Community-Survey

leoleo (Tue, 28 Aug 2018 16:23:12 GMT):
Has joined the channel.

Rachit_gaur (Wed, 29 Aug 2018 05:08:34 GMT):
Hi guys, Is there some parameter to change just the display name of the organizations org1 and org2 instead of changing every occurrence of them? Regards

Maryam1011 (Wed, 29 Aug 2018 07:05:40 GMT):
Has joined the channel.

KaranBlockchain (Wed, 29 Aug 2018 08:45:05 GMT):
Hi All, I have installed my chaincode on one of the peers and instantiated it. Now I want to undeploy and uninstall it and install another chaincode on the that peer. Can anyone please explain me how that can be done?

KaranBlockchain (Wed, 29 Aug 2018 09:40:57 GMT):
I have a chaincode to deploy and a function 'CreateUser' in my chaincode and I am trying to instantiate my chaincode using below statement: ``` peer chaincode instantiate -o orderer.example.com:7050 --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 -C karanchannel -n mycc -v 1.0 -c '{"CreateUser":["init","Username", "FirstUserKaran", "UsernameInput","Y"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" ``` However I am recieving below error: ``` Error: non-empty JSON chaincode parameters must contain the following keys: 'Args' or 'Function' and 'Args' Usage: peer chaincode instantiate [flags] ``` Can anyone please help?

KaranBlockchain (Wed, 29 Aug 2018 09:53:35 GMT):
Hi All, I am trying to query using my chaincode and unfortunately getting an error. I am using below statement for calling a function 'Checkuploadstatus' which is there in my chaincode. I am recieving below error: "Error: endorsement failure during query. response: status:500 message:"invalid function Checkuploadstatus". Here is my function both query and Checkuploadstatus: ``` func Checkuploadstatus(stub shim.ChaincodeStubInterface, args []string) pb.Response { logger.Debug("Entering supplychain application") if len(args) < 1 { logger.Error("Invalid number of arguments") return shim.Error("Missing details") } var Fileuploadedstatusforuser = args[0] bytes, err := stub.GetState(Fileuploadedstatusforuser) if err != nil { logger.Error("Could not fetch Fileuploadedstatus with "+ Fileuploadedstatusforuser +" from ledger", err) return shim.Error(err.Error()) } return shim.Success(bytes) func (t *SampleChaincode) Query(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() if function == "Checkuploadstatus" { return Checkuploadstatus(stub, args) } return shim.Success(nil) ``` Please help

cgftang (Wed, 29 Aug 2018 10:11:56 GMT):
Has joined the channel.

ManuelRauber (Wed, 29 Aug 2018 10:27:19 GMT):
Howdy, I just updated the .NET Core Chaincode Shim to include the upcoming Contracts-Based API. If you want to try it out, you can :) - GitHub: https://github.com/thinktecture/fabric-chaincode-netcore/tree/develop - NuGet: https://www.nuget.org/packages/Thinktecture.HyperledgerFabric.Chaincode

lucky114407 (Wed, 29 Aug 2018 10:49:06 GMT):
Has joined the channel.

sstone1 (Wed, 29 Aug 2018 12:37:15 GMT):
@ManuelRauber this is awesome :+1: definetly gonna try it out when i get a chance

ManuelRauber (Wed, 29 Aug 2018 13:01:39 GMT):
@sstone1 Thanks! :) Still highly experimental, but working with a dev hlf network

ArianStef (Wed, 29 Aug 2018 15:52:46 GMT):
Has joined the channel.

ArianStef (Wed, 29 Aug 2018 15:53:11 GMT):
Hi team! I have a question about peer container during the instantiation of a chaincode. Recall the example "Build your first network", the chain code is instantiated on peer0.org2 and this “instantiation” results in a container by the name of dev-peer0.org2.example.com-mycc-1.0. Is this because peer0.org2 was the last peer in which the chaincode was installed? There is another reason? Please help me. You can find this topic at pag 100-103 of this file https://media.readthedocs.org/pdf/hyperledger-fabric/latest/hyperledger-fabric.pdf

Russ.corsha (Wed, 29 Aug 2018 16:06:43 GMT):
quick question, is the system chaincode QSCC installed by default, or do I have to edit fabric config files to call it?

Russ.corsha (Wed, 29 Aug 2018 16:06:43 GMT):
quick question, is the system chaincode QSCC installed by default, or do I have to edit fabric config files to call it?

Russ.corsha (Wed, 29 Aug 2018 16:06:43 GMT):
quick question, is the system chaincode QSCC installed by default, or do I have to edit fabric config files to call it? Also, is it considered bad practice to call system chaincode from my own personal chaincode?

Russ.corsha (Wed, 29 Aug 2018 16:06:43 GMT):
quick question, is the system chaincode QSCC installed by default, or do I have to edit fabric config files to call it? Also, is it considered bad practice to call system chaincode from my own personal chaincode? Should I copy QSCC's implementation instead?

NilsPe (Wed, 29 Aug 2018 16:37:47 GMT):
Hi, anyone here using dep for vendoring? "dep init" produces: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) anyone knows how to handle this?

NilsPe (Wed, 29 Aug 2018 17:00:53 GMT):
Maybe some more info I found on the way, looks to me like protobuf and fabric packages do not get along: $ dep init -v -skip-tools Getting direct dependencies... Checked 2 directories for packages. Found 2 direct dependencies. Caching package "github.com/golang/protobuf" Caching package "github.com/hyperledger/fabric" Successfully cached all deps. Root project is "chaincode/mavericks" 2 transitively valid internal packages 4 external packages imported from 2 projects (0) ✓ select (root) (1) ? attempt github.com/golang/protobuf with 1 pkgs; 6 versions to try (1) try github.com/golang/protobuf@v1.2.0 (1) ✓ select github.com/golang/protobuf@v1.2.0 w/2 pkgs (2) ? attempt github.com/hyperledger/fabric with 3 pkgs; 29 versions to try (2) try github.com/hyperledger/fabric@v1.2.0 (3) ✗ github.com/hyperledger/fabric@v1.2.0 depends on github.com/golang/protobuf with fec3b39b059c0f88fa6b20f5ed012b1aa203a8b4, but that's already selected at v1.2.0 (2) try github.com/hyperledger/fabric@v1.1.1

Russ.corsha (Wed, 29 Aug 2018 19:20:30 GMT):
hey guys, how do i read the results of this command line query? Thanks! ``` $peer chaincode query -C firstchannel -n qscc -c '{"Args":["GetChainInfo","firstchannel"]}' 2018-08-29 19:18:28.457 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-08-29 19:18:28.457 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Query Result: EƁ]~d????q1=Yv??mds?59??? ??x??2M#a?ig???_?u?ol?l ```

Russ.corsha (Wed, 29 Aug 2018 19:21:11 GMT):
seems to be a serialization issue

kylekim (Thu, 30 Aug 2018 03:19:46 GMT):
Has joined the channel.

Rachit_gaur (Thu, 30 Aug 2018 05:15:38 GMT):
how do i setup fabric network on different machines?

anchit (Thu, 30 Aug 2018 07:17:49 GMT):
Has joined the channel.

phylisc (Thu, 30 Aug 2018 07:37:30 GMT):
Has joined the channel.

StefanKosc (Thu, 30 Aug 2018 10:23:10 GMT):
Hi, during one chaincode invoke I want to make two putStates, can I do it concurrently?

davidkel (Thu, 30 Aug 2018 10:44:03 GMT):
@StefanKosc which language ?

StefanKosc (Thu, 30 Aug 2018 10:45:40 GMT):
@davidkel golang

davidkel (Thu, 30 Aug 2018 10:47:59 GMT):
@StefanKosc Ah, ok I could have provided an answer for the node stuff, I'm guessing you can't do it in Go

davidkel (Thu, 30 Aug 2018 10:47:59 GMT):
@StefanKosc Ah, ok I could have provided an answer for the node stuff, I'm guessing that if you tried to find a way to do it in Go, it will not work as expected.

StefanKosc (Thu, 30 Aug 2018 10:50:44 GMT):
@davidkel ok

rajanashutosh (Thu, 30 Aug 2018 10:51:13 GMT):
Hi All, Just wanted to understand one detail. Is it best practice or suggestible to invoke QSCC chaincode in order to retrieve block information from another chaincode or its meant only to be invoked by SDKs

rajanashutosh (Thu, 30 Aug 2018 10:54:03 GMT):
We are facing weird issue where if in case we try to retrieve information from API via qscc directly we are getting Qscc chaincode exit timed-out.

KaranBlockchain (Thu, 30 Aug 2018 15:29:59 GMT):
All, I have created, installed, instantiated and invoked chaincode successfully on a test network with 4 peers. I have an external UI application as well which I want to integrate with my chaincode. I have no idea what to do now. Can anyone please provide leads for going forward for how can I use REST api's to make call from my chaincode and how I can invoke or query the chaincode(pass parameters to chaincode and read results from chaincode)

KaranBlockchain (Thu, 30 Aug 2018 15:29:59 GMT):
All, I have created, installed, instantiated and invoked chaincode successfully on a test network with 4 peers. I have an external UI application as well which I want to integrate with my chaincode. I have no idea what to do now. Can anyone please provide leads for going forward and how can I use REST api's to make call from my chaincode and how I can invoke or query the chaincode(pass parameters to chaincode and read results from chaincode) are there any tutorials or examples for this? I do not want to use Hyperledger composer. I am working upon creating my own blockchain based application with UI

KaranBlockchain (Thu, 30 Aug 2018 15:29:59 GMT):
Hi All, I have created, installed, instantiated and invoked chaincode successfully on a test network with 4 peers. I have an external UI application as well which I want to integrate with my chaincode. I have no idea what to do now. Can anyone please provide leads for going forward and how can I use REST api's to make call from my chaincode and how I can invoke or query the chaincode(pass parameters to chaincode and read results from chaincode) are there any tutorials or examples for this? I do not want to use Hyperledger composer. I am working upon creating my own blockchain based application with UI

jdfigure (Thu, 30 Aug 2018 17:38:15 GMT):
Has joined the channel.

KaranBlockchain (Thu, 30 Aug 2018 18:15:44 GMT):
Hi All, I am trying to work upon Fabcar and and while installing npm following https://hyperledger-fabric.readthedocs.io/en/release-1.2/write_first_app.html. However I am running into an error ``` npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pkcs11js@1.0.16 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.16 install script. ```

KaranBlockchain (Thu, 30 Aug 2018 18:15:44 GMT):
Hi All, I am trying to work upon Fabcar and and while installing npm following https://hyperledger-fabric.readthedocs.io/en/release-1.2/write_first_app.html. However I am running into an error ``` npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pkcs11js@1.0.16 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.16 install script. ``` Anyone have any idea how resolve this?

KaranBlockchain (Thu, 30 Aug 2018 18:15:44 GMT):
Hi All, I am trying to work upon Fabcar and and while installing npm following https://hyperledger-fabric.readthedocs.io/en/release-1.2/write_first_app.html. However I am running into an error ``` npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pkcs11js@1.0.16 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pkcs11js@1.0.16 install script. ``` any idea how resolve this?

iramiller (Thu, 30 Aug 2018 18:46:07 GMT):
Has joined the channel.

parsiya (Thu, 30 Aug 2018 19:01:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4JcMHmTid4mj284nX) @KaranBlockchain You need to install `node-gyp` which needs g++ and make. If you are using a Debian based distro: ``` sudo apt-get install make g++ sudo npm install -g node-gyp ```

parsiya (Thu, 30 Aug 2018 19:15:03 GMT):
There's also a #fabric-samples channel for sample help.

KaranBlockchain (Thu, 30 Aug 2018 20:20:13 GMT):
Yes running sudo apt install build-essential g++ helped in resolving this issue and I ran Fabcar but I am still far away in developing a web based application/ GUI based application :( any idea or anyexample?

KaranBlockchain (Thu, 30 Aug 2018 20:20:13 GMT):
@parsiya Thanks. Yes running sudo apt install build-essential g++ helped in resolving this issue and I ran Fabcar but I am still far away in developing a web based application/ GUI based application :( any idea or anyexample?

parsiya (Thu, 30 Aug 2018 22:26:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ftqLd8wnEaZN5pnbN) @KaranBlockchain I am a security engineer so I not the best person to give you advice on development. But see this webapp, uses Go chaincode: https://github.com/IBM/build-blockchain-insurance-app

parsiya (Thu, 30 Aug 2018 22:26:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ftqLd8wnEaZN5pnbN) @KaranBlockchain I am a security engineer, not the best person to give you advice on development. But see this webapp, uses Go chaincode: https://github.com/IBM/build-blockchain-insurance-app

parsiya (Thu, 30 Aug 2018 22:28:54 GMT):
Fair warning: The chaincode for that app is horribly insecure.

davidkhala (Fri, 31 Aug 2018 05:02:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9zPQS4Qofvht6LWBZ) @StefanKosc According to fabric mechanism, only the later call of `putStates` will take effect in proposal response. The first one will be overwritten

Rachit_gaur (Fri, 31 Aug 2018 06:54:48 GMT):
I'd like to backtrace from my latest transaction such that i can get all the status of previous transaction, How can i do this?

Rachit_gaur (Fri, 31 Aug 2018 10:42:29 GMT):
block is created after every transaction even when the orderer settings are modified to support more size and timeouts Can someone help me with this?

parsiya (Fri, 31 Aug 2018 15:39:57 GMT):
@PradeepC "[are] there any tool kits that help with the Go or Node.js. or we have write them from scratch" For writing Chaincode, you can look at examples. There are a few examples out there: * Chaincode tutorial: https://hyperledger-fabric.readthedocs.io/en/release-1.2/chaincode4ade.html * Fabric-samples: https://github.com/hyperledger/fabric-samples - there's also a channel #fabric-samples Supposedly [Composer](https://hyperledger.github.io/composer/latest/) generates chaincode code but I have never used it.

PradeepC (Fri, 31 Aug 2018 15:39:58 GMT):
Has joined the channel.

PradeepC (Fri, 31 Aug 2018 15:42:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oaYBSKzv4thz7FJy3) @parsiya thank you, will follow the links shared.

SMiskey (Sun, 02 Sep 2018 18:50:05 GMT):
Has joined the channel.

draysams (Sun, 02 Sep 2018 19:25:56 GMT):
Has joined the channel.

BhavathiReddy (Mon, 03 Sep 2018 06:32:28 GMT):
Has joined the channel.

BalaDevasani (Mon, 03 Sep 2018 06:34:39 GMT):
Has joined the channel.

StefanKosc (Mon, 03 Sep 2018 09:09:51 GMT):
Hi, is there a way to query parameters which were used with chaincodes' functions calls? Perfect result would be to receive a list of transactions with parameters of functions that caused changes

Akash-digiledge (Mon, 03 Sep 2018 09:10:20 GMT):
Can any one tell me how to invoke the system chaincode? please explain me with one example...any reply will be appreciated..

StefanKosc (Mon, 03 Sep 2018 15:35:55 GMT):
Hello, I tried to call a function from another chaincode and a peer returned an error `ERRO 036 VSCC error: ValidateLSCCInvocation failed, err LSCC invocation is attempting to write to namespace`. Any idea what is going on?

Shaun.Lynch (Mon, 03 Sep 2018 15:47:22 GMT):
Hey all, I'm conducting some research into Hyperledger Fabric to better understand the developer experience. The data will be used to understand what kind of developers use Hyperledger Fabric aswell as what learning methods and tooling are generally used. Any further questions about the survey I'm happy to answer 😁 Big thank you to all who engaged last time! https://www.surveygizmo.com/s3/4499667/Blockchain-Developer-Community-Survey

WCamaly (Mon, 03 Sep 2018 20:39:47 GMT):
Has joined the channel.

WCamaly (Mon, 03 Sep 2018 20:59:53 GMT):
Hi everyone! I'm building to app, I'm having a problem with a chaincode. I've separate locals packages for different functionality, for example Data Model, Utils, etc ... > DataModel > Utils > Chaincode -- package.json {...... dependencies: { "utils": "file:../utils", "dataModel":"file:../DataModel" } ....} Well, my proble is when the chaincode run npm install, it doesn't find "../dataModel". npm ERR! code ENOLOCAL npm ERR! Could not install from "../dataModel" as it does not contain a package.json file

WCamaly (Mon, 03 Sep 2018 21:01:45 GMT):
Has someone already passed him?

lucky114407 (Tue, 04 Sep 2018 04:38:54 GMT):
Hi everyone, I am building an app, which have multiple channels, i want to invoke a chaincode from another chaincode, where both the chaincodes shares the same channel. Can anybody help in this regard, how to do?

Pillar (Tue, 04 Sep 2018 05:07:42 GMT):
Has joined the channel.

Pillar (Tue, 04 Sep 2018 05:09:25 GMT):
Has left the channel.

ManuelRauber (Tue, 04 Sep 2018 06:16:14 GMT):
@WCamaly did you check the casing of your files? Linux is case-sensitive, as you write, it does not find `dataModel` but in your dependencies you write `DataModel` with a capital D.

ManuelRauber (Tue, 04 Sep 2018 06:17:13 GMT):
And additionally, as the error message reads, your local package needs to have a `package.json` directly under `dataModel` folder

StefanKosc (Tue, 04 Sep 2018 07:16:02 GMT):
hey, can one chaincode install and instantiate the other one?

tkdp (Tue, 04 Sep 2018 09:12:47 GMT):
Has joined the channel.

mbwhite (Tue, 04 Sep 2018 09:45:02 GMT):
Hello - a snapshot is available in NPM for the `fabric-contract-api` as per FAB-11246... we're getting some feedback so please if anybody has anything for the updated way of doing chaincode for Node (and to be rolled out to other languages)... please shout. Links are https://jira.hyperledger.org/browse/FAB-11246 And the JSDoc is live as well. https://fabric-shim.github.io/tutorial-using-contractinterface.html (and there are spelling mistakes I know :-)

Rachit_gaur (Tue, 04 Sep 2018 10:16:55 GMT):
WHY DOES stub GetHistoryForKey when called from another chaincode using stub.InvokeChaincode() returns value only when on same channel??

WCamaly (Tue, 04 Sep 2018 12:51:02 GMT):
@ManuelRauber Thanks !!

ManuelRauber (Tue, 04 Sep 2018 12:51:19 GMT):
Did it help? (And what was the error?) @WCamaly

jrosmith (Tue, 04 Sep 2018 13:02:47 GMT):
@Rachit_gaur cross chaincode invocations only work when the chaincodess are on the same channel. as for your other question about backtracing, GetHistoryForKey only works for updates to the same key. Consider the case of txM with id of 1 that transfers 100 from entityA to entityB, and a separate txN with an id of 2 that transfers 50 from entity B to entity A. these are two independent transactions with no stored information linking them apart from the fact that the transactions occurred between entityA and entityB. you could have a special query that returns all transactions between two entities, but you would not be able to accomplish that with the txM's id of 1 or txN's id of 2 alone.

WCamaly (Tue, 04 Sep 2018 13:02:49 GMT):
@ManuelRauber Really change the structur and i'm not use packeges local, but tommorrow i try !

BalaDevasani (Tue, 04 Sep 2018 14:53:54 GMT):
muralisr

rodolfoleal (Tue, 04 Sep 2018 18:49:16 GMT):
Has joined the channel.

iramiller (Tue, 04 Sep 2018 19:31:49 GMT):
Can anyone shed some light on the platform chaincode build process design methodology? The concept of performing a build in a container in a production environment then using the results to tag an image for chaincode invocation by peers seems far more complex and error prone, not to mention less secure than using a seperate dedicated build environment to create strongly versioned container releases for chaincode...

jrosmith (Tue, 04 Sep 2018 19:50:41 GMT):
@StefanKosc i believe that would be an anti-pattern. chaincode installation/instantiation happens at the peer/channel level, respectively. how would a single instance of a chaincode know which peers to install the second chaincode on? how would it have the credentials to do so?

jrosmith (Tue, 04 Sep 2018 19:51:43 GMT):
also, in previous versions concurrently gets/puts for a single invocation were not allowed. i don't know if that has changed from 1.2 forward

jrosmith (Tue, 04 Sep 2018 19:51:43 GMT):
also, in previous versions concurrent gets/puts for a single invocation were not allowed. i don't know if that has changed from 1.2 forward

jrosmith (Tue, 04 Sep 2018 20:07:57 GMT):
@iramiller try #fabric-peer-endorser-committer

tlee38 (Wed, 05 Sep 2018 04:59:06 GMT):
Has joined the channel.

Rachit_gaur (Wed, 05 Sep 2018 05:05:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=F8zgwSXcSJ2wY6aBA) @jrosmith But query function is working fine even when both are on different channels, the payload appears to be empty only on the function where gethistoryforkey() is being called

Rachit_gaur (Wed, 05 Sep 2018 05:05:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=F8zgwSXcSJ2wY6aBA) @jrosmith But query function is working fine even when both are on different channels, the payload appears to be empty only on the function where gethistoryforkey() is being called I'll explore the special query feature more but it would be great if i can pin out what is causing the empty payload , getHistoryforkey must not be accessing the right channel

Rachit_gaur (Wed, 05 Sep 2018 09:12:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=F8zgwSXcSJ2wY6aBA) @jrosmith My use case needs backtracking against a single key so the function will do fine , Also i checked the logs and found the following error Failed to get policy manager for channel

Rachit_gaur (Wed, 05 Sep 2018 11:00:36 GMT):
getHistoryForKey() function when called from InvokeChaincode() works fine if both chaincodes are on same channel but returns empty result iterator if chaincode is on different channels .Can someone help? Also not the issue of cross channel calling as query function works fine in all scenarios

StefanKosc (Wed, 05 Sep 2018 11:47:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8YMStYnRraXmmxqXj) @jrosmith ok, sounds like a good explanation :)

daviorocha (Wed, 05 Sep 2018 12:51:24 GMT):
Has joined the channel.

RobertDiebels (Wed, 05 Sep 2018 13:04:35 GMT):
Guys I have a question. I use the NodeJS SDK to interact with the network which is all working fine. When calling a chaincode I return an error (on purpose) and I want to parse that error. To my surprise Fabric is prepending text to the return value of a `shim.Error("{\"someProperty\": \"some message\"}")` call? Making it look like this: `2 UNKNOWN: chaincode error (status: 500, message:{"someProperty": "some message"})`. Instead of this: `{status: 500, message:{"someProperty": "some message"}}`. Why is that text being prepended? That makes no sense whatsoever.

CedricHumbert (Wed, 05 Sep 2018 14:16:03 GMT):
Has joined the channel.

parsiya (Wed, 05 Sep 2018 15:07:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=H7yBxEGqiHKTnGq5a) @RobertDiebels It appears to be an issue for 500 responses, see last comment. Not sure if it's being addressed in a different place. https://jira.hyperledger.org/browse/FAB-6457

RobertDiebels (Wed, 05 Sep 2018 15:10:53 GMT):
Ah great! Thanks for the reply. I'll see if I can move upto 1.2.0

rnisar (Wed, 05 Sep 2018 15:23:55 GMT):
Has joined the channel.

rnisar (Wed, 05 Sep 2018 15:38:27 GMT):
hi, I trying to implement signed encryption and decryption for the payload being saved on the ledger. I'm using GoLang for the chaincode, is there a way I can use PKI of the network to encrypt and decrypt . If anyone has any examples please share.

lucky114407 (Thu, 06 Sep 2018 04:31:46 GMT):
Hi all, I have a question regarding how to perform rich queries from chaincode, i have followed the marbles example (queryMarblesByOwner) and tried to adapt to my usecase , but the function is returning an empty string. Can anybody help me?

Rachit_gaur (Thu, 06 Sep 2018 09:46:36 GMT):
is there a function in the go chaincode to query block by number?

gravity (Thu, 06 Sep 2018 11:41:51 GMT):
Hi all I'm trying to perform to `PutState` in a single call: ``` func ccFunc() { putState_1() putState_2() } func putState_1() { ... stub.PutState(key, value) } func putState_2() { ... stub.PutState(key, value) } ``` in this case, putState_1 will not change the ledger state (assume all endorsements and validations are fine) Is there anything I should take into account? Because such a behavior look weird

push1st1k (Thu, 06 Sep 2018 12:50:16 GMT):
Has joined the channel.

dmk88 (Thu, 06 Sep 2018 12:54:01 GMT):
Has joined the channel.

jrosmith (Thu, 06 Sep 2018 13:19:02 GMT):
@rnisar you can use any standard library go packages for encryption and decryptions, theres a lot of examples online. but i'm not sure you want to put crypto inside of the chaincode. crypto can be expensive, and you're going to be running that during endorsement and validation. it might be better to do the relevant encryption and decryption outside of the chaincode in the application level.

jrosmith (Thu, 06 Sep 2018 13:20:50 GMT):
@Rachit_gaur the closest thing would be [GetStateByRange](https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/interfaces_stable.go#L102), I don't know of any functionality to query by block number as the chaincode interacts with the world state stored in couchDB, not the entire history of the ledger.

jrosmith (Thu, 06 Sep 2018 13:21:01 GMT):
@gravity i've responded in #fabric-questions

dmk88 (Thu, 06 Sep 2018 13:21:36 GMT):
Hi everybody! I use setEvent() https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor in my chaincode on node.js. And I have a problem. For example: ` console.info('=========== Node.js Chaincode query with Set Event Start ==========='); try { stub.setEvent('TransferTestEvent', Buffer.from('testPayload')); } catch (e) { console.info('Catch Error: '); console.info(e); } console.info('Event add :'); console.info(stub.chaincodeEvent.getEventName()); console.info('Payload add :'); console.info(stub.chaincodeEvent.getPayload().toString('utf8')); console.info('=========== Node.js Chaincode query with Set Event End ==========='); ` After that I can see event name and payload in logs: ` =========== Node.js Chaincode query with Set Event Start =========== Event add : TransferTest Payload add : test =========== Node.js Chaincode query with Set Event End =========== (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:19) [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. ` So I have error: TypeError: Illegal buffer Does anybody faced with similar problem?

dmk88 (Thu, 06 Sep 2018 13:21:36 GMT):
Hi everybody! I use setEvent() https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor in my chaincode on node.js. And I have a problem. For example: `` console.info('=========== Node.js Chaincode query with Set Event Start ==========='); try { stub.setEvent('TransferTestEvent', Buffer.from('testPayload')); } catch (e) { console.info('Catch Error: '); console.info(e); } console.info('Event add :'); console.info(stub.chaincodeEvent.getEventName()); console.info('Payload add :'); console.info(stub.chaincodeEvent.getPayload().toString('utf8')); console.info('=========== Node.js Chaincode query with Set Event End ==========='); `` After that I can see event name and payload in logs: `` =========== Node.js Chaincode query with Set Event Start =========== Event add : TransferTest Payload add : test =========== Node.js Chaincode query with Set Event End =========== (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:19) [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. `` So I have error: TypeError: Illegal buffer Does anybody faced with similar problem?

dmk88 (Thu, 06 Sep 2018 13:21:36 GMT):
Hi everybody! I use setEvent() https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor in my chaincode on node.js. And I have a problem. For example: `` console.info('=========== Node.js Chaincode query with Set Event Start ==========='); try { stub.setEvent('TransferTestEvent', Buffer.from('testPayload')); } catch (e) { console.info('Catch Error: '); console.info(e); } console.info('Event add :'); console.info(stub.chaincodeEvent.getEventName()); console.info('Payload add :'); console.info(stub.chaincodeEvent.getPayload().toString('utf8')); console.info('=========== Node.js Chaincode query with Set Event End ==========='); `` After that I can see event name and payload in logs: `` =========== Node.js Chaincode query with Set Event Start =========== Event add : TransferTest Payload add : test =========== Node.js Chaincode query with Set Event End =========== (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:19) [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. `` So I have error: TypeError: Illegal buffer Does anybody faced with similar problem?

dmk88 (Thu, 06 Sep 2018 13:21:36 GMT):
Hi everybody! I use setEvent() https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor in my chaincode on node.js. And I have a problem. For example:``` ``` `` console.info('=========== Node.js Chaincode query with Set Event Start ==========='); try { stub.setEvent('TransferTestEvent', Buffer.from('testPayload')); } catch (e) { console.info('Catch Error: '); console.info(e); } console.info('Event add :'); console.info(stub.chaincodeEvent.getEventName()); console.info('Payload add :'); console.info(stub.chaincodeEvent.getPayload().toString('utf8')); console.info('=========== Node.js Chaincode query with Set Event End ==========='); `` After that I can see event name and payload in logs: `` =========== Node.js Chaincode query with Set Event Start =========== Event add : TransferTest Payload add : test =========== Node.js Chaincode query with Set Event End =========== (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:19) [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. `` So I have error: TypeError: Illegal buffer Does anybody faced with similar problem?

dmk88 (Thu, 06 Sep 2018 13:21:36 GMT):
Hi everybody! I use setEvent() https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor in my chaincode on node.js. And I have a problem. For example: ``` console.info('=========== Node.js Chaincode query with Set Event Start ==========='); try { stub.setEvent('TransferTestEvent', Buffer.from('testPayload')); } catch (e) { console.info('Catch Error: '); console.info(e); } console.info('Event add :'); console.info(stub.chaincodeEvent.getEventName()); console.info('Payload add :'); console.info(stub.chaincodeEvent.getPayload().toString('utf8')); console.info('=========== Node.js Chaincode query with Set Event End ==========='); ``` After that I can see event name and payload in logs: ``` =========== Node.js Chaincode query with Set Event Start =========== Event add : TransferTest Payload add : test =========== Node.js Chaincode query with Set Event End =========== (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:19) [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. ``` So I have error: TypeError: Illegal buffer Does anybody faced with similar problem?

RobertDiebels (Thu, 06 Sep 2018 13:58:49 GMT):
The error is from a different part of your code.

RobertDiebels (Thu, 06 Sep 2018 14:00:07 GMT):
The payload is outputting: `test` and there is no `Catch error:` message in those logs. So you're not handling a promise rejection somewhere down the line.

RobertDiebels (Thu, 06 Sep 2018 14:00:57 GMT):
Unless setEvent returns a Promise that is.

dmk88 (Thu, 06 Sep 2018 15:33:39 GMT):
@RobertDiebels there is no `Catch error` message because there is no error. And as you can see here https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html#setEvent__anchor setEvent(name, payload) is not async function. It`s only simple setter. So I can`t solve the problem of `UnhandledPromiseRejectionWarning`. I think that problem is in encoding payload `TypeError: Illegal buffer` in fabric-shim

Sahith (Fri, 07 Sep 2018 07:55:19 GMT):
Has joined the channel.

RobertDiebels (Fri, 07 Sep 2018 10:11:16 GMT):
@dmk88 that's exactly what I said...

RobertDiebels (Fri, 07 Sep 2018 10:25:54 GMT):
Has left the channel.

mbwhite (Fri, 07 Sep 2018 12:13:01 GMT):
FYI - `fabric-contract-api@1.3.0-snapshot.7` has been published. This the latest revision of the contract based API for chaincode.... we've tweaked the structure of the API based on feedback - and should be considered the final pattern for this and other languages. More information in the JSDocs at https://fabric-shim.github.io/tutorial-using-contractinterface.html

ShwetaBajaj (Fri, 07 Sep 2018 20:07:35 GMT):
Has joined the channel.

yousaf (Sat, 08 Sep 2018 14:29:49 GMT):
Has joined the channel.

raviyelleni (Sun, 09 Sep 2018 03:13:46 GMT):
Has joined the channel.

GauravSalunke (Sun, 09 Sep 2018 06:40:57 GMT):
Has joined the channel.

Rachit_gaur (Mon, 10 Sep 2018 09:24:32 GMT):

Clipboard - September 10, 2018 2:54 PM

Rachit_gaur (Mon, 10 Sep 2018 09:24:38 GMT):
Can someone explain why do i get this error message even after i downloaded the util package?

muralisr (Mon, 10 Sep 2018 13:20:27 GMT):
@Rachit_gaur ` even after i downloaded the util package` - not sure what this means but this error implies the go-package was not included in the chaincode install package. Dependent go packages not provided by the fabric chaincode image build env are provided in the chaincode install by "vendoring" depencies (which tools such as dep or govendor).

Larisaa (Mon, 10 Sep 2018 14:34:57 GMT):
Has joined the channel.

Rachit_gaur (Tue, 11 Sep 2018 05:05:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BitXfmQBxseXtRSFh) @muralisr Resolved the issue by copying the dependencies directory in the docker instance

Rachit_gaur (Tue, 11 Sep 2018 05:05:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BitXfmQBxseXtRSFh) @muralisr Thankyou for your response, Resolved the issue by copying the dependencies directory in the docker instance

hyper-sunder (Tue, 11 Sep 2018 06:49:06 GMT):
Has joined the channel.

hyper-sunder (Tue, 11 Sep 2018 06:51:46 GMT):
Hi All,

hyper-sunder (Tue, 11 Sep 2018 06:52:25 GMT):
I am new to fabric. Can anyone tell me how to use third party libarary or http call in chain code???

ascatox (Tue, 11 Sep 2018 08:40:39 GMT):
Hi All! I've a question! Is possible to call a chaincode from another chaincode ? Thanks for the answers!

TobiasN (Tue, 11 Sep 2018 08:52:50 GMT):
one chaincode can "query" an other chaincode, should the other chaincode try to write, the writes will just be ignored.

TobiasN (Tue, 11 Sep 2018 08:52:50 GMT):
@ascatox one chaincode can "query" an other chaincode, should the other chaincode try to write, the writes will just be ignored.

hyper-sunder (Tue, 11 Sep 2018 09:05:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qHWQmEWDawTGkmc9v) @ascatox Should be in the same network too... guess :smirk:

jrosmith (Tue, 11 Sep 2018 15:45:15 GMT):
@ascatox refer to the entry on invoke chaincode in the [docs](https://github.com/hyperledger/fabric/blob/release-1.2/core/chaincode/shim/interfaces.go#L63)

huikang (Wed, 12 Sep 2018 15:56:15 GMT):
Hi, I am getting this error when following the chain code dev doc: error bad proposal response 500: access denied for [GetConfigBlock][mycc]: Failed to get policy manager for channel [mycc]

huikang (Wed, 12 Sep 2018 15:56:20 GMT):
any idea?

huikang (Wed, 12 Sep 2018 15:56:50 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html#terminal-3-use-the-chaincode

huikang (Wed, 12 Sep 2018 16:07:27 GMT):
Never mind. The problem is solved.

Rachit_gaur (Thu, 13 Sep 2018 06:34:41 GMT):
i want to encrypt specific keys of my json..what package should i use to encrypt ? is there an example for same?

manojsharma2407 (Thu, 13 Sep 2018 08:29:06 GMT):
Has joined the channel.

jrosmith (Thu, 13 Sep 2018 12:41:56 GMT):
@Rachit_gaur youre going to need to give us an example of what it is youre trying to do in order to get specific help

JaydipMakadia (Thu, 13 Sep 2018 12:50:11 GMT):
Has joined the channel.

Rachit_gaur (Thu, 13 Sep 2018 13:35:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZtwBmwCwFFzmTwYM9) @jrosmith I have a map[string]string{} saved against an id.... in the map there exist many keys , among which i want to encrypt the value for key "price" for which i used aes encryption but the value returned contains \\ slashes due to json and hence i am not able to decrypt it

StefanKosc (Thu, 13 Sep 2018 14:42:07 GMT):
Hi, can I pass `stub` as a pointer?

vdods (Thu, 13 Sep 2018 20:35:37 GMT):
Hi all, is there an example of using MockStub in a test peer where the transactions are actually generated by a real SDK? I'm thinking I'd like to test my app backend by having it make real requests against a fake peer that's implemented using MockStub

vdods (Thu, 13 Sep 2018 20:36:57 GMT):
In particular, I want real data being returned from the GetCreator, GetTransient, GetBinding, GetSignedProposal methods, and it seems natural to have a real SDK supply those as it would for a real transaction.

vdods (Fri, 14 Sep 2018 03:19:15 GMT):
I'm thinking it would be something that implements the Endorser service defined in peer.proto, so that the app's SDK can connect to it and issue GRPC requests

yigitpolat (Fri, 14 Sep 2018 07:15:56 GMT):
Has joined the channel.

StefanKosc (Fri, 14 Sep 2018 07:24:15 GMT):
Hi, I am new to golang, is it a good practice to pass `stub` further down to other functions or it is not efficient?

GuillaumeTong (Fri, 14 Sep 2018 10:13:29 GMT):
Has joined the channel.

GuillaumeTong (Fri, 14 Sep 2018 10:22:15 GMT):
Hello, I am testing out the private data collection. I understand that the key of the private data is hashed and then used as a key in the public ledger. My question is: does Fabric check for collision of this hashed value with other keys on the public ledger? If not, how do we check for that in the chaincode? For example: my private data key "client1" gets hashed into let's say "f53a7". Does anything prevent this data to overwrite a public data entry with key "f53a7", or another private data whose key also hashes to "f53a7"?

GuillaumeTong (Fri, 14 Sep 2018 10:22:15 GMT):
Hello, I am testing out the private data collection. I understand that the key of the private data is hashed and then used as a key in the public ledger. My question is: does Fabric check for collision of this hashed value with other keys on the public ledger? If not, how do we check for that in the chaincode? For example: my private data entry with key "client1" gets hashed into let's say "f53a7". Does anything prevent this data to overwrite a public data entry with key "f53a7", or another private data entry whose key also hashes to "f53a7"?

tahaf10 (Fri, 14 Sep 2018 10:32:08 GMT):
Has joined the channel.

omari 3 (Fri, 14 Sep 2018 11:04:05 GMT):
Has joined the channel.

parsiya (Fri, 14 Sep 2018 18:44:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pYfPqJZ8tb4vsgtXd) @StefanKosc I don't think it matters in term of efficiency. In general, you want to extract what you want from stub in the invocation function and then pass them to lower functions as needed. In higher function you can check for errors in stub and/or invalid parameters and return errors immediately. In lower functions, you do not need to care about where these parameters come from, how to extract them from stub, and if they are valid. It increases your code's readability and helps with refactoring down the road. If you want to learn more about idiomatic Go code (it's the equivalent of pythonic in Python), these two resources are the way to Go: * https://golang.org/doc/effective_go.html * https://github.com/golang/go/wiki/CodeReviewComments There are somethings lik goroutine which are heavily "suggested" in Go that are best not used in chaincode. But usually good chaincode is good Go code.

parsiya (Fri, 14 Sep 2018 18:44:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pYfPqJZ8tb4vsgtXd) @StefanKosc I don't think it matters in term of efficiency. In general, you want to extract what you want from stub in the invocation function and then pass them to lower functions as needed. In higher function you can check for errors in stub and/or invalid parameters and return errors immediately. In lower functions, you do not need to care about where these parameters come from, how to extract them from stub, and if they are valid. It increases your code's readability and helps with refactoring down the road. If you want to learn more about idiomatic Go code (it's the equivalent of pythonic in Python), these two resources are the way to Go: * https://golang.org/doc/effective_go.html * https://github.com/golang/go/wiki/CodeReviewComments There are somethings like goroutine which are heavily "suggested" in Go but are best not abused in chaincode. But usually good chaincode is good Go code.

dave.enyeart (Fri, 14 Sep 2018 18:57:21 GMT):
@GuillaumeTong The private data hashes go into a different namespace, so no collisions are possible.

Sileymane (Sat, 15 Sep 2018 10:48:59 GMT):
Has joined the channel.

chandrasekarangengadharan (Sat, 15 Sep 2018 11:36:08 GMT):
Has joined the channel.

waxer (Sun, 16 Sep 2018 15:29:26 GMT):
Has joined the channel.

waxer (Sun, 16 Sep 2018 15:31:33 GMT):
Would make any sense in making a Fabric network which the chaincodes are 'get' and 'set' operations?

waxer (Sun, 16 Sep 2018 15:31:52 GMT):
I mean, the key values of the ledger per se.

parsiya (Mon, 17 Sep 2018 00:45:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=93aYsX8QkWJLPT8W6) @waxer I am not sure what that would accomplish in real life, except having a glorified decentralized key/value store. But what you are trying to accomplish is the "SimpleAsset" example.

lucky114407 (Mon, 17 Sep 2018 04:41:37 GMT):
Hi all, I have a question. Is it possible to execute a chaincode based on time (for example for every 2 minutes chaincode needs to be invoked), if yes ,are there any examples?

TobiasN (Mon, 17 Sep 2018 06:57:57 GMT):
@lucky114407 yes you can, but you have to be clear, every organization is running the chaincode on different hardware, with potential different connections between peer and its CouchDB. So the precision should be very low, as allowing one peer easily to be twice that fast as an other still producing the same outcome. I would highly recommend, not to do that.

lucky114407 (Mon, 17 Sep 2018 07:24:59 GMT):
Thank you for ur reply, but i did not understand ur point on precision being low. can u explain what you mean by the point "allowing one peer easily to be twice that fast as an other still producing the same outcome"

lucky114407 (Mon, 17 Sep 2018 07:25:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=m67rhakv6Ybb69oK2) @TobiasN Thank you for ur reply, but i did not understand ur point on precision being low. can u explain what you mean by the point "allowing one peer easily to be twice that fast as an other still producing the same outcome"

mattremy (Mon, 17 Sep 2018 08:01:47 GMT):
Has joined the channel.

jrosmith (Mon, 17 Sep 2018 14:39:26 GMT):
@Rachit_gaur it may be better practice to create a dedicated struct for your JSON with a field of Price pointing to string, you can then encode it to JSON and store it

Jgnuid (Mon, 17 Sep 2018 15:12:35 GMT):
Has joined the channel.

waxer (Mon, 17 Sep 2018 17:28:19 GMT):
Little question, say I want to get a block containing a TxID. Then I should query qscc. I should invoke its corresponding function within the proper channel?.

waxer (Mon, 17 Sep 2018 17:28:19 GMT):
Little question, say I want to get a block containing a TxID. Then I should query qscc. Should I invoke its corresponding function within the proper channel?.

waxer (Mon, 17 Sep 2018 17:29:29 GMT):
I mean, can I assume qscc is 'installed' in all the channels of a network?

muralisr (Mon, 17 Sep 2018 17:42:07 GMT):
@waxer `I mean, can I assume qscc is 'installed' in all the channels of a network?` - yes, you can assume that

waxer (Mon, 17 Sep 2018 17:56:01 GMT):
Another question. Say I want to create 'Customers' in the ledger/world-state, and each customer has a number of extra data. Two questions: 1- When the application invokes a 'createCustomer( data...)' function in the chaincode, the chaincode couuld mantain a key named 'allCustomers' that is a JSON with all the existing customers. Say each customer has an ID, then the next Id to use is the max(Id)+1 of the current JSON of the key 'allCustomers'. My question is, is this a reasonable or idiomatic way of doing this?, I mean for storing the list of customers, and for solving the problem of deterministic Id for them. 2- Say I implement idea of the last point. It would make sense to store for each customer its own extra data in a composite key?, say objectType='Customer' and an attribute 'Id', which is the corresponding one of the customer from the key 'allCustomers'?

waxer (Mon, 17 Sep 2018 17:56:32 GMT):
I ask this because there may be some good design ideas about doing this kind of usual things.

jrosmith (Mon, 17 Sep 2018 19:08:11 GMT):
@waxer why not store each customer as their own JSON blob in couchDB and just have a special view to retrieve them all?

waxer (Mon, 17 Sep 2018 19:12:08 GMT):
@jrosmith , how you choose the key corresponding to each customer?

jrosmith (Mon, 17 Sep 2018 19:12:47 GMT):
@waxer set to whatever unique identifier you have for them, or use the txID for the createCustomer request

waxer (Mon, 17 Sep 2018 19:13:52 GMT):
@jrosmith , oh, you're saying using some kind of 'natural primary key' for the domain. For example, their national document Id number. Not really an abstract sequence of Id numbers, right?

jrosmith (Mon, 17 Sep 2018 19:14:38 GMT):
@waxer yes, if that makes sense for your use case. if not i think it makes fine sense to use the txID since it by definition will be unique

waxer (Mon, 17 Sep 2018 19:15:26 GMT):
@jrosmith , right.. I don't know if there's some constrain about the length of the key. Because txID I think is quite lengthy.

jrosmith (Mon, 17 Sep 2018 19:16:47 GMT):
@waxer its only 64 characters, you can also decode the hex string to bytes then encode those however you see fit

waxer (Mon, 17 Sep 2018 19:17:36 GMT):
That's smart :)

GuillaumeTong (Tue, 18 Sep 2018 01:10:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SumQLwhkodjbaeJJD) @dave.enyeart Thank you. So private data key hashes cannot collide with public data keys. What about collision with other private data keys? They would be in the same namespace right?

dave.enyeart (Tue, 18 Sep 2018 02:57:30 GMT):
the keys and their private data hashes are each scoped to their own namespace within the channel/chaincode/collection.

waxer (Tue, 18 Sep 2018 03:00:03 GMT):
Question. A priori if two peers have installed different chaincode code, but as the same name and version. It will only be noticable when some endorsing policy will be violates because different read write sets? Or somehow the network could detect this situation in another way?

waxer (Tue, 18 Sep 2018 03:02:49 GMT):
I mean... Commit validation only requires that read write sets match by endorsement policy. If the chaincodes that generated the results are the same or not doesn't matter?

hyper-sunder (Tue, 18 Sep 2018 07:15:14 GMT):
Hi Guys, I am getting the following error when I try to execute `query` function in chaincode

hyper-sunder (Tue, 18 Sep 2018 07:15:30 GMT):
`Error: error endorsing query: rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP] - proposal response: `

hyper-sunder (Tue, 18 Sep 2018 07:15:54 GMT):
can anyone tell me what went wrong

hyper-sunder (Tue, 18 Sep 2018 07:16:05 GMT):
just using `basic-network` from the sample

hyper-sunder (Tue, 18 Sep 2018 07:31:12 GMT):
Finally, I found the error and fixed it. Thank you

petans24 (Tue, 18 Sep 2018 08:14:36 GMT):
Has joined the channel.

samcan123 (Tue, 18 Sep 2018 11:49:33 GMT):
Has joined the channel.

samcan123 (Tue, 18 Sep 2018 11:52:28 GMT):
I am new to Hyperledger Fabric and I am facing an error while trying to invoke a sample chaincode (chaincode_example02.go). I am able to install and instantiate/init a chaincode but when I try to use invoke to start a transaction, I am getting this error. Can anyone please let me know what I am missing? The go version Iam using is 1.10 2018-09-17 10:42:31.701 UTC [grpc] Printf -> DEBU 07c transport: http2Client.notifyError got notified that the client transport was broken write: broken pipe. Error: Error getting broadcast client: rpc error: code = Unavailable desc = transport:

githubcpc (Wed, 19 Sep 2018 01:43:43 GMT):
Has joined the channel.

GuillaumeTong (Wed, 19 Sep 2018 03:31:30 GMT):
transient

me_abhijeet (Wed, 19 Sep 2018 05:00:43 GMT):
Has joined the channel.

GowriR (Wed, 19 Sep 2018 05:12:32 GMT):
Hi all, is the concept of channels in fabric implemented using GO channels?

GuillaumeTong (Wed, 19 Sep 2018 07:42:51 GMT):
Hi all, again I have a question about private data: In the example tutorial at https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html , the invocation of the chaincode uses "normal" fields for its arguments. As a result, every invoke action with all the private arguments can be viewed in plain text in the blocks from the ledger, making the data basically public. The page on private data briefly mentions I can use the transient field during, but I am confused at which format it should be in. I keep getting errors similar to this: `# peer chaincode invoke -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n transienttest -c '{"Args":["initMarble","marble1","blue","35","able","99"]}' --waitForEvent --transient '{"key1":"12345"}' Error: error parsing transient string: illegal base64 data at input byte 4 - proposal response: ` Can anyone tell me how to properly use the transient field for invoke?

GuillaumeTong (Wed, 19 Sep 2018 07:42:51 GMT):
Hi all, again I have a question about private data: In the example tutorial at https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html , the invocation of the chaincode uses "normal" fields for its arguments. As a result, every invoke action with all the private arguments can be viewed in plain text in the blocks from the ledger, making the data basically public. The page on private data briefly mentions I can use the transient field during, but I am confused at which format it should be in. I keep getting errors similar to this: ```# peer chaincode invoke -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n transienttest -c '{"Args":["initMarble","marble1","blue","35","able","99"]}' --waitForEvent --transient '{"key1":"12345"}' Error: error parsing transient string: illegal base64 data at input byte 4 - proposal response: ``` Can anyone tell me how to properly use the transient field for invoke?

GuillaumeTong (Wed, 19 Sep 2018 07:42:51 GMT):
Hi all, again I have a question about private data: In the example tutorial at https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html , the invocation of the chaincode uses "normal" fields for its arguments. As a result, every invoke action with all the private arguments can be viewed in plain text in the blocks from the ledger, making the data basically public. The page on private data briefly mentions I can use the transient field during, but I am confused at which format it should be in. I keep getting errors similar to this: ```# peer chaincode invoke -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n transienttest -c '{"Args":["initMarble","marble1","blue","35","Mark","99"]}' --waitForEvent --transient '{"key1":"12345"}' Error: error parsing transient string: illegal base64 data at input byte 4 - proposal response: ``` Can anyone tell me how to properly use the transient field for invoke?

GuillaumeTong (Wed, 19 Sep 2018 07:42:51 GMT):
Hi all, again I have a question about private data: In the example tutorial at https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html , the invocation of the chaincode uses "normal" fields for its arguments. As a result, every invoke action with all the private arguments can be viewed in plain text in the blocks from the ledger, making the data basically public. The page on private data briefly mentions I can use the transient field during invoke, but I am confused at which format it should be in. I keep getting errors similar to this: ```# peer chaincode invoke -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n transienttest -c '{"Args":["initMarble","marble1","blue","35","Mark","99"]}' --waitForEvent --transient '{"key1":"12345"}' Error: error parsing transient string: illegal base64 data at input byte 4 - proposal response: ``` Can anyone tell me how to properly use the transient field for invoke?

GuillaumeTong (Wed, 19 Sep 2018 07:53:15 GMT):
I noticed that using an empty string as value: `--transient '{"key1":""}'` passes, as well as using uint8 array: `--transient '{"key1":[12,74,5]}'`

GuillaumeTong (Wed, 19 Sep 2018 07:54:33 GMT):
Still, this feels like there should be a better solution than converting all by data into byte arrays in the command line

GuillaumeTong (Wed, 19 Sep 2018 07:54:33 GMT):
Still, this feels like there should be a better solution than converting all by data into uint8 arrays in the command line

izumix (Wed, 19 Sep 2018 08:34:26 GMT):
Has joined the channel.

muralisr (Wed, 19 Sep 2018 10:40:00 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=h23NPrqcZ5f2amZ4P

muralisr (Wed, 19 Sep 2018 10:41:32 GMT):
@GowriR no, its high level concept

waxer (Wed, 19 Sep 2018 10:45:39 GMT):
Question. A priori if two peers have installed different chaincode code, but as the same name and version. It will only be noticable when some endorsing policy will be violates because different read write sets? Or somehow the network could detect this situation in another way? I mean... Commit validation only requires that read write sets match by endorsement policy. If the chaincodes that generated the results are the same or not doesn't matter?

Rachit_gaur (Wed, 19 Sep 2018 11:10:32 GMT):
How to use Transient maps keys in chaincode ...i am able to access them in Init function but not inside invoke

dave.enyeart (Wed, 19 Sep 2018 17:51:56 GMT):
@waxer a certain chaincode version with a certain fingerprint (hash) is instantiated on the channel (on the blockchain), this spans all peers and is the source of truth. if any peer locally installs a chaincode with that name and version but different fingerprint, then endorsement requests to that peer for that chaincode execution will fail, as the local fingerprint it checked against the blockchain.

dave.enyeart (Wed, 19 Sep 2018 18:05:15 GMT):
@GuillaumeTong you are correct... to see an example of using transient field from cli invoke, see last comments at:

dave.enyeart (Wed, 19 Sep 2018 18:05:17 GMT):
https://jira.hyperledger.org/browse/FAB-10231?focusedCommentId=48564&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-48564

waxer (Wed, 19 Sep 2018 18:29:03 GMT):
@dave.enyeart , excellent. And in case of an instantiation policy that involves more than one member, the hashes should match to consider the instantiation correct. Right?

waxer (Wed, 19 Sep 2018 18:29:03 GMT):
@dave.enyeart , excellent. And in case of an instantiation policy that involves more than one member, the hashes should match to consider the instantiation correct. Right?

dave.enyeart (Wed, 19 Sep 2018 18:34:18 GMT):
i believe that aspect is being delivered in the enhanced lifecycle that is currently in development, @jyellick could answer for sure

jyellick (Wed, 19 Sep 2018 18:34:18 GMT):
Has joined the channel.

AnirudhC (Wed, 19 Sep 2018 18:53:13 GMT):
Has joined the channel.

AnirudhC (Wed, 19 Sep 2018 19:23:53 GMT):
Hi, I am new to Hyperledger Fabric. I am trying to encrypt the data in chaincode using asymmetric cryptography and then storing it on ledger. I am passing encrypted message to PutState() sometimes it works but most of times it fails giving below error in docker logs [shim] handlePutState -> ERRO 002 [d408d4d6] Received ERROR. Payload: PUT_STATE failed: transaction ID: d408d4d6d28f177a2d5e0f5ba4a0ab9bb5c223176775a29fcca307a1dd025140: no ledger context not able to figure out the issue cause. Can you please suggest me what could be the reason for this issue Also if any better way to achieve encrypt/decryption using assyemtric cryptography in Hyperledger chaincode please let me know.

AnirudhC (Wed, 19 Sep 2018 19:23:53 GMT):
Hi, I am new to Hyperledger Fabric. I am trying to encrypt the data in chaincode(GO code) using asymmetric cryptography and then storing it on ledger. I am passing encrypted message to PutState() sometimes it works but most of times it fails giving below error in docker logs [shim] handlePutState -> ERRO 002 [d408d4d6] Received ERROR. Payload: PUT_STATE failed: transaction ID: d408d4d6d28f177a2d5e0f5ba4a0ab9bb5c223176775a29fcca307a1dd025140: no ledger context not able to figure out the issue cause. Can you please suggest me what could be the reason for this issue Also if any better way to achieve encrypt/decryption using assyemtric cryptography in Hyperledger chaincode please let me know.

AnirudhC (Wed, 19 Sep 2018 19:23:53 GMT):
Hi, I am trying to fetch encyption key from Vault from HashiCorp in Chaincode(Go lang). GET request to Vault is failing. Can anyone please help me how to send GET request to Vault?

jyellick (Wed, 19 Sep 2018 19:32:19 GMT):
@waxer Instantiation policy is a concept that is changing in the new lifecycle, but it does bring multi-sig requirement support for instantiation

waxer (Wed, 19 Sep 2018 20:22:30 GMT):
@jyellick , ok!, nice (and painful) to know that something I learned yesterday it's gonna change "soon" hehe

GuillaumeTong (Thu, 20 Sep 2018 01:12:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=JmsFzBkZZkaBwKmhb) @dave.enyeart Thank you very much. I never came across this during my search for info about the transient field

chandrasekarangengadharan (Thu, 20 Sep 2018 05:42:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=m67rhakv6Ybb69oK2) Hi @TobiasN Teh question is, in Real world there are events which are triggerred based on time,In a centralised Solution in Fintech Industry, there used to be a concept of EOD(end of the day job), MOD(Month End Job)..like that..can we simulate something like that in fabric/hyperledger

chandrasekarangengadharan (Thu, 20 Sep 2018 05:46:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Bxm42RgFgxwdbdm6L) @hyper-sunder @hyper-sunder Golang nodejs sdk API https://fabric-sdk-node.github.io/index.html

Rachit_gaur (Thu, 20 Sep 2018 06:05:47 GMT):
How to trigger an event from chaincode?

Shyam_Pratap_Singh (Thu, 20 Sep 2018 06:24:01 GMT):
Has joined the channel.

me_abhijeet (Thu, 20 Sep 2018 07:49:05 GMT):
hey! I want to use Hyperledger Fabric on Multiple Hosts . Any one can help????

hyper-sunder (Thu, 20 Sep 2018 09:28:34 GMT):
@chandrasekarangengadharan thanks

Rachit_gaur (Thu, 20 Sep 2018 09:32:21 GMT):
I have used setevent() function to set an event but how to handle the requests? where will my event hub be managed?]

GowriR (Thu, 20 Sep 2018 10:27:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=53LFHjPMLm9gsP8pm) @muralisr thanks @muralisr

jrosmith (Thu, 20 Sep 2018 12:59:07 GMT):
@Rachit_gaur using one of the sdks you can listen for chaincode events

Luxii (Thu, 20 Sep 2018 13:19:53 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 ?

Ammu (Thu, 20 Sep 2018 13:21:23 GMT):
Has joined the channel.

Ammu (Thu, 20 Sep 2018 13:21:47 GMT):

uu.png

gen_el (Thu, 20 Sep 2018 16:19:24 GMT):
So my chaincode's docker container exited because of an uncatch error. It refused to start and attach no matter what i tried. Is there absolutely no way to start an exited chaincode docker container?

muralisr (Thu, 20 Sep 2018 19:42:30 GMT):
@gen_el `It refused to start and attach no matter what i tried. ` cannot interpret that... assuming you fixed the reason for the ` uncatch error` and reinstalled/instantiated the chaincode one thing you coukd try is to remove the old chaincode docker image (the `docker rmi ..` command). If you used the same parameters (name, version etc) to the fixed chaincode and did not remove the old image, fabric would just use the old existing image

arindammondal91 (Fri, 21 Sep 2018 04:01:35 GMT):
Has joined the channel.

Rachit_gaur (Fri, 21 Sep 2018 05:37:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DkTgH7XnfdADu4dFX) @jrosmith How do i set up an event listener? i can see that the sample balance transfer already has one...i want to get the events that i am setting from the chaincode level

amitkumar991 (Fri, 21 Sep 2018 06:02:13 GMT):
Has joined the channel.

amitkumar991 (Fri, 21 Sep 2018 06:02:26 GMT):
#fabric

Luxii (Fri, 21 Sep 2018 07:27:03 GMT):
Does anyone know how to fix/resolve *PHANTOM_READ_CONFLICTS* ?

mastersingh24 (Fri, 21 Sep 2018 09:01:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=38Zd8GzmpKdTBj7jY) @Ammu You need to have the Go compiler installed and in your PATH

gen_el (Fri, 21 Sep 2018 09:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8zZ7LY3rNetcSwwNa) @muralisr @muralisr Yeah, reinstalling and upgrading the chaincode works just fine. I was just wondering, what if, in a production setting, fixing the bug would take say 2 hours and the system is a high volume transactional system, so, it will be unavailable (for 2 hours) until the fixed chaincode is deployed? In traditional apps, you could just startup the service, (as not every use case will trigger the bug), while you work on the fix.

gen_el (Fri, 21 Sep 2018 09:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8zZ7LY3rNetcSwwNa) @muralisr Yeah, reinstalling and upgrading the chaincode works just fine. I was just wondering, what if, in a production setting, fixing the bug would take say 2 hours and the system is a high volume transactional system, so, it will be unavailable (for 2 hours) until the fixed chaincode is deployed? In traditional apps, you could just startup the service, (as not every use case will trigger the bug), while you work on the fix.

gen_el (Fri, 21 Sep 2018 09:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8zZ7LY3rNetcSwwNa) @muralisr Yeah, reinstalling and upgrading the chaincode works just fine. I was just wondering, what if, in a production setting, fixing the bug would take say 2 hours and the system is a high volume transactional system, so, it will be unavailable (for 2 hours) until the fixed chaincode is deployed? In traditional apps, you could just startup the service, (as not every use case will hit the bug), while you work on the fix.

Taffies (Fri, 21 Sep 2018 10:01:07 GMT):
Has joined the channel.

githubcpc (Fri, 21 Sep 2018 10:01:26 GMT):
Hey,I am trying to call a chaincode from another chaincode,but i don't know how to understand this flow and how it works .

Taffies (Fri, 21 Sep 2018 10:02:07 GMT):
Hello! I've read about endorsement policies in Fabric using AND and OR, but is there a way to specify like at least 3 out of 20 signatures needed when I instantiate the chaincode?

githubcpc (Fri, 21 Sep 2018 10:02:58 GMT):
https://stackoverflow.com/questions/49360796/how-we-can-call-one-chaincode-from-another-chaincode-in-fabric-1-0-if-anyone I find this answer from stackoverflow.The chaincode invoke function to call another maybe work.

githubcpc (Fri, 21 Sep 2018 10:05:07 GMT):
For example: - T(2, 'A', 'B', 'C') requests a signature from any 2 principals out of A, B or C; @Taffies

jrosmith (Fri, 21 Sep 2018 14:57:40 GMT):
@Rachit_gaur listening for chaincode events is well documents in the [node sdk](https://fabric-sdk-node.github.io/ChannelEventHub.html#registerChaincodeEvent__anchor)

MohammadObaid (Sat, 22 Sep 2018 14:22:13 GMT):
Can chaincode interact with externaal REST API's during endorsment ?

MohammadObaid (Sat, 22 Sep 2018 14:29:32 GMT):
Hey @jyellick I have 3 different external datsources and want to perform some business logic before endorsement like comparison etc . What would be the preferable approach of doing this ?

Jgnuid (Sun, 23 Sep 2018 00:29:26 GMT):
@MohammadObaid , afaik, it could be done... but it could lead to some issues

Jgnuid (Sun, 23 Sep 2018 00:30:10 GMT):
For example, it is supposed that your chaincode invokation should satisfy some kind of determinism.

Jgnuid (Sun, 23 Sep 2018 00:30:37 GMT):
Calling an external API doesn't necessarily means non determinism, but sounds odd.

Jgnuid (Sun, 23 Sep 2018 00:31:15 GMT):
Moreover, if you have endorsing peers in different infrastructure, all of them should be configured correctly to access the external resource.

MohammadObaid (Sun, 23 Sep 2018 13:22:28 GMT):
@Jgnuid so good approach would be to fetch all resources before running transaction right ?

Jgnuid (Sun, 23 Sep 2018 13:23:43 GMT):
Yeah, sounds better.

vdods (Sun, 23 Sep 2018 19:41:29 GMT):
Hey all, is there an easy way to delete chaincode from the peer? Chaincode that's not currently instantiated, obviously.

Ilya_Eremenko (Mon, 24 Sep 2018 03:00:31 GMT):
Has joined the channel.

Taffies (Mon, 24 Sep 2018 03:43:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BwtWyAJRJN372kQBP) @githubcpc Hmm I'm trying to do this from the CLI, seems like they only do AND and OR.

zale144 (Mon, 24 Sep 2018 08:12:36 GMT):
Has joined the channel.

zale144 (Mon, 24 Sep 2018 08:13:47 GMT):
Hello all! I'm having an issue. When I query the chaincode from the CLI container I get a response, but when I do it from a Node app, there is an empty payload, and no errors in the peer logs. Anyone has an idea why?

zale144 (Mon, 24 Sep 2018 08:14:37 GMT):
The endorsement goes fine, but seems that the request never reaches the actual chaincode

zale144 (Mon, 24 Sep 2018 08:51:34 GMT):
The Node app in question is Marbles. It successfully installs and instantiates the chaincode on my network, but when I start the app and it performs checks to see if there is chaincode and it's version, it fails because of the reason I already mentioned

AnthonyRoux (Mon, 24 Sep 2018 10:05:25 GMT):
Has joined the channel.

zale144 (Mon, 24 Sep 2018 10:19:43 GMT):
Ok I figured it out. I was restricting access by ACL

vdods (Mon, 24 Sep 2018 17:49:14 GMT):
Hi all, how does one retrieve the peer's identity within a chaincode invoke call? I get that using a peer-dependent value is asking for non-deterministic transaction results, but with the advent of private collections (which generally also use the "transient" field of the transaction), you're going to have different peers working with different data anyway, and it's the responsibility of the chaincode implementer to guarantee that the transaction results are deterministic.

vdods (Mon, 24 Sep 2018 17:49:50 GMT):
One hacky way to do it would be to send the peer's identity in via the transaction's transient field (on a per-peer basis), but this is open to mistake and deception

vdods (Mon, 24 Sep 2018 18:04:46 GMT):
Hmm.. further question: do modifications to a private collection show up as hash values in the publicly visible portion of the transaction?

jmason900 (Mon, 24 Sep 2018 18:44:55 GMT):
Has joined the channel.

atirekg (Tue, 25 Sep 2018 05:42:09 GMT):
Has joined the channel.

atirekg (Tue, 25 Sep 2018 05:42:39 GMT):
hello guys annyone online need to find answers to some basic question anyone who has developed any fabric app using GO and Nodejs can help me

atirekg (Tue, 25 Sep 2018 05:43:26 GMT):
I am starting on this technology..

atirekg (Tue, 25 Sep 2018 05:44:27 GMT):
right now I am using https://github.com/hyperledger/education/tree/master/LFS171x/fabric-material example

Roma_18 (Tue, 25 Sep 2018 08:07:55 GMT):
Has joined the channel.

atirekg (Tue, 25 Sep 2018 14:11:48 GMT):
hello guys

atirekg (Tue, 25 Sep 2018 14:12:34 GMT):
I want to know how can I deploy m modifications in chaincode to network without destroying the current docker

atirekg (Tue, 25 Sep 2018 14:13:02 GMT):
name of my docker is dev-peer0.org1.example.com-tuna-app-1.0

WCamaly (Tue, 25 Sep 2018 19:25:34 GMT):
hi Guys, i try use putPrivateData(collection, key, payload), but i've erro Error: PUT_STATE failed: transaction ID: c1b5969394f4d802f05cb899685de55de6699c31fed0f14c21036cb423dc1562: collection config not define for namespace [pagosFuturosGlobals] at parseResponse (/usr/local/src/node_modules/fabric-shim/lib/handler.js:678:9) at MsgQueueHandler.handleMsgResponse (/usr/local/src/node_modules/fabric-shim/lib/handler.js:137:26) at ClientDuplexStream. (/usr/local/src/node_modules/fabric-shim/lib/handler.js:293:28) 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 readCallback (/usr/local/src/node_modules/grpc/src/client.js:312:14) (node:23) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Illegal buffer (node:23) [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.

jrosmith (Tue, 25 Sep 2018 19:27:49 GMT):
@atirekg if you have in place changes you can send a chaincode upgrade proposal after installing the new version of the chaincode

jrosmith (Tue, 25 Sep 2018 19:28:13 GMT):
@WCamaly looks like you have improperly constructed buffer in the chaincode somewhere.

WCamaly (Tue, 25 Sep 2018 19:30:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LAiBacgeY3dxae5FC) @jrosmith ok, but i don't have changes I try create new privateData

jrosmith (Tue, 25 Sep 2018 19:32:45 GMT):
@WCamaly changes to what? is there an example chaincode youre using? we need more information to be able to assist you

WCamaly (Tue, 25 Sep 2018 19:37:30 GMT):
yes. class orm-couch.js class ......{ ... async newPed (key, obj) { let buffer = Buffer.from(JSON.stringify(obj)) let result = await this.stub.putPrivateData(Ped.COLLECTION, key, buffer) return result } ... } class global-chaincode.js class ... { Invoke () {....} Init () {....} .... async newPed (stub, args) { try { let orm = new Orm(stub) if (args.length !== 2) { throw new Error('Incorrect number of arguments.') } let version = Number.parseFloat(args[0]) let obj = JSON.parse(args[1]) let ped = new Ped(version, obj) let key = uuid.v4() let result = await orm.newPed(key, ped.toJson()) return result } catch (e) { log.error(e) return e } } }

WCamaly (Tue, 25 Sep 2018 19:37:51 GMT):
hope it is understood

supay (Tue, 25 Sep 2018 21:14:27 GMT):
Hi, I've edited the marbles node chaincode to create a custom smart contract where i accept one argument, temperature - https://paste.ee/p/JDki3

supay (Tue, 25 Sep 2018 21:14:40 GMT):
I've deployed it to IBM blockchain platform using their dashboard interface

supay (Tue, 25 Sep 2018 21:15:08 GMT):
How do I invoke the contract on some transaction? I'm confused

supay (Tue, 25 Sep 2018 21:19:25 GMT):
What I want to be able to do is to log multiple temperatures to the blockchain (as separate transactions) and then be able to query the values

Ashish_ydv (Wed, 26 Sep 2018 05:58:20 GMT):
Has joined the channel.

Ashish_ydv (Wed, 26 Sep 2018 05:58:45 GMT):
Hi everyone, Can you all please suggest me some tutorials and site where i can start learning writing chaincode in Go language except their official site. Till now i was doing everything in composer, but now i want to learn how to write chaincode in GO for fabric.

atirekg (Wed, 26 Sep 2018 10:15:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bFjcZRA2d2WZBgDi9) @Ashish_ydv Have you tried these links https://courses.edx.org/courses/course-v1:LinuxFoundationX+LFS171x+3T2017/course/ https://www.tutorialspoint.com/go/go_quick_guide.htm

Ashish_ydv (Wed, 26 Sep 2018 11:41:17 GMT):
@atirekg yes I have gone through those. But I want to know like which function is called for what, like in composer me can create model, assest , participants and all. So how those things can be implemented here.

davidkel (Wed, 26 Sep 2018 12:05:22 GMT):
@Ashish_ydv At the moment you have to do all that yourself from scratch.

atirekg (Wed, 26 Sep 2018 12:32:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=i7T4MtdQvNAHgoYkh) @Ashish_ydv I am also struggling into the same, I have found a link yesterday which provide me some answer not all https://gowalker.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub_GetHistoryForKey

waxer (Wed, 26 Sep 2018 13:18:49 GMT):
@Ashish_ydv , @atirekg , https://github.com/hyperledger/fabric/blob/77c3aa6ce5b0cfba93bfda009095886dbcadff91/core/chaincode/shim/interfaces.go

atirekg (Thu, 27 Sep 2018 07:37:26 GMT):
hello guys

atirekg (Thu, 27 Sep 2018 07:37:49 GMT):
I am getting this error while Invoking the chaincode

atirekg (Thu, 27 Sep 2018 07:37:50 GMT):
2018-09-27 07:36:35.183 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 04c ESCC invoke result: response: Error: endorsement failure during invoke. chaincode result:

atirekg (Thu, 27 Sep 2018 07:38:11 GMT):
I have checked the docker cli and my chain-code exists there

atirekg (Thu, 27 Sep 2018 07:38:44 GMT):
Any idea what should I do or how can I debug it

gravity (Thu, 27 Sep 2018 13:58:58 GMT):
hello is there any way to mock attributes that are required for ABAC in tests? this is for golang chaincode

mahoney1 (Thu, 27 Sep 2018 16:15:12 GMT):
Has joined the channel.

JuanSuero (Thu, 27 Sep 2018 19:27:23 GMT):
Has joined the channel.

JuanSuero (Thu, 27 Sep 2018 19:27:28 GMT):
i need to change the logging driver for the docker containers to go to syslog ( so that i can grab them in splunk ) i can do that for everything in the docker-compose.yml by editing the /etc/docker/daemon.json file and restarting docker ( and npm restarting the containers ) but the chaincode containers still stay as default. ive even tried to upgrade the chaincode

tarun.sharma (Thu, 27 Sep 2018 23:11:45 GMT):
Has joined the channel.

am (Fri, 28 Sep 2018 02:25:10 GMT):
Hi, Is it possible to send an event back to the peer and hence the client ChaincodeEvent Listener using the setEvent(name, payload) method on the stub in the init method of a chaincode? (I am using the node chaincode containers but i guess it should be same for every language).I am seeing events from other methods but not from the init method.

BhaskarRaju (Fri, 28 Sep 2018 11:13:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=dZLAqNM2YgzjJe6jj) @am Hay, Can i know how you are listening the chaincode events, i'm mainly looking to see, how these events to be passed on to node code (REST)

gravity (Fri, 28 Sep 2018 11:23:07 GMT):
Hello Is it actually a good practice to write your own `MockStub` for chaincode tests?

Legiit (Fri, 28 Sep 2018 11:27:59 GMT):
how can we run the chaincode in dev mode using nodejs? I tried to follow the guide and use the fabric-samples, but the network still takes 80+ sec to boot + chaincode isn't updated in any way? I would need to redeploy/upgrade which takes as long as the normal network boot

krabradosty (Fri, 28 Sep 2018 11:47:12 GMT):
Has joined the channel.

krabradosty (Fri, 28 Sep 2018 11:53:16 GMT):
Hello! 1. Why do my chaincode containers have prefix `dev-`. Peers are started not in dev mode. 2. When a new version of chaincode has been deployed, old version container is still alive. Why?

davidkel (Fri, 28 Sep 2018 12:03:55 GMT):
@krabradosty `dev-` is a prefix which is defined in the configuration of your peer. See the docs about point 2 here https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html#upgrade

davidkel (Fri, 28 Sep 2018 12:08:41 GMT):
@Legiit In summary 1. start fabric in dev mode 2. Go to your nodejs chaincode and do `npm install` 3. run your node.js chaincode with the parameter --peer.address grpc://localhost:7052 and a specify a chaincode name and version eg `CORE_CHAINCODE_ID_NAME="mycc:v0" mychaincode.js --peer.address grpc://localhost:7052` 4. Install some dummy chaincode onto the peer and with a name of mycc and version v0 5. Instantiate the chaincode with name of mycc and version v0

Legiit (Fri, 28 Sep 2018 12:23:46 GMT):
It's enough to launch the "chaincode-docker-devmode" network in fabric-samples then follow your steps? @davidkel

Legiit (Fri, 28 Sep 2018 12:24:42 GMT):
and these are my chaincode commands: ``` export arg1="CORE_PEER_LOCALMSPID=Org1MSP" export arg2="CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" docker exec -e $arg1 -e $arg2 cli peer chaincode install -l node -n $CHAINCODE_NAME -v $versionNumber -p $CHAINCODE_PATH docker exec -e $arg1 -e $arg2 cli peer chaincode instantiate -l node -n $CHAINCODE_NAME -v $versionNumber -C $CHANNEL_NAME -c '{"Args":[""]}' -o $ORDERER_ADDR ```

Legiit (Fri, 28 Sep 2018 12:25:18 GMT):
Im using the CLI to run the commands

davidkel (Fri, 28 Sep 2018 12:27:34 GMT):
@Legiit Sorry have not looked at the network in fabric-samples but if it launches the peer in dev mode then that's what you want

gravity (Fri, 28 Sep 2018 12:46:19 GMT):
Are there any plans to add a support of cert attributes in chaincode tests? For example, when use `MockStub`?

atirekg (Fri, 28 Sep 2018 15:04:04 GMT):
Hello

atirekg (Fri, 28 Sep 2018 15:04:24 GMT):
if anyone can me to setup a demo for login

atirekg (Fri, 28 Sep 2018 15:05:24 GMT):
I have got all the basic knowledge but not able to track how to setup CA authority to approve the transaction and logins for different kind of users

JuanSuero (Fri, 28 Sep 2018 16:08:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=spN5Cwcsj2Pb7J8u6) ?

zacpl (Fri, 28 Sep 2018 18:35:52 GMT):
Has joined the channel.

muralisr (Fri, 28 Sep 2018 21:50:02 GMT):
@JuanSuero I;m not answering the question directly (need to look into the chaincode properties) but you could redirect chaincode logs to peer logs by adding `CORE_VM_DOCKER_ATTACHSTDOUT=true` to the peer (ie, to the continaer that does `peer node start`). In addition you could control chaincode log level there with env CORE_CHAINCODE_LOGGING_LEVEL (as in `CORE_CHAINCODE_LOGGING_LEVEL=DEBUG`)

muralisr (Fri, 28 Sep 2018 21:51:01 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GLGyRMXaeDbD2tLhQ

muralisr (Fri, 28 Sep 2018 21:51:36 GMT):
@gravity not that I know of.... but contributions welcome!

muralisr (Fri, 28 Sep 2018 21:52:27 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fnveNkZQ8524ZvvDr

muralisr (Fri, 28 Sep 2018 21:53:00 GMT):
@atirekg if you have not already, #fabric-ca would be a good place to check on on this

muralisr (Fri, 28 Sep 2018 21:53:26 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=hc9WpitDnaECLWozo

muralisr (Fri, 28 Sep 2018 21:56:57 GMT):
@gravity it is..

muralisr (Fri, 28 Sep 2018 21:59:55 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bFjcZRA2d2WZBgDi9

muralisr (Fri, 28 Sep 2018 22:03:21 GMT):
@Ashish_ydv there have been some good suggestions / comments on this above (so you may already have got what you wanted) ... the key is that chaincode APIs such as pointed (https://github.com/hyperledger/fabric/blob/77c3aa6ce5b0cfba93bfda009095886dbcadff91/core/chaincode/shim/interfaces.go) (thanks, @waxer ) are the building blocks used to implement higher level functions such as those used by composer.

Andres3741 (Sat, 29 Sep 2018 17:14:16 GMT):
Has joined the channel.

Andres3741 (Sat, 29 Sep 2018 17:15:27 GMT):
Hi, hope y'all having a f amazing day, Im newbie in this, and I have a simply one question but I can't found some answers in sOverflow, So:

Andres3741 (Sat, 29 Sep 2018 17:17:02 GMT):
How can I instantiate a chain code in all the peers on an ORG at same time, also, how can I instantiate chain code automatically in a new peer? thank you very much

qsmen (Sun, 30 Sep 2018 02:24:32 GMT):
Hi experts, if one key is used in a chaincode, can I delete it using DelState? Thank you.

qsmen (Sun, 30 Sep 2018 02:24:32 GMT):
Hi experts, if one key is used in a chaincode, can I delete it using DelState in the same chaincode? Thank you.

atirekg (Sun, 30 Sep 2018 04:09:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZNFoFPyXRxy9HP8gi) @muralisr Thanks I will here as well

atirekg (Sun, 30 Sep 2018 04:10:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZNFoFPyXRxy9HP8gi) @muralisr Thanks I will here as well

fanliyan (Sun, 30 Sep 2018 08:03:36 GMT):
Has joined the channel.

muralisr (Sun, 30 Sep 2018 12:43:45 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ugwJYygg5itm5pnPR

muralisr (Sun, 30 Sep 2018 12:44:00 GMT):
yes, @qsmen

muralisr (Sun, 30 Sep 2018 12:44:26 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zEdtpw3S5zy2imumT

muralisr (Sun, 30 Sep 2018 12:53:24 GMT):
@Andres3741 there are two aspects to the question....(1) `Instantiate` command targets the instantiate proposal at the peer it is directed to. But the Commit of the instantiate transaction happens on all the peers in the channel. In other words, all the peers in the channel will see the instantitate TX and the states due to that TX after commit (2) to do the Instnatiate proposal itself on multiple peers, the proposal has to be sent to all the peers. Typically the SDKs take care of this. Based on the context of the question, `how can I instantiate chain code automatically in a new peer` - given (1), a new peer joining will sync up and get the instantiation TX. In addition, if the chaincode itself is installed on the new peer and it satisfies the endorsement policy, you can direct invokes and queries to the chaincode.

hyper-sunder (Mon, 01 Oct 2018 06:22:36 GMT):
hi Guys..... Can anyone tell me how to define `endorsement policy` using `nodejs sdk`? Can anyone share me the code base for the same????

Legiit (Mon, 01 Oct 2018 06:31:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eq95y5WDazAZMM49w) Where should you execute this step 3? In the CLI? @davidkel

hyper-sunder (Mon, 01 Oct 2018 06:34:45 GMT):
As well as, I am looking for two more help. 1. I have created a fabric network with `2-ca and 2-orgs with 2 peer node and one of them is endorsing node`. I am doing a value transaction in the `chaincode`. Whenever a transaction is invoked, the chaincode will be simulated in all endorsing peers. So, in my case there should be 2 simulations should happen. But value transaction is don only once. (value transaction means sending money from A to B). Actually, It should have been transferred twice, isn't it? What I am doing wrong????? 2. How to set up a real-time multi-organization fabric network?

hyper-sunder (Mon, 01 Oct 2018 06:34:45 GMT):
As well as, I am looking for two more help. 1. I have created a fabric network with `2-ca and 2-orgs with 2 peer node and one of them is endorsing node`. I am doing a value transaction in the `chaincode`. Whenever a transaction is invoked, the chaincode will be simulated in all endorsing peers. So, in my case there should be 2 simulations should happen. But value transaction is don only once. (value transaction means sending money from A to B ). Actually, It should have been transferred twice, isn't it? What I am doing wrong????? 2. How to set up a real-time multi-organization fabric network?

davidkel (Mon, 01 Oct 2018 06:55:18 GMT):
@Legiit you run it on a command line ,eg `CORE_CHAINCODE_ID_NAME="mycc:v0" node mychaincode.js --peer.address grpc://localhost:7052`

tballast (Mon, 01 Oct 2018 08:07:29 GMT):
Has joined the channel.

atirekg (Mon, 01 Oct 2018 09:08:19 GMT):
Hello, I am using Golang to write chaincode, how can I manage Permission and logins for user

atirekg (Mon, 01 Oct 2018 09:08:24 GMT):
please help me

maniyas (Mon, 01 Oct 2018 10:16:12 GMT):
Has joined the channel.

me_abhijeet (Mon, 01 Oct 2018 10:52:25 GMT):
https://docs.docker.com/compose/install/#upgrading

jrosmith (Mon, 01 Oct 2018 12:49:20 GMT):
@atirekg take a look at the [cid](https://github.com/hyperledger/fabric/tree/release-1.2/core/chaincode/lib/cid) library

jrosmith (Mon, 01 Oct 2018 12:51:04 GMT):
@hyper-sunder there are two simulations but only one transaction. the transaction is considered valid if and only if all simulations (as required by your endorsement policy) have the same output.

HarshiChandraSekar (Mon, 01 Oct 2018 12:55:24 GMT):
Has joined the channel.

vishal21pandita (Mon, 01 Oct 2018 12:58:55 GMT):
Has joined the channel.

HarshiChandraSekar (Mon, 01 Oct 2018 13:01:54 GMT):
In regard to calling a chaincode(go lang) through fabric nodejs API, The Request Object for the method sendTransactionProposal(req ChaincodeInvokeRequest) the ChaincodeInvokeRequest accepts only Array. as arguments for the invoke method to be called, IS there any other way/mechanism to pass arguments say..JSON, name/values.. .. present ordered way of arguments looks very odd.I am referring to Fabric V1.2 https://fabric-sdk-node.github.io/global.html#ChaincodeInvokeRequest.

atirekg (Mon, 01 Oct 2018 13:22:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Bs8bmyiYMkCJPmvRD) @jrosmith Thanks I have started looking into this

hyper-sunder (Mon, 01 Oct 2018 17:56:57 GMT):
@jrosmith thanks for the reply. The simulation actually executed the `chaincode` end to end and endorse them if they are valid. Once the simulations are done the `orderer-service` sends to `committing peers`. How does the value transaction from `A` to `B` is transferred only once. Hope I am clear.

Andres3741 (Mon, 01 Oct 2018 19:11:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=dQYnwW3gk4wxg6ChQ) @muralisr Thank you very much im understanding a little bit more!

gmkprabhu1983 (Mon, 01 Oct 2018 20:31:37 GMT):
Has joined the channel.

JuanSuero (Mon, 01 Oct 2018 20:36:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=T5WKY8pPgBB6kisPN) @muralisr thanks alot bro! i was able to get my chaincode logs into splunk

tahaf10 (Tue, 02 Oct 2018 09:58:51 GMT):
Can someone please show an example of a chaincode that uses couchDB as state database?

davidkel (Tue, 02 Oct 2018 10:08:58 GMT):
@tahaf10 the choice between couchdb and leveldb is a peer configuration. The only time chaincode cares what the state database is when performing a rich query on the world state.

davidkel (Tue, 02 Oct 2018 10:08:58 GMT):
@tahaf10 the choice between couchdb and leveldb is a peer configuration. The only time chaincode cares what the state database is when performing a rich query on the world state. So you want to find examples where a rich query is being performed. Have you looked at https://github.com/hyperledger/fabric-samples repo ?

davidkel (Tue, 02 Oct 2018 10:08:58 GMT):
@tahaf10 the choice between couchdb and leveldb is a peer configuration. The only time chaincode cares what the state database is when performing a rich query on the world state. So you want to find examples where a rich query is being performed. Have you looked at https://github.com/hyperledger/fabric-samples repo ? I would hope there are examples in there somewhere

tahaf10 (Tue, 02 Oct 2018 10:16:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GLXPHPKKYd5p5WQnt) @davidkel Yeah I'm looking at those but there was a confusion in my head that stateDB will effect chaincode. Thanks for clearing that up

tahaf10 (Tue, 02 Oct 2018 10:34:58 GMT):
Some codes follow the format ``` func (t *SimpleChaincode) createAccount(stub shim.ChaincodeStubInterface, args []string) ([]byte, error){} ```

tahaf10 (Tue, 02 Oct 2018 10:35:16 GMT):
While some do ``` func (t *SimpleChaincode) createAccount(stub shim.ChaincodeStubInterface, args []string) pb.response {} ```

tahaf10 (Tue, 02 Oct 2018 10:35:51 GMT):
whats the difference between pb.response and ([]byte,error) or is it the same thing?

Bartb0 (Tue, 02 Oct 2018 10:50:59 GMT):
Has joined the channel.

Gerhardvd (Tue, 02 Oct 2018 11:10:16 GMT):
Has joined the channel.

muralisr (Tue, 02 Oct 2018 11:34:21 GMT):
@tahaf10 the `Invoke (stub shim.ChaincodeStubInterface) ([]byte, error)` API interface was replaced with `Invoke (stub shim.ChaincodeStubInterface) (pb.response)` interface. The two versions of `createChaincode` probably reflects that

dave.enyeart (Tue, 02 Oct 2018 11:44:30 GMT):
@tahaf10 The CouchDB chaincode tutorial uses one of the fabric-samples chaincodes: https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html

tahaf10 (Tue, 02 Oct 2018 11:49:18 GMT):
Thankyou for the input guys

jrosmith (Tue, 02 Oct 2018 12:38:08 GMT):
@hyper-sunder the docs on [txflow](https://hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.html) do an excellent job explaining

theathibm (Tue, 02 Oct 2018 22:50:36 GMT):
How can I use nodejs version 10.11 in my nodejs chaincode?

theathibm (Tue, 02 Oct 2018 22:59:48 GMT):
the dev-peerxxx images spawn by peer seems to have a node js version of v8.11.3

theathibm (Tue, 02 Oct 2018 23:00:05 GMT):
I need to be able to use v10.11

theathibm (Tue, 02 Oct 2018 23:00:20 GMT):
any ideas how to do it?

sheetal-hlf (Wed, 03 Oct 2018 05:35:36 GMT):
Has joined the channel.

sheetal-hlf (Wed, 03 Oct 2018 05:44:16 GMT):
Hello All, is it a good practice to initialize variables in Init function of smart contract(we used golang SC)? We faced a scenario where the chaincode containers were stopped however after invoking smart contract the chaincode container was up which resulted in non-initialized global variables leaving a few transactions non-functional. Any comments are appreciated.

sheetal-hlf (Wed, 03 Oct 2018 05:45:20 GMT):
I got a reply that Init should not be used for initializing global variables; however I would like to know what is the purpose of Init function in smart contract

sheetal-hlf (Wed, 03 Oct 2018 05:45:43 GMT):
Could anyone please share their thoughts or pointers?

hyper-sunder (Wed, 03 Oct 2018 06:41:35 GMT):
@jrosmith thank you for your reply. Still I am not clear about it. NoP. Could you please tell me how to add endorsement policy using Fabric SDK (Java or Node)?

tahaf10 (Wed, 03 Oct 2018 07:23:14 GMT):
I get the following error when I try to instantiate my chaincode``` 68220f6dbb449ce325f80bf617c063b5d68: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/chaincode/adverce_chaincode chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:23:64: undefined: pb chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:26:9: cannot refer to unexported name shim.success chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:26:9: undefined: shim.success chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:29:66: undefined: pb chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:43:83: undefined: pb chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:96:12: undefined: click chaincode/input/src/github.com/chaincode/adverce_chaincode/mycode.go:97:27: undefined: JSON " ```

tahaf10 (Wed, 03 Oct 2018 07:24:14 GMT):
I have imported the shim library in my code ``` import ( "fmt" "strings" "github.com/hyperledger/fabric/core/chaincode/shim" ) ```

srinivasd (Wed, 03 Oct 2018 08:25:00 GMT):
Has joined the channel.

Legiit (Wed, 03 Oct 2018 09:16:18 GMT):
https://fabric-shim.github.io/ docs are down for node

Legiit (Wed, 03 Oct 2018 09:16:21 GMT):
404

Legiit (Wed, 03 Oct 2018 09:16:49 GMT):
I am interested in the same case @hyper-sunder

davidkel (Wed, 03 Oct 2018 09:46:30 GMT):
@Legiit A 1.1 version of the docs can be found at https://fabric-shim.github.io/release-1.1/

mbwhite (Wed, 03 Oct 2018 10:16:40 GMT):
Sorry for the issues with the JSDoc; we're adjusting the docs to support multiple versions on the same URL. Few changes to line up, up the end result is intended to follow the pattern `fabric-shim.github.io/release-v.r/ ` with the 'master' branch docs at `/master/` and the home url resdirects to the latest release docs

Legiit (Wed, 03 Oct 2018 10:43:42 GMT):
aah great! I've missed this feature :) @mbwhite

Legiit (Wed, 03 Oct 2018 10:45:01 GMT):
Are there actually any future plans to include a stubMock just like the Go SDK does?

davidkel (Wed, 03 Oct 2018 10:46:55 GMT):
@Legiit No sorry there isn't any plans. Would recommend using a mocking library like sinon.

Legiit (Wed, 03 Oct 2018 10:52:45 GMT):
Alright thanks! & to circle back to the chaincode in dev mode - I've done started the `chaincode-dev-mode` network and executed `CORE_CHAINCODE_ID_NAME="MyChaincode:143543" node dist/MyChaincode.js --peer.address grpc://localhost:7051` But it returns `chat stream with peer - on error: "Error: 12 UNIMPLEMENTED: unknown service protos.ChaincodeSupport`

davidkel (Wed, 03 Oct 2018 10:54:55 GMT):
@Legiit I would check that the version of the shim you are using matches the fabric peer you are talking to. Never use `latest` or `unstable` to reference a version of the fabric-shim you should always be specific, eg `^1.2.0` or even `1.2.0` to be even more specific

KindlebitPhp (Wed, 03 Oct 2018 10:58:00 GMT):
Has joined the channel.

Legiit (Wed, 03 Oct 2018 10:58:36 GMT):
Using fabric-shim 1.2.0 and got my docker images tagged on 1.2.0 aswell Although I am not very confident that the chaincode-dev-mode is running properly :thinking:

davidkel (Wed, 03 Oct 2018 11:07:20 GMT):
@Legiit just noticed, you are using the wrong port for the peer address, it should be 7052

Legiit (Wed, 03 Oct 2018 11:45:34 GMT):
Ah I tried 7051, 7052 and 7053 :P 7052 says connection failed, the other 2 the error above

ahmadzafar (Wed, 03 Oct 2018 13:25:14 GMT):
Can we call other chaincode function at the time of instantiate of the chaincode (with in the Init function)? I am getting this error [vscc] Validate -> ERRO 03f VSCC error: ValidateLSCCInvocation failed, err LSCC invocation is attempting to write to namespace balance (balance chaincode is invoking through new chaincode) [committer/txvalidator] validateTx -> ERRO 040 VSCCValidateTx for transaction txId ='..'

KaranBlockchain (Wed, 03 Oct 2018 13:29:08 GMT):
Hi , I am invoking a chaincode using command ``` perledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C karanchannel -n mycc -c '{"Args":["invoke","Rahul","N"]}' ``` and it runs successfully and I get this ``` checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-03 13:20:43.615 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2018-10-03 13:20:43.621 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 2018-10-03 13:20:43.622 UTC [main] main -> INFO 004 Exiting..... ``` But When I try to query the chaincode using same params after invoke I get error ``` kChaincodeCmdParams -> INFO 001 Using default escc 2018-10-03 13:22:29.598 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: {"Error":"Nil value for Rahul"}) - ```

KaranBlockchain (Wed, 03 Oct 2018 13:29:08 GMT):
Hi , I am invoking a chaincode using command ``` perledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C karanchannel -n mycc -c '{"Args":["invoke","Rahul","N"]}' ``` and it runs successfully and I get this ``` checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-03 13:20:43.615 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2018-10-03 13:20:43.621 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 2018-10-03 13:20:43.622 UTC [main] main -> INFO 004 Exiting..... ``` But When I try to query the chaincode using same params after invoke I get error ``` kChaincodeCmdParams -> INFO 001 Using default escc 2018-10-03 13:22:29.598 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: {"Error":"Nil value for Rahul"}) - ``` Can anyone please help me in fetching the data which I am inserting using the invoke

theathibm (Wed, 03 Oct 2018 14:27:53 GMT):
Is it possible to get a fabric-shim upgraded to use nodejs v10.x ???

davidkel (Wed, 03 Oct 2018 14:40:25 GMT):
@theathibm the node.js chaincode container runtime is 8.9.4 for 1.2 and I think is moving to 8.11.1 for 1.3. It will probably stay on Node 8 Lts for the 1.4 release, but I see that 10 is due to go LTS this month, but I think it unlikely it will move up to 10

subhanshu.kumar (Wed, 03 Oct 2018 15:03:31 GMT):
Has joined the channel.

subhanshu.kumar (Wed, 03 Oct 2018 15:03:58 GMT):
Hi Team, There is an illustration of model .bna using Participants (traders), Assets (commodities) and transactions in Hyperledger Fabric session. You might have several Traders & commodities and their transactions. My query is mentioned below. when Trader1 logs into the the application using thin client (web interface), - how do you authenticate him as Trader1 - how does the signing of transaction by Trader1 happens using his private_key

atirekg (Wed, 03 Oct 2018 16:28:41 GMT):
Guys I need urgent help Failed to invoke successfully :: Error: fabric-ca request register failed with errors [[{"code":0,"message":"Registration of 'office111' failed in affiliation validation: Failed getting affiliation 'org1.office': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set"}]] getting this error when registering user added following code in configtx.yaml ############################################################################# # Affiliation section ############################################################################# affiliations: org1: - department1 - office - office1 - office2 still getting the error

DebayanDey (Wed, 03 Oct 2018 17:17:34 GMT):
Has joined the channel.

muralisr (Wed, 03 Oct 2018 21:58:48 GMT):
@atirekg sounds like a question for the #fabric-ca channel....

mbwhite (Thu, 04 Oct 2018 07:58:12 GMT):
Hello; the `fabric-shim.github.io` API documentation is live again - sorry for the glitch whilst the multi-version support goes in. https://fabric-shim.github.io will always redirect to the latest release (which now as 1.3 is a release candidate is 1.3version)

mrjdomingus (Thu, 04 Oct 2018 08:09:38 GMT):
Has joined the channel.

Legiit (Thu, 04 Oct 2018 09:23:11 GMT):
How/where can we switch to other versioons? Or is this only possible by modifying the url? @mbwhite

mbwhite (Thu, 04 Oct 2018 09:51:04 GMT):
At this exact point in time - it's the URL modification. I would like to add to the main body of the read mes, some text links to the different version. A drop selection box for version would be preferred; though the JSDoc Template in use has no support for this. To start along the journey for that I have another JIRA in place to move the template from a 3rd party dependency into the main repo. Then that can be modified to provide a better experience.

AnirudhC (Thu, 04 Oct 2018 09:53:31 GMT):
anirudh

satyajitdeshmukh (Thu, 04 Oct 2018 10:02:34 GMT):
hello

satyajitdeshmukh (Thu, 04 Oct 2018 10:03:10 GMT):
Error response from daemon: manifest for hyperledger/fabric-ca:x86_64-1.3.0-rc1 not found

satyajitdeshmukh (Thu, 04 Oct 2018 10:03:41 GMT):
i got this error while setting up hyperledger 1.1 env

satyajitdeshmukh (Thu, 04 Oct 2018 10:04:19 GMT):
for installation i got command as curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0

satyajitdeshmukh (Thu, 04 Oct 2018 10:04:19 GMT):
for installation i got command as : " curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0 "

satyajitdeshmukh (Thu, 04 Oct 2018 10:05:21 GMT):
but if i see docker image they remove x86_64 from tag docker image tag

satyajitdeshmukh (Thu, 04 Oct 2018 10:05:21 GMT):
but if i see docker image they remove x86_64 from tag docker image tag.. ``` please suggest changes.. ```

AnirudhC (Thu, 04 Oct 2018 10:09:29 GMT):
Hi, I am trying setup Hyperledger Explorer (v.0.3.7) with Hyperledger Fabric 1.2 .Hyperledger Explorer's config.json file is configured as per the network. When I run the Hyperledger Explorer I am getting below error in Sync logs : postgres://hppoc:password@127.0.0.1:5432/fabricexplorer Sync process is started for the network : [network-1] and client : [client-1] <<<<<<<<<<<<<<<<<<<<<<<<<< Synchronizer Error >>>>>>>>>>>>>>>>>>>>> Error : [ 'Failed to connect client peer, please check the configuration and peer status' ] <<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor >>>>>>>>>>>>>>>>>>>>> Can anyone please suggest what I am missing?

satyajitdeshmukh (Thu, 04 Oct 2018 10:11:49 GMT):
Status: Downloaded newer image for hyperledger/fabric-tools:x86_64-1.1.0 ===> Pulling fabric ca Image ==> FABRIC CA IMAGE Error response from daemon: manifest for hyperledger/fabric-ca:x86_64-1.3.0-rc1 not found Error response from daemon: No such image: hyperledger/fabric-ca:x86_64-1.3.0-rc1 ===> Pulling thirdparty docker images ==> THIRDPARTY DOCKER IMAGE: couchdb Error response from daemon: manifest for hyperledger/fabric-couchdb:x86_64-0.4.12 not found Error response from daemon: No such image: hyperledger/fabric-couchdb:x86_64-0.4.12 ==> THIRDPARTY DOCKER IMAGE: kafka Error response from daemon: manifest for hyperledger/fabric-kafka:x86_64-0.4.12 not found Error response from daemon: No such image: hyperledger/fabric-kafka:x86_64-0.4.12 ==> THIRDPARTY DOCKER IMAGE: zookeeper Error response from daemon: manifest for hyperledger/fabric-zookeeper:x86_64-0.4.12 not found Error response from daemon: No such image: hyperledger/fabric-zookeeper:x86_64-0.4.12 ===> List out hyperledger docker images hyperledger/fabric-tools latest b7bfddf508bc 6 months ago 1.46GB hyperledger/fabric-tools x86_64-1.1.0 b7bfddf508bc 6 months ago 1.46GB hyperledger/fabric-orderer latest ce0c810df36a 6 months ago 180MB hyperledger/fabric-orderer x86_64-1.1.0 ce0c810df36a 6 months ago 180MB hyperledger/fabric-peer latest b023f9be0771 6 months ago 187MB hyperledger/fabric-peer x86_64-1.1.0 b023f9be0771 6 months ago 187MB hyperledger/fabric-javaenv latest 82098abb1a17 6 months ago 1.52GB hyperledger/fabric-javaenv x86_64-1.1.0 82098abb1a17 6 months ago 1.52GB hyperledger/fabric-ccenv latest c8b4909d8d46 6 months ago 1.39GB hyperledger/fabric-ccenv x86_64-1.1.0 c8b4909d8d46 6 months ago 1.39GB

tahaf10 (Thu, 04 Oct 2018 10:17:36 GMT):
I have developed and implemented chaincode for my logic on Fabric. Any tips on how to expose this logic now in the form of APis?

satyajitdeshmukh (Thu, 04 Oct 2018 11:45:57 GMT):
@tahaf10 use explorer

jrosmith (Thu, 04 Oct 2018 12:36:59 GMT):
@sheetal-hlf the fabric function of Init is called when the chaincode is instantiated and is meant to seed values in your ledger. you should not use this function to seed package level variables within the chaincode. in order to guarantee that package level variables are present in all instances of the chaincode when a container comes up, use go's built in [init](https://golang.org/doc/effective_go.html?#init) function

jrosmith (Thu, 04 Oct 2018 12:37:42 GMT):
@theathibm to my knowledge fabric does not support node >=9 at this time

jrosmith (Thu, 04 Oct 2018 12:43:16 GMT):
@hyper-sunder @Legiit you can send an endorsement policy up with node-sdk using [sendInstantiateProposal](https://fabric-sdk-node.github.io/Channel.html#sendInstantiateProposal__anchor), which takes in a [ChaincodeInstantiateUpgradeRequest](https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest) object that has a property of the [EndorsementPolicy](https://fabric-sdk-node.github.io/EndorsementPolicy.html) class.

jrosmith (Thu, 04 Oct 2018 12:43:16 GMT):
@hyper-sunder @Legiit you can send an endorsement policy up with node-sdk using [sendInstantiateProposal](https://fabric-sdk-node.github.io/Channel.html#sendInstantiateProposal__anchor), which takes in a [ChaincodeInstantiateUpgradeRequest](https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest) object that has a property of `endorsement-policy` that points to an instance of the [EndorsementPolicy](https://fabric-sdk-node.github.io/EndorsementPolicy.html) class.

nicolapaoli (Thu, 04 Oct 2018 14:56:29 GMT):
Has joined the channel.

ffiore81 (Thu, 04 Oct 2018 15:04:48 GMT):
Has joined the channel.

atirekg (Thu, 04 Oct 2018 15:07:50 GMT):
Hello guys, I have a question in PutState we need to give `key`, is there anyway I can create valid key dynamically

atirekg (Thu, 04 Oct 2018 15:07:50 GMT):
Hello guys, I have a question in PutState we need to give `key`, is there anyway I can create valid key dynamically It is confusing to ask for key every-time everywhere

jrosmith (Thu, 04 Oct 2018 16:20:15 GMT):
@atirekg what do you mean by 'create valid key dynamically'? the `key` reverenced in `PutState` is key for the transaction in the stateDB

nicolapaoli (Thu, 04 Oct 2018 16:31:15 GMT):
Hello, I am working on a chaincode where I need to read data previously stored from another one. They are instantiated on the same channel and I can use them individually to read and write data separately. In one of them (A) I implemented invokeChaincode(B), to read data stored by B. ``` func (chaincode *SimpleChaincode) queryMarblesFromAnotherChaincode(stub shim.ChaincodeStubInterface, args []string) peer.Response { queryMarble := "queryMarble" if len(args) != 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } chaincodeName := args[0] chaincodeArgs := toChaincodeArgs(queryMarble, args[1]) chaincodeChannel := args[2] response := stub.InvokeChaincode(chaincodeName, chaincodeArgs, chaincodeChannel) if response.Status != shim.OK { return shim.Error(fmt.Sprintf("Failed to query chaincode: %s", response.Payload)) } return shim.Success(response.Payload) }``` Running that method using `peer chaincode invoke ..` , I receive `status: 200`, but Payload is empty. Could you advice on what I am doing wrong?

nicolapaoli (Thu, 04 Oct 2018 16:31:15 GMT):
Hello, I am working on a chaincode where I need to read data previously stored from another one. They are instantiated on the same channel and I can use them individually to read and write data separately. In one of them (A) I implemented invokeChaincode(B), to read data stored by B. ``` func (chaincode *SimpleChaincode) queryMarblesFromAnotherChaincode(stub shim.ChaincodeStubInterface, args []string) peer.Response { queryMarble := "queryMarble" if len(args) != 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } chaincodeName := args[0] chaincodeArgs := toChaincodeArgs(queryMarble, args[1]) chaincodeChannel := args[2] response := stub.InvokeChaincode(chaincodeName, chaincodeArgs, chaincodeChannel) if response.Status != shim.OK { return shim.Error(fmt.Sprintf("Failed to query chaincode: %s", response.Payload)) } return shim.Success(response.Payload) }``` Running that method using `peer chaincode invoke ..` , I receive `status: 200`, but Payload is empty. Could you advise on what I am doing wrong?

atirekg (Fri, 05 Oct 2018 05:27:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ei8rAYTcPjGxfr4FA) @jrosmith yes right, and we have to provide it all the time and have to keep in mind that it was not in use already, so I don't want to remember it and want stateDB to generate it or there might be something from which I can get last used key and increment by 1 not sure

npc0405 (Fri, 05 Oct 2018 05:48:21 GMT):
Has joined the channel.

KaranBlockchain (Fri, 05 Oct 2018 11:54:03 GMT):
Hi All, I have installed First-network with respective peers and organizations and created and installed my own chaincode to perform transactions on the state ledger. I am able to instantiate my chaincode successfully and then query it as well but when I invoke my chaincode to enter a new value it shows successfully invoked but when I query it for the new values it gives error that values do not exist. Please help in this case: My invoke code: ``` peer chaincode invoke -o orderer.example.com:7050 --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 -C karanchannel -n mycc -c '{"Args":["invoke","Karan","N"]}' 2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2018-10-05 11:06:45.706 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 2018-10-05 11:06:45.706 UTC [main] main -> INFO 004 Exiting..... ``` My query code: ``` peer chaincode query -C karanchannel -n mycc -c '{"Args":["query","Rajat"]}' 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: {"Error":"Nil value for Rajat"}) - ```

KaranBlockchain (Fri, 05 Oct 2018 11:54:03 GMT):
Hi All, I have installed First-network with respective peers and organizations and created and installed my own chaincode to perform transactions on the state ledger. I am able to instantiate my chaincode successfully and then query it as well but when I invoke my chaincode to enter a new value it shows successfully invoked but when I query it for the new values it gives error that values do not exist. Please help in this case: My invoke code: ``` peer chaincode invoke -o orderer.example.com:7050 --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 -C karanchannel -n mycc -c '{"Args":["invoke","Rajat","N"]}' 2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2018-10-05 11:06:45.706 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 2018-10-05 11:06:45.706 UTC [main] main -> INFO 004 Exiting..... ``` My query code: ``` peer chaincode query -C karanchannel -n mycc -c '{"Args":["query","Rajat"]}' 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: {"Error":"Nil value for Rajat"}) - ```

jrosmith (Fri, 05 Oct 2018 14:03:47 GMT):
@atirekg why not just use the transaction id generated by fabric?

jrosmith (Fri, 05 Oct 2018 14:05:49 GMT):
@nicolapaoli try logging the response before returning `shim.Success` so you can see what the chaincode youre reading from is actually returning

nicolapaoli (Fri, 05 Oct 2018 15:48:02 GMT):
Thanks @jrosmith , I did that. Both `response.Payload` and `response.Message` are empty, while `response.Status` is `200`

nicolapaoli (Fri, 05 Oct 2018 15:49:23 GMT):
And I added the question on stackoverflow as well, feel free to add comments there if you want: https://stackoverflow.com/questions/52651920/hyperledger-fabric-chaincode-failed-to-read-data-from-another-chaincode-using

atirekg (Fri, 05 Oct 2018 15:57:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zJhbzHvDMdewWcCmf) @jrosmith ok

jrosmith (Fri, 05 Oct 2018 17:03:33 GMT):
@nicolapaoli i've replied there as well

npc0405 (Fri, 05 Oct 2018 18:27:37 GMT):
fmt.Println are not getting printed in chaincode

npc0405 (Fri, 05 Oct 2018 18:27:37 GMT):
fmt.Println are not getting printed in chaincode logs

npc0405 (Fri, 05 Oct 2018 18:27:47 GMT):
Any idea?

sheehan (Fri, 05 Oct 2018 22:52:49 GMT):
@npc0405 - I think if you set the env variable CORE_CHAINCODE_LOGGING_LEVEL to DEBUG you'll see fmt.Println output. Take a look at https://hyperledger-fabric.readthedocs.io/en/release-1.2/logging-control.html for a better way to write logs from chaincode

npc0405 (Sat, 06 Oct 2018 01:38:24 GMT):
Thanks @sheehan

qiangqinqq (Sat, 06 Oct 2018 07:34:30 GMT):
Has joined the channel.

Andres3741 (Sun, 07 Oct 2018 01:06:57 GMT):
Hi folks and sirs, Im going to modify the docker-compose.yaml of base network to achieve add a new peer sincerely I doesn't *found an explanation to *CORE_PEER_GOSSIP_BOOTSTRAP (CPGB), I see docker-compose-base.yaml of edx course byfn, and for example, the CPGB of peer 0 is pointing to peer 1 and viceversa but *what happens when I want to put 3 peers*? thanks in advance

yacovm (Sun, 07 Oct 2018 12:07:45 GMT):
@Andres3741 https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/core.yaml#L125-L131

yacovm (Sun, 07 Oct 2018 12:08:05 GMT):
An explanation can be found above ^

waxer (Sun, 07 Oct 2018 19:39:43 GMT):
@yacovm , thats the configuration file of the peer?

davidorr (Sun, 07 Oct 2018 20:09:23 GMT):
Has joined the channel.

Andres3741 (Sun, 07 Oct 2018 21:01:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=g5APaXf5Wo4iA44WK) @yacovm thanks, I see something like that on GitHub of a outdated forked repo, I suggested to make more noise of that I consider its so important for the noobs like me, the next one its a low importance q?, what is your favorite guide of do it a network step by step (since crypto-config to the docker-compose for the images), good day to y'all :)

yacovm (Sun, 07 Oct 2018 21:43:45 GMT):
@waxer yes

muralisr (Sun, 07 Oct 2018 23:04:10 GMT):
@Andres3741 `what is your favorite guide of do it a network step by step (since crypto-config to the docker-compose for the images)` - for a simple network setup that takes you through all the steps, https://github.com/hyperledger/fabric/tree/release-1.2/examples/e2e_cli would be a good start.You can follow the thread from https://github.com/hyperledger/fabric/blob/release-1.2/examples/e2e_cli/network_setup.sh#L92 and steps through configuration (in particular see how `generateArtifacts.sh` functions are used to create config artifacts), channel creation, chaincode interactions

muralisr (Sun, 07 Oct 2018 23:04:10 GMT):
@Andres3741 `what is your favorite guide of do it a network step by step (since crypto-config to the docker-compose for the images)` - for a simple network setup that takes you through all the steps, https://github.com/hyperledger/fabric/tree/release-1.2/examples/e2e_cli would be a good start.You can follow the thread from https://github.com/hyperledger/fabric/blob/release-1.2/examples/e2e_cli/network_setup.sh#L92 and steps through configuration (in particular see how `generateArtifacts.sh` functions are used to create config artifacts), channel creation, chaincode interactions. This requires you to clone the fabric.

muralisr (Sun, 07 Oct 2018 23:04:10 GMT):
@Andres3741 `what is your favorite guide of do it a network step by step (since crypto-config to the docker-compose for the images)` - for a simple network setup that takes you through all the steps, https://github.com/hyperledger/fabric/tree/release-1.2/examples/e2e_cli would be a good start.You can follow the thread from https://github.com/hyperledger/fabric/blob/release-1.2/examples/e2e_cli/network_setup.sh#L92 and steps through configuration (in particular see how `generateArtifacts.sh` functions are used to create config artifacts), channel creation, chaincode interactions. This requires you to clone the fabric and build the needed images/binaries.

muralisr (Sun, 07 Oct 2018 23:05:38 GMT):
Alternately you can also look at https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html

muralisr (Sun, 07 Oct 2018 23:05:38 GMT):
Alternately you can also look at https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html. This does not need you to clone the fabric but use instructions there to download the required images and binaries

muralisr (Sun, 07 Oct 2018 23:05:38 GMT):
Alternately you can also look at https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html#building-your-first-network. This does not need you to clone the fabric but use instructions there to download the required images and binaries

muralisr (Sun, 07 Oct 2018 23:08:53 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HBGuidQTdXoEunsek

muralisr (Sun, 07 Oct 2018 23:13:06 GMT):
`fmt.Println` should simply get into the logs whatever the log level maybe. You might have to delete the chaincode image in the docker env so fabric can build the new one with the `fmt.Println` change

muralisr (Sun, 07 Oct 2018 23:13:06 GMT):
@npc0405 `fmt.Println` should simply get into the logs whatever the log level maybe. You might have to delete the chaincode image in the docker env so fabric can build the new one with the `fmt.Println` change

Andres3741 (Mon, 08 Oct 2018 01:38:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=acHXzw22xGjqkdRcz) @muralisr Thanks I will check the other ones, the byfn, is good to start, but unfortunately doesn't explain why are every line for, you have to google it almost all. Thanks God this chat exists!!

Andres3741 (Mon, 08 Oct 2018 01:39:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8CM85ym4WY6iHLi6a) @muralisr what tutorial are your looking?

muralisr (Mon, 08 Oct 2018 01:41:49 GMT):
@Andres3741 I din't understand the question.. ?

muralisr (Mon, 08 Oct 2018 01:41:49 GMT):
@Andres3741 I didn't understand the question.. ?

KaranBlockchain (Mon, 08 Oct 2018 05:13:31 GMT):
Hi All, I have installed First-network with respective peers and organizations and created and installed my own chaincode to perform transactions on the state ledger. I am able to instantiate my chaincode successfully and then query it as well but when I invoke my chaincode to enter a new value it shows successfully invoked but when I query it for the new values it gives error that values do not exist. Please help in this case: My invoke code: ``` peer chaincode invoke -o orderer.example.com:7050 --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 -C karanchannel -n mycc -c '{"Args":["invoke","Rajat","N"]}' 2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc2018-10-05 11:06:45.699 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2018-10-05 11:06:45.706 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 2018-10-05 11:06:45.706 UTC [main] main -> INFO 004 Exiting..... ``` My query code: ``` peer chaincode query -C karanchannel -n mycc -c '{"Args":["query","Rajat"]}' 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-05 11:37:53.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: {"Error":"Nil value for Rajat"}) - ```

Legiit (Mon, 08 Oct 2018 09:45:20 GMT):
Are there any plans on exporting type definitions, so we can use Typescript for chaincode?

Legiit (Mon, 08 Oct 2018 09:47:17 GMT):
Just like the Node SDK, It would be nice to have types exported :) Like this: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.1/fabric-client/types/index.d.ts

davidkel (Mon, 08 Oct 2018 09:49:21 GMT):
@Legiit Typescript definition will be available in fabric 1.3

Legiit (Mon, 08 Oct 2018 11:11:47 GMT):
Awesome! @davidkel :D It's planned for upcoming month(s), right?

davidkel (Mon, 08 Oct 2018 11:19:29 GMT):
@Legiit 1.3-rc1 is available now (for fabric-shim, node-sdk you will need to get the latest 1.3 snapshots) but hopefully 1.3 will be released this week

KaranBlockchain (Mon, 08 Oct 2018 11:20:10 GMT):
Hi, Can anyone please help me? I m stuck at the previous scenario I posted. Would appreciate help as it is a bit urgent

Legiit (Mon, 08 Oct 2018 11:35:32 GMT):
Amazing!

GKumar (Mon, 08 Oct 2018 12:39:53 GMT):
Has joined the channel.

GKumar (Mon, 08 Oct 2018 12:40:45 GMT):
I am reading through key-level endorsement. As per the document we could write logic inside the chaincode to change the endorsement policy based on asset state. In this case suppose the chaincode at the peer is not updated with the latest version and mean time a transaction start then what will happen for the transaction endoresment.

GKumar (Mon, 08 Oct 2018 12:40:45 GMT):
I am reading through* key-level endorsement*. As per the document we could write logic inside the chaincode to change the endorsement policy based on asset state. In this case suppose the chaincode at the peer is not updated with the latest version and mean time a transaction start then what will happen for the transaction endoresment.

GKumar (Mon, 08 Oct 2018 12:40:45 GMT):
I am reading through *key-level endorsement* . As per the document we could write logic inside the chaincode to change the endorsement policy based on asset state. In this case suppose the chaincode at the peer is not updated with the latest version and mean time a transaction start then what will happen for the transaction endoresment.

atirekg (Mon, 08 Oct 2018 12:50:53 GMT):
Guys, anyone can tell me how to tamper data from outside or CLI

atirekg (Mon, 08 Oct 2018 12:51:06 GMT):
so I can check the data is tamper proof

muralisr (Mon, 08 Oct 2018 13:50:39 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AaZSdfZLimbhbq8ud

muralisr (Mon, 08 Oct 2018 13:51:48 GMT):
@KaranBlockchain the transaction from invoke woukld be sent to commit. Depending on config and load this could take a few seconds. Did you retry query after a bit of time ?

KaranBlockchain (Mon, 08 Oct 2018 14:18:57 GMT):
Hi Murali, I tried it several times after that but it did not work out not sure why. When I tried to query with the values from the instantiated Chaincode args it was successful but unfortunately invoke was not working

KaranBlockchain (Mon, 08 Oct 2018 14:24:45 GMT):
Here is my chaincode - package main import ( "fmt" //"strconv" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) // SimpleChaincode example simple Chaincode implementation type SimpleChaincode struct { } func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("ex02 Init") _, args := stub.GetFunctionAndParameters()//a typical program within Shim which allows arguments as funtion and parameters var Username, Fileuploaded string // Entities //var Aval, Bval int // Asset holdings var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } // Initialize the chaincode Username = args[0] //Aval, err = strconv.Atoi(args[1]) if err != nil { return shim.Error("Expecting integer value for asset holding") } Fileuploaded = args[1] //Bval, err = strconv.Atoi(args[3]) if err != nil { return shim.Error("Expecting integer value for asset holding") } fmt.Printf("Aval = %d, Bval = %d\n", Username, Fileuploaded) // Write the state to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } /*err = stub.PutState(Fileuploaded, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) }*/

KaranBlockchain (Mon, 08 Oct 2018 14:24:45 GMT):
package main import ( "fmt" //"strconv" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) // SimpleChaincode example simple Chaincode implementation type SimpleChaincode struct { } func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("ex02 Init") _, args := stub.GetFunctionAndParameters()//a typical program within Shim which allows arguments as funtion and parameters var Username, Fileuploaded string // Entities //var Aval, Bval int // Asset holdings var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } // Initialize the chaincode Username = args[0] //Aval, err = strconv.Atoi(args[1]) if err != nil { return shim.Error("Expecting integer value for asset holding") } Fileuploaded = args[1] //Bval, err = strconv.Atoi(args[3]) if err != nil { return shim.Error("Expecting integer value for asset holding") } fmt.Printf("Aval = %d, Bval = %d\n", Username, Fileuploaded) // Write the state to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } /*err = stub.PutState(Fileuploaded, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) }*/ return shim.Success(nil) } func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Supplychain2 Invoke") function, args := stub.GetFunctionAndParameters() if function == "invoke" { // Make payment of X units from A to B return t.invoke(stub, args) } else if function == "delete" { // Deletes an entity from its state return t.delete(stub, args) } else if function == "query" { // the old "Query" is now implemtned in invoke return t.query(stub, args) } return shim.Error("Invalid invoke function name. Expecting \"invoke\" \"delete\" \"query\"") } // Transaction makes payment of X units from A to B func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { //var A, B string // Entities //var Aval, Bval int // Asset holdings //var X int // Transaction value var Username, Fileuploaded string var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } Username = args[0] Fileuploaded = args[1] // Get the state from the ledger // TODO: will be nice to have a GetAllState call to ledger /*Avalbytes, err := stub.GetState(A) if err != nil { return shim.Error("Failed to get state") } if Avalbytes == nil { return shim.Error("Entity not found") } Aval, _ = strconv.Atoi(string(Avalbytes)) Bvalbytes, err := stub.GetState(B) if err != nil { return shim.Error("Failed to get state") } if Bvalbytes == nil { return shim.Error("Entity not found") } Bval, _ = strconv.Atoi(string(Bvalbytes))*/ // Perform the execution //X, err = strconv.Atoi(args[2]) //if err != nil { // return shim.Error("Invalid transaction amount, expecting a integer value") //} //Aval = Aval - X //Bval = Bval + X //fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval) // Write the state back to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } /* err = stub.PutState(Fileuploaded, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) }*/ return shim.Success(nil) } // Deletes an entity from state func (t *SimpleChaincode) delete(stub shim.ChaincodeStubInterface, args []string) pb.Response { if len(args) != 1 { return shim.Error("Incorrect number of arguments. Expecting 1") } Username := args[0] // Delete the key from the state in ledger err := stub.DelState(Username) if err != nil { return shim.Error("Failed to delete state") } return shim.Success(nil) } // query callback representing the query of a chaincode func (t *SimpleChaincode) query(stub shim.ChaincodeStubInterface, args []string) pb.Response { var Username string // Entities var err error if len(args) != 1 { return shim.Error("Incorrect number of arguments. Expecting name of the person to query") } Username = args[0] // Get the state from the ledger Usernamevalbytes, err := stub.GetState(Username) if err != nil { jsonResp := "{\"Error\":\"Failed to get state for " + Username + "\"}" return shim.Error(jsonResp) } if Usernamevalbytes == nil { jsonResp := "{\"Error\":\"Nil value for " + Username + "\"}" return shim.Error(jsonResp) } jsonResp := "{\"Name\":\"" + Username + "\",\"Amount\":\"" + string(Usernamevalbytes) + "\"}" fmt.Printf("Query Response:%s\n", jsonResp) return shim.Success(Usernamevalbytes) } func main() { err := shim.Start(new(SimpleChaincode)) if err != nil { fmt.Printf("Error starting Simple chaincode: %s", err) } }

KaranBlockchain (Mon, 08 Oct 2018 14:40:05 GMT):
Just updated my code

muralisr (Mon, 08 Oct 2018 15:28:28 GMT):
It'll be good to see Invoke code.. in any case, given that you have been changing code and retrying its possible that fabric is actually using chaincode image from previous runs. Suggest try deleting the old chaincode image (`docker rmi `) and try

KaranBlockchain (Mon, 08 Oct 2018 15:34:37 GMT):
@muralisr I pasted wrong chaincode in chat previously and hence posted correct chaincode afterwards - here is my Invoke code :``` func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Supplychain2 Invoke") function, args := stub.GetFunctionAndParameters() if function == "invoke" { // Make payment of X units from A to B return t.invoke(stub, args) } else if function == "delete" { // Deletes an entity from its state return t.delete(stub, args) } else if function == "query" { // the old "Query" is now implemtned in invoke return t.query(stub, args) } return shim.Error("Invalid invoke function name. Expecting \"invoke\" \"delete\" \"query\"") } ```

KaranBlockchain (Mon, 08 Oct 2018 15:36:52 GMT):
``` // Transaction makes payment of X units from A to B func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { //var A, B string // Entities //var Aval, Bval int // Asset holdings //var X int // Transaction value var Username, Fileuploaded string var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } Username = args[0] Fileuploaded = args[1] // Get the state from the ledger // TODO: will be nice to have a GetAllState call to ledger /*Avalbytes, err := stub.GetState(A) if err != nil { return shim.Error("Failed to get state") } if Avalbytes == nil { return shim.Error("Entity not found") } Aval, _ = strconv.Atoi(string(Avalbytes)) Bvalbytes, err := stub.GetState(B) if err != nil { return shim.Error("Failed to get state") } if Bvalbytes == nil { return shim.Error("Entity not found") } Bval, _ = strconv.Atoi(string(Bvalbytes))*/ // Perform the execution //X, err = strconv.Atoi(args[2]) //if err != nil { // return shim.Error("Invalid transaction amount, expecting a integer value") //} //Aval = Aval - X //Bval = Bval + X //fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval) // Write the state back to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } /* err = stub.PutState(Fileuploaded, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) }*/ return shim.Success(nil) } ```

bandreghetti (Mon, 08 Oct 2018 18:31:58 GMT):
Has joined the channel.

bandreghetti (Mon, 08 Oct 2018 20:04:21 GMT):
What are these awkward bytes between org's MSPID and PEM-formatted certificate in the return of `stub.GetCreator()`?

Andres3741 (Mon, 08 Oct 2018 21:26:47 GMT):
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded

Andres3741 (Mon, 08 Oct 2018 21:28:33 GMT):
Hi, I am installing the BYFN in my friend Mac, and it throws 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 search in orderer.example.com error logs and it says: *checkResourcesOrPanic -> CRIT 005 [channel byfn-sys-channel] config requires unsupported channel capabilities: Channel capability V1_3 is required but not supported: Channel capability V1_3 is required but not supported* someone can help us?

Andres3741 (Mon, 08 Oct 2018 21:29:22 GMT):
we doesn't modify anything of byfn.sh and first of all we execute the byfn.sh generate

KaranBlockchain (Mon, 08 Oct 2018 21:42:41 GMT):
orderer.example.com:7050: failed to create new connection: context deadline exceeded - I had same issue and had to recreate my VM and it worked fine afterwards, didn't get root cause though. Try removing all docker images and start afresh.

Andres3741 (Mon, 08 Oct 2018 21:45:11 GMT):
yeah I just made it and nothing

Andres3741 (Mon, 08 Oct 2018 21:45:23 GMT):
were downloading 1.2.1

Andres3741 (Mon, 08 Oct 2018 21:45:46 GMT):
and all fabric images have the same version

Andres3741 (Mon, 08 Oct 2018 21:46:18 GMT):

Clipboard - October 8, 2018 4:46 PM

Andres3741 (Mon, 08 Oct 2018 21:46:41 GMT):

Clipboard - October 8, 2018 4:46 PM

muralisr (Tue, 09 Oct 2018 01:15:03 GMT):
@Andres3741 if you were trying wit 1.2.1, the error `Channel capability V1_3 is required but not supported: Channel capability V1_3 is required but not supported` implies invalid configuration file such as configx.yaml. If the problem persists after you clean up before trying 1.2.1,suggest you try in #fabric-orderer

Andres3741 (Tue, 09 Oct 2018 02:29:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FHD8mP2oQZv6Ewkam) @muralisr Thanks y'all, its solved, my specs: Osx Mojave(I know :( ) Fabric 1.2.1 Docker version 17.09.1-ce

Andres3741 (Tue, 09 Oct 2018 02:30:31 GMT):
I just solved using the 1.2.0-rc1, really I don't know WHY?

Andres3741 (Tue, 09 Oct 2018 02:30:59 GMT):
I just used the same steps. .byfn generate .byfn up and nothing else!

NageshCR (Tue, 09 Oct 2018 02:43:28 GMT):
Has joined the channel.

KaranBlockchain (Tue, 09 Oct 2018 07:57:48 GMT):
@muralisr any thoughts regarding the invoke chaincode, its not working - it gives success message at the end but query doesn't works for the new values even after waiting for long time. Here is invoke code without any comments ``` func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { var Username, Fileuploaded string var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } Username = args[0] Fileuploaded = args[1] // Get the state from the ledger // TODO: will be nice to have a GetAllState call to ledger // Write the state back to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } return shim.Success(nil) } ```

atirekg (Tue, 09 Oct 2018 07:59:16 GMT):
Hi all

atirekg (Tue, 09 Oct 2018 07:59:22 GMT):
when I run ./startFabric.sh

atirekg (Tue, 09 Oct 2018 07:59:37 GMT):
I am getting error # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 docker-compose -f docker-compose.yml down ERROR: yaml.parser.ParserError: while parsing a block mapping in "./docker-compose.yml", line 12, column 3 expected , but found '' in "./docker-compose.yml", line 50, column 4

atirekg (Tue, 09 Oct 2018 08:00:09 GMT):
I have added additional ca and peers for org2

atirekg (Tue, 09 Oct 2018 09:05:21 GMT):
Got it solved there was a additional space added in yml file

atirekg (Tue, 09 Oct 2018 10:30:31 GMT):
Hello guys, anyone knows anything about the below one # Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer1.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx 2018-10-09 10:20:07.951 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1

waxer (Tue, 09 Oct 2018 11:13:33 GMT):

bandreghetti (Tue, 09 Oct 2018 16:12:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=biBBXRYAwy2J2Rdzf) Anyone? "/

atirekg (Tue, 09 Oct 2018 18:02:58 GMT):
hello guys getting this error Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 14 UNAVAILABLE: TCP Write failed

atirekg (Tue, 09 Oct 2018 18:03:13 GMT):
any idea about it?

davidkel (Tue, 09 Oct 2018 18:03:37 GMT):
@bandreghetti getCreator returns a Protobuf so contains protobuf metadata as well as the values of the fields it contains. Ideally would would decode the protobuf based on the protobuf description.

bandreghetti (Tue, 09 Oct 2018 18:21:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3x8JkrMpgKxvqRRJt) @davidkel how do I decode a protobuf? can you point me to somewhere where I can read more about this?

davidkel (Tue, 09 Oct 2018 18:25:54 GMT):
@bandreghetti I'm not familar enough with GoLang chaincode but I thought there was a CID library that handles getting information about the creator

bandreghetti (Tue, 09 Oct 2018 18:31:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SivjmmCAuhaRyMvc5) @davidkel just found it thanks to you! just for the sake of sharing here is the import path for the library "github.com/hyperledger/fabric/core/chaincode/lib/cid"

atirekg (Tue, 09 Oct 2018 18:33:35 GMT):
guys how to add another organization and peer in existing network

atirekg (Tue, 09 Oct 2018 18:33:41 GMT):
any idea?

smb2796 (Tue, 09 Oct 2018 19:11:22 GMT):
Has joined the channel.

bandreghetti (Tue, 09 Oct 2018 20:46:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=NtBpkCTfR9zPoA8Zt) @atirekg this probably belongs to #fabric-questions but you will need to update the channel config (in orderer) with new org's MSP

bandreghetti (Tue, 09 Oct 2018 20:47:31 GMT):
please refer to this tutorial: https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html

grapebaba (Wed, 10 Oct 2018 02:19:25 GMT):
Has joined the channel.

tahaf10 (Wed, 10 Oct 2018 06:09:15 GMT):
Is there any direction or information related to chaincode optimization for better performance?

jrosmith (Wed, 10 Oct 2018 15:23:38 GMT):
@tahaf10 the general rule is to keep it as simple as possible. keep in mind that chaincode gets run during both endorsement and validation, so if you put computationally expensive functions inside of the chaincode the slowdown will be twofold.

Ammu (Wed, 10 Oct 2018 15:42:20 GMT):

node.png

KaranBlockchain (Wed, 10 Oct 2018 15:44:12 GMT):
@Ammu did you try downgrading the node version? and also which version of python you have installed

Ammu (Wed, 10 Oct 2018 15:47:09 GMT):
org@org-VirtualBox:~$ python -V Python 2.7.12

Ammu (Wed, 10 Oct 2018 15:49:14 GMT):
@KaranBlockchain

KaranBlockchain (Wed, 10 Oct 2018 15:53:31 GMT):
@Ammu Please take a look here https://github.com/PeculiarVentures/pkcs11js/issues/15

KaranBlockchain (Wed, 10 Oct 2018 15:55:17 GMT):
The issue is probably related to G++

Ammu (Wed, 10 Oct 2018 16:02:52 GMT):
@KaranBlockchain facing the same error

atirekg (Wed, 10 Oct 2018 16:06:00 GMT):
@Ammu node version should be between 8-9 and try npm install without sudo

Ammu (Wed, 10 Oct 2018 16:07:04 GMT):
oh mine node version 10

atirekg (Wed, 10 Oct 2018 16:07:51 GMT):
downgrade the node version

Ammu (Wed, 10 Oct 2018 16:08:16 GMT):
ok

Ammu (Wed, 10 Oct 2018 16:08:27 GMT):
thanks:slight_smile:

muralisr (Wed, 10 Oct 2018 20:59:07 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aBQoBJuhynXLR9Nfy

muralisr (Wed, 10 Oct 2018 21:01:05 GMT):
@jrosmith `the general rule is to keep it as simple as possible.` - agreed ... ` keep in mind that chaincode gets run during both endorsement and validation` -- chaincode is run only during endorsement (you may be thinking of the system chaincode `vscc` that runs during commit time validation

muralisr (Wed, 10 Oct 2018 21:01:05 GMT):
@jrosmith `the general rule is to keep it as simple as possible.` - agreed ... ` keep in mind that chaincode gets run during both endorsement and validation` -- chaincode is run only during endorsement (you may be thinking of the system chaincode `vscc` that runs during commit time validation)

PengLC (Thu, 11 Oct 2018 09:05:24 GMT):
Has joined the channel.

akoenig (Thu, 11 Oct 2018 13:13:49 GMT):
Hi, is there any chance to write an policy with "this user" should not endorse the chaincode?

akoenig (Thu, 11 Oct 2018 13:14:01 GMT):
there is just AND and OR and not NOT for example

vieiramanoel (Thu, 11 Oct 2018 15:45:37 GMT):
Has joined the channel.

vieiramanoel (Thu, 11 Oct 2018 15:48:42 GMT):
Hi guys, I've a rest api, on chaincode I change the status of response before return shim e.g ```shimError := shim.Error(err.Error()) errorCode, err := strconv.Atoi(result) if err != nil { return shim.Error(err.Error()) } shimError.Status = int32(errorCode) return shimError``` . But at fabric-sdk-go the chaincode status is always 0 ``` resp, err := channelClient.Execute(invokeRequest) if err != nil { log.Printf("Put Error:\n%+v\n", resp) w.WriteHeader(int(resp.ChaincodeStatus)) # always 0 w.Write([]byte(err.Error())) return }```

vieiramanoel (Thu, 11 Oct 2018 15:49:10 GMT):
how do I get status returned at pb.response?

vieiramanoel (Thu, 11 Oct 2018 15:49:42 GMT):
I want to manage error codes between chaincode and rest, instead of returning always 500 for internal error

AnirudhC (Thu, 11 Oct 2018 17:34:14 GMT):
I am trying to fetch encyption key from Vault from HashiCorp in Chaincode(Go lang). GET request to Vault is failing. Can anyone please help me how to send GET request to Vault?

AnirudhC (Thu, 11 Oct 2018 17:34:14 GMT):
Hi, I am trying to fetch encyption key from Vault from HashiCorp in Chaincode(Go lang). GET request to Vault is failing. Can anyone please help me how to send GET request to Vault?

AnirudhC (Thu, 11 Oct 2018 17:34:14 GMT):
Hi, I am trying to fetch encyption key from Vault from HashiCorp in Chaincode(Go lang). GET request to Vault is failing. Can anyone please help me on this?

qubing (Fri, 12 Oct 2018 03:07:45 GMT):
Has joined the channel.

qubing (Fri, 12 Oct 2018 03:08:22 GMT):
maven

nikolas (Fri, 12 Oct 2018 09:16:30 GMT):
Has joined the channel.

nikolas (Fri, 12 Oct 2018 09:19:20 GMT):
hi, i am on fabric 1.2.1, on a simple network with 3 orgs. Trying to instantiate a very simple piece of chaincode and I get `Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction 8916b5a1e84e3c3061b72f7b99cb536509ec1a7ef5ca244c5b0043e2c55cf589: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/chaincode/testcc runtime.main_main·f: relocation target main.main not defined runtime.main_main·f: undefined: "main.main"`

nikolas (Fri, 12 Oct 2018 09:20:26 GMT):
in my init method I actually check for nothing, just return "success". I really appreciate your thoughts.

atirekg (Fri, 12 Oct 2018 12:04:31 GMT):
Guys, anyone have knowledge how to use this API https://fabric-sdk-node.github.io/AffiliationService.html

jrosmith (Fri, 12 Oct 2018 13:11:39 GMT):
@atirekg #fabric-sdk-node would be a better place to ask

atirekg (Fri, 12 Oct 2018 16:51:56 GMT):
Guys, trying to upgrade my chaincode current version is app-1.0 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 upgrade -C mychannel -n apple-app -v 1.1 -p github.com/apple-app -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')"

atirekg (Fri, 12 Oct 2018 16:51:56 GMT):
Guys, trying to upgrade my chaincode current version is app-1.0 running following command to upgrade `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 upgrade -C mychannel -n app -v 1.1 -p github.com/app -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')"`

atirekg (Fri, 12 Oct 2018 16:53:22 GMT):
my command to install was this `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 app -v 1.0 -p github.com/app`

atirekg (Fri, 12 Oct 2018 16:54:50 GMT):
error I am getting `2018-10-12 16:43:03.267 UTC [endorser] callChaincode -> INFO 0c8 [][f208804e] Entry chaincode: name:"cscc" 2018-10-12 16:43:03.271 UTC [endorser] callChaincode -> INFO 0c9 [][f208804e] Exit chaincode: name:"cscc" (5ms) 2018-10-12 16:43:03.296 UTC [endorser] callChaincode -> INFO 0ca [mychannel][d19e1b99] Entry chaincode: name:"lscc" 2018-10-12 16:43:03.298 UTC [lscc] executeDeployOrUpgrade -> ERRO 0cb cannot get package for chaincode (app:1.1)-err:open /var/hyperledger/production/chaincodes/app.1.1: no such file or directory 2018-10-12 16:43:03.304 UTC [endorser] callChaincode -> INFO 0cc [mychannel][d19e1b99] Exit chaincode: name:"lscc" (8ms) 2018-10-12 16:43:03.305 UTC [endorser] ProcessProposal -> ERRO 0cd [mychannel][d19e1b99] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: d19e1b99b9370fc9635bd97afee2a62ce835749184a7eec1eee65d73ae289fcb ubuntu@ip-172-31-16-152:~/example/app$ 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`

atirekg (Fri, 12 Oct 2018 16:54:50 GMT):
error I am getting `2018-10-12 16:43:03.267 UTC [endorser] callChaincode -> INFO 0c8 [][f208804e] Entry chaincode: name:"cscc" 2018-10-12 16:43:03.271 UTC [endorser] callChaincode -> INFO 0c9 [][f208804e] Exit chaincode: name:"cscc" (5ms) 2018-10-12 16:43:03.296 UTC [endorser] callChaincode -> INFO 0ca [mychannel][d19e1b99] Entry chaincode: name:"lscc" 2018-10-12 16:43:03.298 UTC [lscc] executeDeployOrUpgrade -> ERRO 0cb cannot get package for chaincode (app:1.1)-err:open /var/hyperledger/production/chaincodes/app.1.1: no such file or directory 2018-10-12 16:43:03.304 UTC [endorser] callChaincode -> INFO 0cc [mychannel][d19e1b99] Exit chaincode: name:"lscc" (8ms) 2018-10-12 16:43:03.305 UTC [endorser] ProcessProposal -> ERRO 0cd [mychannel][d19e1b99] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: d19e1b99b9370fc9635bd97afee2a62ce835749184a7eec1eee65d73ae289fcb ubuntu@ip-172-31-16-152:~/example/app$ 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`

atirekg (Fri, 12 Oct 2018 16:54:50 GMT):
error I am getting 2018-10-12 16:43:03.267 UTC [endorser] callChaincode -> INFO 0c8 [][f208804e] Entry chaincode: name:"cscc" 2018-10-12 16:43:03.271 UTC [endorser] callChaincode -> INFO 0c9 [][f208804e] Exit chaincode: name:"cscc" (5ms) 2018-10-12 16:43:03.296 UTC [endorser] callChaincode -> INFO 0ca [mychannel][d19e1b99] Entry chaincode: name:"lscc" 2018-10-12 16:43:03.298 UTC [lscc] executeDeployOrUpgrade -> ERRO 0cb cannot get package for chaincode (app:1.1)-err:open /var/hyperledger/production/chaincodes/app.1.1: no such file or directory 2018-10-12 16:43:03.304 UTC [endorser] callChaincode -> INFO 0cc [mychannel][d19e1b99] Exit chaincode: name:"lscc" (8ms) 2018-10-12 16:43:03.305 UTC [endorser] ProcessProposal -> ERRO 0cd [mychannel][d19e1b99] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: d19e1b99b9370fc9635bd97afee2a62ce835749184a7eec1eee65d73ae289fcb ubuntu@ip-172-31-16-152:~/example/app$ 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

atirekg (Fri, 12 Oct 2018 17:09:51 GMT):
anyone?

atirekg (Fri, 12 Oct 2018 17:32:03 GMT):
2018-10-12 17:30:13.780 UTC [chaincodeCmd] upgrade -> DEBU 04f endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg cannot get package for chaincode (app:2.0)

muralisr (Fri, 12 Oct 2018 17:48:39 GMT):
@atirekg from #fabric-peer-endorser-committer:

muralisr (Fri, 12 Oct 2018 17:48:42 GMT):
https://chat.hyperledger.org/channel/fabric-peer-endorser-committer?msg=foKvX4hnQNrCWCgTj

mattremy (Sat, 13 Oct 2018 13:06:53 GMT):
Is there a way that a.pak file (generated using peer chaincode package ) installed using java-sdk? I don't see an option in the sdk

muralisr (Sat, 13 Oct 2018 13:08:48 GMT):
@mattremy can you check in #fabric-sdk-java ?

mattremy (Sat, 13 Oct 2018 13:13:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TZoSoebDSm7HASA3e) @muralisr @muralisr Sure thanks have posted there

KaranBlockchain (Sun, 14 Oct 2018 14:54:21 GMT):
@muralisr any thoughts regarding the invoke chaincode, its not working - it gives success message at the end but query doesn't works for the new values even after waiting for long time. Here is invoke code without any comments ``` func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { var Username, Fileuploaded string var err error if len(args) != 2 { return shim.Error("Incorrect number of arguments. Expecting 2") } Username = args[0] Fileuploaded = args[1] // Get the state from the ledger // TODO: will be nice to have a GetAllState call to ledger // Write the state back to the ledger err = stub.PutState(Username, []byte(Fileuploaded)) if err != nil { return shim.Error(err.Error()) } return shim.Success(nil) } ```

greg2git (Sun, 14 Oct 2018 19:43:30 GMT):
Has joined the channel.

halilkalkan (Mon, 15 Oct 2018 05:20:14 GMT):
Has joined the channel.

LabibFarag (Mon, 15 Oct 2018 05:24:47 GMT):
Has joined the channel.

gauravgiri (Mon, 15 Oct 2018 06:43:31 GMT):
This query is regarding unit testing at the level of chaincode for feature introduced in v1.1 fabric Attribute Based Access Control. How can we unit test this particular feature at the level of chaincode, process/steps, any examples of unit test? Thank You,

gauravgiri (Mon, 15 Oct 2018 06:43:31 GMT):
This query is regarding unit testing at the level of chaincode for feature introduced in v1.1 fabric Attribute Based Access Control. What is the best method to unit test this particular feature at the level of chaincode, process/steps, any examples of unit test? Thank You.

Legiit (Mon, 15 Oct 2018 07:15:52 GMT):
Small suggestion for fabric-shim-node - winston is currently at version 3 and has it's types included in the repo Thus it's possible to upgrade winston and remove @types/winston as it's not maintained anymore Reference: https://github.com/hyperledger/fabric-chaincode-node/blob/74a0971086dca999afd8fbe997edcea315b0615c/fabric-shim/package.json#L36

sstone1 (Mon, 15 Oct 2018 13:11:50 GMT):
@Legiit do you fancy submitting a CR for this? there's a handy guide to contributing here: https://hyperledger-fabric.readthedocs.io/en/release-1.3/CONTRIBUTING.html

atirekg (Mon, 15 Oct 2018 16:18:51 GMT):
Guys, accidentally all of my Docker were Exited, now when I am trying to get them back to live, I am facing the issues between Peer and CouchDB connection

atirekg (Mon, 15 Oct 2018 16:19:35 GMT):
`docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb` I am using this command

atirekg (Mon, 15 Oct 2018 16:20:13 GMT):
and my container ca.example.com orderer.example.com and couchdb are up

atirekg (Mon, 15 Oct 2018 16:20:13 GMT):
and my container `ca.example.com orderer.example.com and couchdb` are up

atirekg (Mon, 15 Oct 2018 16:20:27 GMT):
but peer0.org1.example.com still not up

atirekg (Mon, 15 Oct 2018 16:20:27 GMT):
but `peer0.org1.example.com` still not up

atirekg (Mon, 15 Oct 2018 16:20:33 GMT):
any idea?

atirekg (Mon, 15 Oct 2018 16:21:13 GMT):
I guess this is the issue `2018-10-15 16:19:15.023 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb request in 2s. Attempt:5 Error:Get http://couchdb:5984/: dial tcp 192.168.32.4:5984: getsockopt: connection refused`

AnirudhC (Mon, 15 Oct 2018 17:15:36 GMT):
Hi, Is it possible to store keystore , certificates, credetialStore, MSP etc to store in Vault (Hashicorp vault) and access them from Vault while setting up HL fabric network?

siva.a (Mon, 15 Oct 2018 17:39:06 GMT):
Has joined the channel.

Rajanraj101 (Mon, 15 Oct 2018 18:01:43 GMT):
Has joined the channel.

joenyzio (Tue, 16 Oct 2018 02:01:20 GMT):
Has joined the channel.

Rachit_gaur (Tue, 16 Oct 2018 05:55:34 GMT):
Is there a way to trigger automated events?

alejandrolr (Tue, 16 Oct 2018 09:47:56 GMT):
Has joined the channel.

alejandrolr (Tue, 16 Oct 2018 09:50:40 GMT):
Hi all I want to use the cid library in my chaincode, but it seems that it is not included into the ccenv image. One workaround is to map my local folder to the container when building the chaincode, but I cannot use the SDK install... Any idea??

alejandrolr (Tue, 16 Oct 2018 09:53:20 GMT):
I'm using v1.1

DeepaMotwani (Tue, 16 Oct 2018 11:43:08 GMT):
Has joined the channel.

DeepaMotwani (Tue, 16 Oct 2018 11:45:20 GMT):
018-10-16T11:09:20.013Z ERROR [lib/chaincode.js] uncaughtException: Cannot find module 'fabric-contract-api' {"date":"Tue Oct 16 2018 11:09:20 GMT+0000 (UTC)","process":{"pid":16,"uid":0,"gid":0,"cwd":"/usr/local/src","execPath":"/usr/local/bin/node","version":"v8.9.4","argv":["/usr/local/bin/node","/usr/local/src/unilever.js","--peer.address","peer0.U2K2.com:7052"],"memoryUsage":{"rss":51322880,"heapTotal":22994944,"heapUsed":15138656,"external":195384}},"os":{"loadavg":[6.1162109375,11.40771484375,6.43701171875],"uptime":476},"trace":[{"column":15,"file":"module.js","function":"Module._resolveFilename","line":538,"method":"_resolveFilename","native":false},{"column":25,"file":"module.js","function":"Module._load","line":468,"method":"_load","native":false},{"column":17,"file":"module.js","function":"Module.require","line":587,"method":"require","native":false},{"column":18,"file":"internal/module.js","function":"require","line":11,"method":null,"native":false},{"column":18,"file":"/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js","function":null,"line":9,"method":null,"native":false},{"column":30,"file":"module.js","function":"Module._compile","line":643,"method":"_compile","native":false},{"column":10,"file":"module.js","function":"Module._extensions..js","line":654,"method":".js","native":false},{"column":32,"file":"module.js","function":"Module.load","line":556,"method":"load","native":false},{"column":12,"file":"module.js","function":"tryModuleLoad","line":499,"method":null,"native":false},{"column":3,"file":"module.js","function":"Module._load","line":491,"method":"_load","native":false}],"stack":["Error: Cannot find module 'fabric-contract-api'"," at Function.Module._resolveFilename (module.js:538:15)"," at Function.Module._load (module.js:468:25)"," at Module.require (module.js:587:17)"," at require (internal/module.js:11:18)"," at Object. (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:9:18)"," at Module._compile (module.js:643:30)"," at Object.Module._extensions..js (module.js:654:10)"," at Module.load (module.js:556:32)"," at tryModuleLoad (module.js:499:12)"," at Function.Module._load (module.js:491:3)"]} I am getting an error as "uncaught exception, cannot find module fabric-contract-api"

purandam (Tue, 16 Oct 2018 11:46:27 GMT):
I am also facing same issue.

davidkel (Tue, 16 Oct 2018 11:47:42 GMT):
@mbwhite ^^^^

gumnaaaaam (Tue, 16 Oct 2018 11:53:53 GMT):
Has joined the channel.

mbwhite (Tue, 16 Oct 2018 12:22:53 GMT):
Hello; @purandam @DeepaMotwani could you let me know what version of fabric-shim you have please, and what the `start` script is inside your package.json

mbwhite (Tue, 16 Oct 2018 12:23:08 GMT):
(thanks @davidkel for ping)

purandam (Tue, 16 Oct 2018 12:26:27 GMT):
{ "name": "example_cc", "version": "1.0.0", "description": "node-js version of example_02.go chaincode", "engines": { "node": ">=8.4.0", "npm": ">=5.3.0" }, "scripts": { "start": "node unilever.js" }, "engine-strict": true, "license": "Apache-2.0", "dependencies": { "fabric-shim": "unstable" } }

mbwhite (Tue, 16 Oct 2018 12:27:37 GMT):
ok thanks; ... as a workaround in the short term `npm install fabric-contract-api` should solve the problem. This is the updated programming model for smart contracts.

mbwhite (Tue, 16 Oct 2018 12:27:58 GMT):
Though it wasn't intended to make existing contracts break :-(

mbwhite (Tue, 16 Oct 2018 12:28:23 GMT):
(or change to the stable version of fabric-shim )

purandam (Tue, 16 Oct 2018 12:30:21 GMT):
Already I have installed the "fabric-contract-api"

purandam (Tue, 16 Oct 2018 12:30:21 GMT):
Already I have installed the "fabric-contract-api" . But getting same error

mbwhite (Tue, 16 Oct 2018 12:31:47 GMT):
it's not listed in the dependencies?

purandam (Tue, 16 Oct 2018 12:32:13 GMT):
Yes . I have installed globally . Not in package.json

mbwhite (Tue, 16 Oct 2018 12:32:37 GMT):
would you mind trying locally please?

purandam (Tue, 16 Oct 2018 12:33:39 GMT):
@mbwhite Ok

purandam (Tue, 16 Oct 2018 12:33:39 GMT):
@mbwhite Ok. I am trying to install in locally.

purandam (Tue, 16 Oct 2018 12:37:52 GMT):
which version can I add under the dependency file of "fabric-contract-api"

mbwhite (Tue, 16 Oct 2018 12:51:22 GMT):
sorry @unstable

purandam (Tue, 16 Oct 2018 12:51:30 GMT):
Upadated Package.json { "name": "example_cc", "version": "1.0.0", "description": "node-js version of example_02.go chaincode", "engines": { "node": ">=8.4.0", "npm": ">=5.3.0" }, "scripts": { "start": "node unilever.js" }, "engine-strict": true, "license": "Apache-2.0", "dependencies": { "fabric-shim": "1.2.2", "fabric-contract-api" : "1.3.0-snapshot.1" } } Though it is not working

mbwhite (Tue, 16 Oct 2018 12:53:03 GMT):
Shim 1.2.2 should have no reference to the contract-api at all.

mbwhite (Tue, 16 Oct 2018 12:53:50 GMT):
I've just tried that and I get errors as my fabric peer isn't running - but that's all.

mbwhite (Tue, 16 Oct 2018 12:54:09 GMT):
just to double check (as I often forget this) have you emptied out the node_modules folder?

purandam (Tue, 16 Oct 2018 13:01:20 GMT):
@mbwhite Thanks for your support. Now it is working with the version of "fabric-shim: 1.2.2". Could you please suggest which version of fabric-Shim we should use. We are using fabric1.2.0 images.

mbwhite (Tue, 16 Oct 2018 13:02:02 GMT):
fabric-shim:1.2.2

mbwhite (Tue, 16 Oct 2018 13:02:35 GMT):
The unstable tag is from the master branch; the one under active development.

purandam (Tue, 16 Oct 2018 13:06:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=avhKJEx8mRY34DRtq) @mbwhite @mbwhite thanks for sharing your knowledge . Due to the issue we are unable to develop our application form last 4 hour. Again thanks for your valuable time.

mbwhite (Tue, 16 Oct 2018 13:07:35 GMT):
of course. sorry this was an issue... Was there a specific reason you wanted to use unstable?

purandam (Tue, 16 Oct 2018 13:09:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aiJP6zEGqyc38iHT6) @mbwhite No. We are just want to take latest and updated one. Time of chaincode instantiation which url try to hit from the local.

mbwhite (Tue, 16 Oct 2018 13:10:38 GMT):
fair enough :-)

purandam (Tue, 16 Oct 2018 13:14:53 GMT):
Actually when I try to hit command for instantiation, it goes in intermediate state, but due to some proxy issue it doesn't get instantiate, so which URL I have to whitelist in my server to get it successfully instantiated??

purandam (Tue, 16 Oct 2018 13:17:45 GMT):
@mbwhite Actually when I hit command for instantiation of chaincode, it goes in intermediate state. But later doesn't get instantiate, due to some proxy issue, so can you provide me URL where it goes, so that i may whitelist the URL to get it successfully done.

mbwhite (Tue, 16 Oct 2018 13:20:51 GMT):
will depend on how your fabric is configured... usually the chaincode is started with `--peer.address=localhost:7052` for a dev environment

purandam (Tue, 16 Oct 2018 13:22:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=svYMtb7wtzaYi9wuP) @mbwhite thanks

mbwhite (Tue, 16 Oct 2018 13:47:56 GMT):
@DeepaMotwani does moving to the `fabric-shim:stable` solve your problem as well?

nkl199 (Tue, 16 Oct 2018 13:59:13 GMT):
Has joined the channel.

AnirudhC (Tue, 16 Oct 2018 17:52:46 GMT):
Hi, Is it possible to store keystore , certificates, credetialStore, MSP etc to store in Vault (Hashicorp vault) and access them from Vault while setting up HL fabric network?

muralisr (Tue, 16 Oct 2018 17:59:19 GMT):
@AnirudhC can you try the question in #fabric-crypto please ?

toddinpal (Tue, 16 Oct 2018 23:22:57 GMT):
is there a way to get transaction details ala queryTransaction in the SDK from chaincode?

bh4rtp (Wed, 17 Oct 2018 00:21:20 GMT):
Has joined the channel.

DeepaMotwani (Wed, 17 Oct 2018 05:16:16 GMT):
@mbwhite yes it solved my problem. Thanks for your help.

alejandrolr (Wed, 17 Oct 2018 08:27:04 GMT):
Hi people I want to install and instantiate a chaincode that uses "github.com/hyperledger/fabric/core/chaincode/lib/cid" library, I've got it using the CLI mapping the cid folder using a volume. Now, I want to use the fabric SDK to install and instantiate this chaincode using an API, but got this error ```2018-10-17 07:54:41.586 UTC [chaincode-platform] func1 -> ERRO 031 Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/certificates/go/certificates.go:22: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 "``` I've read that govendor is an option to solve that, any help about how to use it, please?

alejandrolr (Wed, 17 Oct 2018 09:30:44 GMT):
solved! I needed to copy my project to my local GOPATH and it worked fine

resreassure (Wed, 17 Oct 2018 13:05:40 GMT):
Has joined the channel.

waxer (Wed, 17 Oct 2018 13:27:15 GMT):
Question: I'm looking https://godoc.org/github.com/hyperledger/fabric/protos/msp#SerializedIdentity . Why there're properties that start with XXX_ ?

Taffies (Thu, 18 Oct 2018 04:25:43 GMT):
Hello, I am trying to write an endorsement policy in the CLI with endorsements from multiple orgs needed, as specified: `"OutOf (3, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member', 'Org4MSP.member', 'Org5MSP.member')"` When I try to invoke I keep having endorsement policy error, I think it is unable to reach the other organisations to get the endorsements. Does anyone know how to troubleshoot this?

atirekg (Thu, 18 Oct 2018 09:26:58 GMT):
Guys, I am trying to deploy new Organization with 1 CA and 3 Peer in existing network if anyone can help me

atirekg (Thu, 18 Oct 2018 09:30:57 GMT):
Generated Peers and certificate files and created docker-compose-new-org2.yaml file and run `docker-compose -f docker-compose-new-org2.yaml up -d` now my dockers are up for new org2

atirekg (Thu, 18 Oct 2018 09:31:13 GMT):
but I am facing issue while joining the channel

rthatcher (Thu, 18 Oct 2018 10:26:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=73fy9xoFTGK8SRwQN) @atirekg - I think you might want to ask this question in the #fabric channel

decameron (Thu, 18 Oct 2018 21:17:18 GMT):
Has joined the channel.

vdods (Thu, 18 Oct 2018 23:48:15 GMT):
Hi all, how does one disable the "Queries on pvt data is supported only in a read-only transaction" check for private collections? I understand why a draconian default would be used to guarantee that private data has zero chance of making it onto the public ledger, but that's a very special subcase. I would like to satisfy that contract myself without this unnecessary rule, as some of my mutation transactions on private data require -- suprise, suprise -- reading that private data in order to decide what to do.

vdods (Thu, 18 Oct 2018 23:49:20 GMT):
I realize that it's possible to break up the single transaction that I want to write into several transactions to satisfy the strict privacy constraint, but this really complicates things

vdods (Thu, 18 Oct 2018 23:49:20 GMT):
I realize that it's possible to break up the single transaction that I want to write into several transactions to satisfy the strict privacy constraint, but that would really complicates things

kh.nguyen (Fri, 19 Oct 2018 00:19:03 GMT):
Has joined the channel.

waxer (Fri, 19 Oct 2018 01:51:05 GMT):
There is any example on how to call another chaincode using InvokeChaincode?

yacovm (Fri, 19 Oct 2018 10:30:20 GMT):
you mean rich queries?

yacovm (Fri, 19 Oct 2018 10:30:26 GMT):
or range queries?

yacovm (Fri, 19 Oct 2018 10:30:39 GMT):
@vdods

Legiit (Fri, 19 Oct 2018 11:12:55 GMT):
can we use the enrollment privateKeyPEM and signedCertPEM to sign transactions offline?

dave.enyeart (Fri, 19 Oct 2018 11:57:41 GMT):
@vdods The reason rich and range queries are not allowed in private data read/write transactions, is that private data may be missing on a peer and therefore the range or rich query may give you incomplete and different results across peers - not something you want to tolerate in a transactional system. If you are determined to do it anyways, you can split it into a read range/rich query followed by separate transactions for each key, where you read/write each key individually (single key reads are safe in read/write transactions as missing data can be identified based on the public hash and you'll get an error if it is missing). Alternatively you can make at least the keys public and do range queries on the public keys and writes to private keys, in a single read/write transaction.

dave.enyeart (Fri, 19 Oct 2018 11:57:41 GMT):
@vdods The reason rich and range queries are not allowed in private data read/write transactions, is that private data may be missing on a peer and therefore the range or rich query may give you incomplete and different results across peers - not something you want to tolerate in a transactional system. If you are determined to do it anyways, you can split it into a private read range/rich query followed by separate transactions for each private key, where you read/write each key individually (single private key reads are safe in read/write transactions as missing data can be identified based on the public hash and you'll get an error if it is missing). Alternatively you can make at least the keys public and do range queries on the public keys and writes to private keys, in a single read/write transaction.

ShefaliMittal (Fri, 19 Oct 2018 12:23:09 GMT):
Has joined the channel.

ShefaliMittal (Fri, 19 Oct 2018 12:23:30 GMT):
Hello, Can any one please tell me how do I external package to my chaincode. I read about go vendor but unable to get the proper understanding about it. Also if possible please provide some set of commands that I could execute to include the required package.

yousaf (Fri, 19 Oct 2018 19:19:43 GMT):
If a peer has installed multiple same named multiple chaincodes for multiple channels(which the peer have joined.) then is it necessary that their versions should be different?

kingpasan (Fri, 19 Oct 2018 20:53:10 GMT):
Has joined the channel.

ruien (Mon, 22 Oct 2018 03:22:40 GMT):
Has joined the channel.

rmaurer (Mon, 22 Oct 2018 13:10:18 GMT):
Has joined the channel.

DeepakMP (Mon, 22 Oct 2018 15:41:10 GMT):
Has joined the channel.

DeepakMP (Mon, 22 Oct 2018 15:42:58 GMT):
Hi I'm trying to call my chaincodes from an external applications. I'm having trouble getting started? Can anyone point me to a simple api server example? I'm not finding anything in the standard samples and generally searches aren't being very helpful either. I just need a 'hello-world', I'll expand on that next.

DeepakMP (Mon, 22 Oct 2018 15:43:19 GMT):
A tutorial would also be fine.

tahaf10 (Wed, 24 Oct 2018 06:55:53 GMT):
I have defined a struct in my chaincode which has a field createdAt of type time.Time I'm confused on how to A)- Enter the time as time.now() can't be used in chaincode and if I pass from front end then its in JSON format how do I convert it into a golang time object, and B)- How do I implement a query in my chaincode so that I can get a list of objects which were created between a range ( a start date and an end date)

amolpednekar (Wed, 24 Oct 2018 07:15:38 GMT):
Are there any tools for testing chaincode for common security flaws? or any good automated testing tools specific to Fabric? I tried googling a lot but didnt find anything promising, most Unit Testing with MockStub

laurasp (Wed, 24 Oct 2018 08:46:11 GMT):
Has joined the channel.

laurasp (Wed, 24 Oct 2018 08:50:17 GMT):
Hi all. Can you please tell me if this is the right cannel for Fabric API or address me to the righ channel and mailing list? thanks

purandam (Wed, 24 Oct 2018 09:59:38 GMT):
I am facing one issue when try to instantiate chaincode in the secured server. Time of instantiation it is try try to invoke "npm registry" from the container. But container can not resolve the url. Though those URls are white listed from proxy. Q1) How to avoid the npm registry invoke time of chaincode instantiation? Q2) We have set the proxy in base.yaml file. But it unable to resolve the url. Is there another way yo set the proxy to invoke the npm registry from container.

purandam (Wed, 24 Oct 2018 09:59:38 GMT):
I am facing one issue when we try to instantiate chaincode at the secured server. Time of instantiation it is trying to invoke "npm registry" from the container. But container can not resolve the url. Though those URls are white listed from proxy. Q1) How to avoid the npm registry invoke time of chaincode instantiation? Q2) We have set the proxy in base.yaml file. But it unable to resolve the url. Is there another way yo set the proxy to invoke the npm registry from container.

arcynosure (Wed, 24 Oct 2018 11:25:28 GMT):
Has joined the channel.

arcynosure (Wed, 24 Oct 2018 11:25:34 GMT):
Hi, Cud u like help me to solve this problem in hyperledger fabric, i was trying to setup a fabric network consisting of 3 Organisations and 12 peers. I have used ur chainhero tutorial as a reference. I have built the network and it is up and running but when i try to run the built file (./chain-heroes in ur example) the SDK and resource management gets created but then this error shows up Unable to initialize the Fabric SDK: failed to save channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: 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 Then i checked the orderer logs and i see this [cauthdsl] deduplicate -> ERRO 259 Principal deserialization failure (MSP Org1 is unknown) Now my doubt is that i have used the same setup.go file u have used in ur tutorial. Is there any issue in using the setup.go file u used for single org setup for multi org setup? Please do help me, thanks in advance.

zimabry (Wed, 24 Oct 2018 20:43:33 GMT):
When my BYFN file does chaincode instantiate it fails that chaincode exists.. but on each peer when I do docker ps -a it is not there on any peer. I even run docker system prune and the ordered script still fails on chaincode instantiate. Please help!

tahaf10 (Thu, 25 Oct 2018 05:22:48 GMT):
Can someone tell me how to query for date range in Fabric golang chaincode when date is defined in struct as time.Time?

cagdast (Thu, 25 Oct 2018 07:36:58 GMT):
Has joined the channel.

purandam (Thu, 25 Oct 2018 11:39:26 GMT):
I am facing one issue when we try to instantiate chaincode at the secured server. Time of instantiation it is trying to invoke "npm registry" from the container. But container can not resolve the url. Though those URls are white listed from proxy. Q1) How to avoid the npm registry invoke time of chaincode instantiation? Q2) We have set the proxy in base.yaml file. But it unable to resolve the url. Is there another way yo set the proxy to invoke the npm registry from container.

karthikmohan91 (Thu, 25 Oct 2018 11:48:51 GMT):
Has joined the channel.

rbrozo (Thu, 25 Oct 2018 12:17:28 GMT):
Has joined the channel.

albert.lacambra (Thu, 25 Oct 2018 19:56:20 GMT):
Hi while trying to instantiate a chaincode I am having this error 2018-10-25 19:45:14.055 UTC [gossip/state] commitBlock -> ERRO 0b3 Got error while committing(unexpected Previous block hash. Expected PreviousHash = [2e2048fcf6bcc4d99c210d7cdd99e135e0de419e35d6ccc7f5a1d58e25bc6ad0], PreviousHash referred in the latest block= [19ee18412db71ea5ddbc52a9e6fd4d8a56c8de695e15f7755e2dd3db7b675370] *the peer is immediatly killed* I have no idea what can be :s here whole stacktzrace in case it helps: https://gist.github.com/alacambra/4f7d3e2c488bf4282c22d9910e3bb54d

migrenaa (Fri, 26 Oct 2018 16:06:07 GMT):
Hello guys. Is there a way to ensure that a chaincode is called by another chaincode?

yacovm (Fri, 26 Oct 2018 16:45:51 GMT):
you can look at the name of the target cc in the proposal... and if it's not the same as your chaincode then it means it's a CC2CC

jrosmith (Fri, 26 Oct 2018 19:38:21 GMT):
@tahaf10 if you are going to be using time in your chaincode you should be retrieving it from the proposal, using `stub.getTxTimestamp()`, this ensures the time will be the same across all endorsing peers. you can parse the epoch time from this timestamp and manage it that way.

jrosmith (Fri, 26 Oct 2018 19:39:08 GMT):
@laurasp can you be a bit more specific? if youre asking about the chaincode stub, then sure this is a good place. if youre talking about peer/orderer/sdk interactions then probably not

purandam (Mon, 29 Oct 2018 10:39:30 GMT):
Without internet how to instantiate chaincode ?

purandam (Mon, 29 Oct 2018 10:39:30 GMT):
I am using node sdk. Without internet how to instantiate chaincode ?

mko (Mon, 29 Oct 2018 11:25:37 GMT):
Has joined the channel.

nhrishi (Mon, 29 Oct 2018 13:02:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZGxKHH3NBtYMriMt2) @dave.enyeart @dave.enyeart does this GetPrivateDataByPartialCompositeKey function falls under rich or range queries category as well.

dave.enyeart (Mon, 29 Oct 2018 13:38:08 GMT):
Yes, GetPrivateDataByPartialCompositeKey is a type of range query

waxer (Mon, 29 Oct 2018 14:45:07 GMT):
Question: I'm looking at fabric-samples/balance-transfert application, in specific the 'getBlockByNumber'... I extracted the important code here https://pastebin.com/x27ngzzE . Line 13 doesn't seem wrong?.. 'peer' variable is i.e: 'peer0.org1.example.com', but is a parameter of `parseInt`... seems like a parenthesis 'bug'. But I ran the code and it seems to be running ok... What am I missing here?

Paradox-AT (Mon, 29 Oct 2018 15:12:42 GMT):
Has joined the channel.

nhrishi (Tue, 30 Oct 2018 04:27:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZuAtApwdZ5GSmkqC3) @dave.enyeart Okay sure, Thanks Dave.

HarshiChandraSekar (Tue, 30 Oct 2018 10:12:24 GMT):
Hello! Regarding invoking/Querying chaincode from nodejs to fabric shim.IS there a way of passing the data from fabric layer through peer.response , which returns a byte array, what if we need a json to be populated , how to pass on json style data from peer.response(byte[]), which is received through Response.Payload,however you could get those as byte[], the need is to receive it as JSON/struct ,how can we achieve this? In simple how to send json data through peer.response?

maxuto (Tue, 30 Oct 2018 12:03:05 GMT):
Has joined the channel.

aviralwal (Tue, 30 Oct 2018 12:12:28 GMT):
Has joined the channel.

jrosmith (Tue, 30 Oct 2018 12:48:29 GMT):
@HarshiChandraSekar just encode your json as a bytes in the chaincode, send it back to the node sdk, and then decode the resulting buffer in the application

NilsP 1 (Wed, 31 Oct 2018 09:35:57 GMT):
Has joined the channel.

fcabo (Wed, 31 Oct 2018 10:47:33 GMT):
Has joined the channel.

MuhammedHafil (Wed, 31 Oct 2018 13:01:12 GMT):
Has joined the channel.

tahaf10 (Thu, 01 Nov 2018 11:33:59 GMT):
I have defined 2 structs in my chaincode. When I insert an object of first struct with ID 1 it gets inserted, but when I insert another object of type 2nd struct with ID 1 it says ID already exists. Using couchdb for statedb. Shouldn't these 2 be 2 different tables?

dave.enyeart (Thu, 01 Nov 2018 11:40:59 GMT):
@tahaf10 I answered your dup question in #fabric-questions

andrewhw (Thu, 01 Nov 2018 13:51:36 GMT):
Has joined the channel.

migrenaa (Thu, 01 Nov 2018 14:48:54 GMT):
Hey :) Have you used `github.com/hyperledger/fabric/core/chaincode/lib/cid` ? when I am getting the identityID using GetID(stub) it returns some huge string which looks like a public key or something like that. Do you have any idea why? If I cannot take the userID via this library, how can I?

MikeEmery (Thu, 01 Nov 2018 16:24:25 GMT):
Has joined the channel.

MikeEmery (Thu, 01 Nov 2018 17:19:54 GMT):
So the hyperledger docs mention it is possible for two different chaincodes to access the same ledger: https://hyperledger-fabric.readthedocs.io/en/release-1.3/peers/peers.html#multiple-chaincodes however, when running the peer command to instantiate a chaincode there is no option to specify the ledger name. The resulting couchdb tables are separated by chaincode name and calls to get/put state can't reach across the boundary either. Do the docs really just mean that multiple chaincode functions in the same deployment can share a ledger? Any suggestions for what to try?

MikeEmery (Thu, 01 Nov 2018 17:32:38 GMT):
I've been working around it for now by invoking against the other chaincode by name, but it doesn't seem ideal

dave.enyeart (Thu, 01 Nov 2018 17:37:45 GMT):
@MikeEmery In that doc context ledger=channel. For clarify let's use channel term instead of ledger. When you instantiate a chaincode you do indicate the channel. The channel can support multiple chaincodes. Chaincode data lives within its own namespace on the channel. A chaincode can only access it's own data. But a chaincode can invoke another chaincode on the channel, thereby supporting channel transactions spanning multiple chaincodes. This separation is designed on purpose, for example you may have different access control logic in each of the chaincodes.

dave.enyeart (Thu, 01 Nov 2018 17:37:45 GMT):
@MikeEmery In that doc context ledger=channel. For clarify let's use channel term instead of ledger. When you instantiate a chaincode you do indicate the channel. The channel can support multiple chaincodes. Chaincode data lives within its own namespace on the channel. A chaincode can only access it's own data. But a chaincode can invoke another chaincode on the channel, thereby supporting channel transactions spanning multiple chaincodes. This separation is designed on purpose, for example you may have different access control logic in each of the chaincodes (you wouldn't want chaincodeA directly accessing chaincodeB data)

MikeEmery (Thu, 01 Nov 2018 17:47:41 GMT):
@dave.enyeart perfect, thank you very much for the clarification!

MikeEmery (Thu, 01 Nov 2018 17:49:16 GMT):
So in a sense, there isn't really a difference between accessing data across different channels (assuming they are both installed on the same peer) and within the same channel

dave.enyeart (Thu, 01 Nov 2018 18:36:15 GMT):
@MikeEmery There is one significant difference... you can do cross-chaincode transactions within a channel, but not across channels. Read more about it here: i’d be interested in seeing those logs, for the three scenarios (regular data, private data scenarios with push, and private data scenarios with pull), for each leveldb and couchdb. total of 6 tests.

dave.enyeart (Thu, 01 Nov 2018 18:36:15 GMT):
@MikeEmery There is one significant difference... you can do cross-chaincode transactions within a channel, but not across channels. Read more about it here:

dave.enyeart (Thu, 01 Nov 2018 18:36:29 GMT):
https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/interfaces.go#L66-L80

MikeEmery (Thu, 01 Nov 2018 18:40:02 GMT):
@dave.enyeart :thumbsup: thanks again!

gravity (Fri, 02 Nov 2018 11:24:31 GMT):
hello is there any way to call system chaincode? for example, If I want to get a list of channels available for client, can I somehow call `GetChannels` function from `cscc`? I stuck here, because a channel must be specified when invoke/call chaincode. but which one should I use in this case?

GiovanniNapoli (Fri, 02 Nov 2018 12:52:05 GMT):
Has joined the channel.

GiovanniNapoli (Fri, 02 Nov 2018 12:52:40 GMT):
Hi all, is there a way to get transactions IDs without using SDKs? I'm wryting a system chaincode and i need this functionality

GiovanniNapoli (Fri, 02 Nov 2018 12:52:50 GMT):
Is there also a way to marshal block Data [][]byte (ordered transactions) into JSON?

GiovanniNapoli (Fri, 02 Nov 2018 12:53:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aqBzgcG6t38PhS2gL) If not, what's the fastest way to get transactions ID inside a block?

GiovanniNapoli (Fri, 02 Nov 2018 12:54:44 GMT):
In general, as I user i need to know transactions ID inside blocks, because the SysCC i'm writing need to use this parameters to do certain operations

GiovanniNapoli (Fri, 02 Nov 2018 12:54:44 GMT):
In general, as I user i need to know transactions ID inside blocks, because the SysCC i'm writing needs to use this parameters to do certain operations

DeepakMP (Sat, 03 Nov 2018 03:59:13 GMT):
https://stackoverflow.com/questions/53127253/my-hyperledger-fabric-fails-to-detect-function-despite-being-defined-in-chaincod

mayank-sahai (Sat, 03 Nov 2018 10:15:57 GMT):
Has joined the channel.

rbole (Sat, 03 Nov 2018 10:34:19 GMT):
Hi, is there an other channel for questions about fabric-chaincode-node or I'm here in the right place?

Kingson (Sat, 03 Nov 2018 13:27:47 GMT):
Has joined the channel.

jrosmith (Sat, 03 Nov 2018 15:26:38 GMT):
@rbole this is for all chaincode dev, so yes node chaincode questions are welcome here

muralisr (Sat, 03 Nov 2018 23:15:45 GMT):
@gravity system chaincodes can be called from other chaincodes provided they are allowed to be called from other chaincodes. `cscc` by definition is not allowed to be called from other chaincodes

muralisr (Sat, 03 Nov 2018 23:18:36 GMT):
@GiovanniNapoli the `qscc` system chaincode queries ledger for blocks, transactions etc. That might be a good example for you to model.

GiovanniNapoli (Mon, 05 Nov 2018 08:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5GSTFSfYD5Xwq9nkq) @muralisr Thank you. And what if i would need to manage phisically peer's copy of the ledger? I saw in `peer/node/start.go` thant there's an initialization which inits also this so-called "provider" using the Singleton pattern. In my SysCC I need to replace some data on the blockfile_XXXX (replace an entire transaction, for instance)...How can i do that?

Mr.Reddington (Mon, 05 Nov 2018 10:18:22 GMT):
Has joined the channel.

Mr.Reddington (Mon, 05 Nov 2018 10:18:57 GMT):
Hi experts, I have built a simple rest API in Go using “github.com/gorilla/mux” with a simple POST and GET method. I build my chain code with a simple structure and It works. The chaincode has two methods, one that puts new elements to the chaincode and get elements from the chaincode. I’m connecting to the peer (“docker exec -it cli bash”) and calling the invoke method from the same terminal that I installed the chaincode, and it works. I’m checking the Couch Db and the records gets updated. The invoke method looks like this: peer chaincode invoke -o orderer.example.com:7050 --tells --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n marbles01 -c '{"Args":["CreateWareHousesFromFile","mr1","BCN","35","Tom", "Alex"]}' Know I’m traing to make the same Invoke call from my Go REST API and I’m stack, any wane knows how to make this call from the Go REST API?

jrosmith (Mon, 05 Nov 2018 14:18:56 GMT):
@Mr.Reddington if i'm understanding correctly you're saying that instead of doing an invoke with a cli you want to make a request against your REST API server, which will in turn perform the invoke? if that is the case, your api server will need to make use of #fabric-sdk-go in order to interact with the peer

Hari.Jella (Mon, 05 Nov 2018 15:49:52 GMT):
Has joined the channel.

awes0menessInc (Tue, 06 Nov 2018 03:35:32 GMT):
Has joined the channel.

GiovanniNapoli (Tue, 06 Nov 2018 10:16:55 GMT):
Is there possibile, in the Init function of a Chaincode, to init an empty array of string? I mean something like that ``` var array []string ```

GiovanniNapoli (Tue, 06 Nov 2018 10:16:55 GMT):
Is there possibile, in the Init function of a Chaincode, to init an empty array of string? I mean something like that ``` var array []string stub.PutState(array, ...) ```

Fleda (Tue, 06 Nov 2018 13:11:58 GMT):
Has joined the channel.

smpakes (Tue, 06 Nov 2018 19:50:51 GMT):
Has joined the channel.

Russ.corsha (Tue, 06 Nov 2018 21:29:57 GMT):
Hey Devs, I want my first client after a chaincode update to not have to wait for the chaincode container to spin up. Is the best way to get the chaincode container up and running still: 1. Update chaincode on a peer. 2. Wait for the peer to gossip the chaincode to all other peers, 3. Then call an intentionally bad chaincode query on each peer to get the chaincode container started. That was a best practice as of a few months ago, but I wanted to loop back to the experts.

acharyab15 (Tue, 06 Nov 2018 21:31:56 GMT):
Has joined the channel.

greg2git (Wed, 07 Nov 2018 00:03:58 GMT):
getting this: ""endorser client failed to connect to 0.0.0.0:7051: failed to create new connection: context deadline exceeded" when my docker containers are these: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ec743f6afc81 hyperledger/fabric-tools "/bin/bash -c ./scri…" 22 minutes ago Up 22 minutes cli 9780483168c9 hyperledger/fabric-ccenv "/bin/bash -c 'sleep…" 22 minutes ago Up 22 minutes chaincode 3effdffb9e0e hyperledger/fabric-peer "peer node start --p…" 22 minutes ago Up 22 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer e52d4121698a hyperledger/fabric-orderer "orderer" 22 minutes ago Up 22 minutes 0.0.0.0:7050->7050/tcp orderer

greg2git (Wed, 07 Nov 2018 00:03:58 GMT):
getting this: ""endorser client failed to connect to 0.0.0.0:7051: failed to create new connection: context deadline exceeded" when my docker containers are these: IMAGE COMMAND PORTS NAMES hyperledger/fabric-tools "/bin/bash -c ./scri…" cli hyperledger/fabric-ccenv "/bin/bash -c 'sleep…" chaincode hyperledger/fabric-peer "peer node start --p…" 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer hyperledger/fabric-orderer "orderer" 0.0.0.0:7050->7050/tcp orderer

greg2git (Wed, 07 Nov 2018 00:04:24 GMT):
IMAGE COMMAND PORTS NAMES hyperledger/fabric-tools "/bin/bash -c ./scri…" cli hyperledger/fabric-ccenv "/bin/bash -c 'sleep…" chaincode hyperledger/fabric-peer "peer node start --p…" 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer hyperledger/fabric-orderer "orderer" 0.0.0.0:7050->7050/tcp orderer

RonaldReagan (Wed, 07 Nov 2018 01:45:28 GMT):
Has joined the channel.

RonaldReagan (Wed, 07 Nov 2018 01:51:40 GMT):
Hi people, So I have hyperledger fabric deployed on 10 remote hosts, 1 orderer and 9 clients. On which node(or can it be on a lone node?) would be the best place put the hyperledger explorer installation in order to be able to see all the blockchain network?

npc0405 (Wed, 07 Nov 2018 04:19:06 GMT):
hi

npc0405 (Wed, 07 Nov 2018 04:20:07 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

npc0405 (Wed, 07 Nov 2018 04:20:30 GMT):
trying to instantiate chaincode getting above error

npc0405 (Wed, 07 Nov 2018 04:20:39 GMT):
any idea?

githubcpc (Wed, 07 Nov 2018 11:10:38 GMT):
if I don't use the java chaincode ,should I download javaenv docker image?

githubcpc (Wed, 07 Nov 2018 11:12:03 GMT):
I run the fabric-samples .It doesn't hava javaenv docker image.But the chaincode can install and instantiate in the peer successfully.

githubcpc (Wed, 07 Nov 2018 11:43:32 GMT):
Now I run the HLF release-1.2,but get an error like this :" "

githubcpc (Wed, 07 Nov 2018 11:45:57 GMT):
I run the HLF release-1.2,but get an error when I instantiate the e2e_example chaincode.Follow is the log: Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction fc92d259a61914ad5223d1d0bb5027b441a8908d2593b3ef2ffc78e0276cac6a: error starting container: error starting container: Get https://registry-1.docker.io/v2/: Unauthorized !!!!!!!!!!!!!!! Chaincode instantiation on PEER2 on channel 'mychannel' failed !!!!!!!!!!!!!!!!

githubcpc (Wed, 07 Nov 2018 11:48:09 GMT):
It seems like I lost some docker images.So I want to know I must download the javaenv?My docker images : hyperledger/fabric-ca latest 66cc132bd09c 4 months ago 252 MB hyperledger/fabric-ca x86_64-1.2.0 66cc132bd09c 4 months ago 252 MB hyperledger/fabric-tools latest 379602873003 4 months ago 1.51 GB hyperledger/fabric-tools x86_64-1.2.0 379602873003 4 months ago 1.51 GB hyperledger/fabric-ccenv latest 6acf31e2d9a4 4 months ago 1.43 GB hyperledger/fabric-ccenv x86_64-1.2.0 6acf31e2d9a4 4 months ago 1.43 GB hyperledger/fabric-orderer latest 4baf7789a8ec 4 months ago 152 MB hyperledger/fabric-orderer x86_64-1.2.0 4baf7789a8ec 4 months ago 152 MB hyperledger/fabric-peer latest 82c262e65984 4 months ago 159 MB hyperledger/fabric-peer x86_64-1.2.0 82c262e65984 4 months ago 159 MB hyperledger/fabric-zookeeper latest 2b51158f3898 4 months ago 1.44 GB hyperledger/fabric-zookeeper x86_64-0.4.10 2b51158f3898 4 months ago 1.44 GB hyperledger/fabric-kafka latest 936aef6db0e6 4 months ago 1.45 GB hyperledger/fabric-kafka x86_64-0.4.10 936aef6db0e6 4 months ago 1.45 GB hyperledger/fabric-couchdb latest 3092eca241fc 4 months ago 1.61 GB hyperledger/fabric-couchdb x86_64-0.4.10 3092eca241fc 4 months ago 1.61 GB hyperledger/fabric-baseos latest 52190e831002 4 months ago 132 MB hyperledger/fabric-baseos x86_64-0.4.10 52190e831002 4 months ago 132 MB hyperledger/fabric-baseos x86_64-1.2.0 52190e831002 4 months ago 132 MB

enriquebusti (Wed, 07 Nov 2018 12:00:51 GMT):
Has joined the channel.

amolpednekar (Wed, 07 Nov 2018 14:03:34 GMT):
@muralisr When doing something like `transMap, err := stub.GetTransient()` , when is `err` not `nil`? Also, do we need to do a null check on transMap (say, if no transient fields were sent from client)

muralisr (Wed, 07 Nov 2018 19:37:50 GMT):
@amolpednekar according to https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/chaincode.go#L978 err will not be nil currently. But good to check for it anyway. Also good to check for null (the API does not say it will never be nil)

muralisr (Wed, 07 Nov 2018 19:37:50 GMT):
@amolpednekar according to https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/chaincode.go#L978 err will not be nil currently. But good to check for it anyway to futureproof. Also good to check for null (the API does not say it will never be nil)

muralisr (Wed, 07 Nov 2018 19:39:13 GMT):
@githubcpc if you are not using java chaincode you don't need javaenv image

githubcpc (Thu, 08 Nov 2018 03:07:14 GMT):
@muralisr Could you give me some advice about this error ? I don't know how to solve it .I can't find the error detail in my peers' logs.

amolpednekar (Thu, 08 Nov 2018 03:43:10 GMT):
@muralisr you mean err will always be nil currently?

MuthuT (Thu, 08 Nov 2018 06:31:00 GMT):
Has joined the channel.

PadmavathyMohan (Thu, 08 Nov 2018 07:11:20 GMT):
Has joined the channel.

Bentipe (Thu, 08 Nov 2018 08:42:05 GMT):
Has joined the channel.

krabradosty (Thu, 08 Nov 2018 11:02:40 GMT):
Hello! I wonder should developers devise multithreaded chaincode programs (I use golang) or peers can scale chaincodes if necessary?

Jelle.Diet (Thu, 08 Nov 2018 12:15:27 GMT):
Has joined the channel.

ruien (Thu, 08 Nov 2018 12:16:35 GMT):
@amolpednekar yes, that's what he means

ruien (Thu, 08 Nov 2018 12:24:36 GMT):
@krabradosty There are certain situations when multithreaded chaincode makes sense, such as when the update-to-ledger frequency is fairly low but it requires a lot of (parallelizable) computation for an endorser to get a result. That said, it's more typical that you're wanting to improve transactions-per-second and do this by making your chaincode use composite keys (so they don't stomp on each other within a block through MVCC) and then scale out to more endorsers per (relevant) organization.

ruien (Thu, 08 Nov 2018 12:26:37 GMT):
@githubcpc It looks like your chaincode exited with an error (or panic) and the peer returned a 500 HTTP response. Try debugging in devmode and trace the logic to see why it's crashing

ruien (Thu, 08 Nov 2018 12:26:37 GMT):
@githubcpc It looks like your chaincode exited with an error (or panic) and the peer returned a 500 HTTP response. Try debugging in devmode and trace the logic to see why it's crashing. -- If the error really is the *starting container* issue (that is, the peer can't build the chaincode image), I'd just download and `docker image load` the docker images (ccenv and base-os I think) and then lock those versions in the docker-compose file.

ruien (Thu, 08 Nov 2018 12:26:37 GMT):
@githubcpc It looks like your chaincode exited with an error (or panic) and the peer returned a 500 HTTP response. Try debugging in devmode and trace the logic to see why it's crashing. -- If the error really is the *starting container* issue (that is, the peer can't build the chaincode image), I'd just download and `docker image load` the docker images (ccenv and base-os I think) and then lock those versions in core.yaml

krabradosty (Thu, 08 Nov 2018 12:35:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kXZ63Jb3i4QwpejHp) @ruien So a chaincode can't be a bottleneck? Do I understand correctly that all chaincodes invocations are executed in different goroutines?

ruien (Thu, 08 Nov 2018 12:39:47 GMT):
I can't recall if chaincode execution is parallelized (I know certain elements of the VSCC are), but chaincode isn't a bottleneck in principle because you can add more endorsers and run those in parallel.

ruien (Thu, 08 Nov 2018 12:39:47 GMT):
I can't recall if chaincode execution is parallelized (I know certain elements of the VSCC are), but chaincode isn't a bottleneck in principle because you can add more endorsers those run in parallel.

ruien (Thu, 08 Nov 2018 12:39:47 GMT):
I can't recall if chaincode execution is parallelized (I know certain elements of the VSCC are), but chaincode isn't a bottleneck in principle because you can add more endorsers those run in parallel. **(This is basically the benefit of execute-order-verify)**

ruien (Thu, 08 Nov 2018 12:39:47 GMT):
I can't recall if chaincode execution is parallelized (I know certain elements of the VSCC are), but chaincode isn't a bottleneck in principle because you can add more endorsers those run in parallel. ***(This is basically the benefit of execute-order-verify)***

ruien (Thu, 08 Nov 2018 12:39:47 GMT):
I can't recall if chaincode execution is parallelized (I know certain elements of the VSCC are), but chaincode isn't a bottleneck in principle because you can add more endorsers those run in parallel. _(This is basically the benefit of execute-order-verify)_

krabradosty (Thu, 08 Nov 2018 12:41:06 GMT):
@ruien thanks

lcj (Thu, 08 Nov 2018 13:27:53 GMT):
Has joined the channel.

migrenaa (Thu, 08 Nov 2018 16:41:38 GMT):
Hey! How do you get the error message from shim error object from the transaction proposal response?

dave.enyeart (Thu, 08 Nov 2018 20:43:37 GMT):
@migrenaa are you using a particular SDK or CLI?

migrenaa (Thu, 08 Nov 2018 22:03:03 GMT):
Node JS sdk @dave.enyeart [ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=be4zz9k2eqe7yPWeZ)

rangak (Thu, 08 Nov 2018 22:32:27 GMT):
Has joined the channel.

greg2git (Fri, 09 Nov 2018 00:30:23 GMT):
all i need for a smalles dev env is just one yaml file with these 5 services: 1. chaincode 2. orderer 3. client 4. peer

greg2git (Fri, 09 Nov 2018 00:30:23 GMT):
all i need for a smalles dev env is just one yaml file with these 5 services: 1. chaincode 2. orderer 3. client 4. peer

greg2git (Fri, 09 Nov 2018 00:30:23 GMT):
all i need for a smalles dev env is just one yaml file with these 5 services: 1. chaincode 2. orderer 3. client 4. peer

greg2git (Fri, 09 Nov 2018 00:30:23 GMT):
all i need for a smalles dev env is just one yaml file with these 5 services: 1. chaincode 2. orderer 3. client 4. peer

greg2git (Fri, 09 Nov 2018 00:30:23 GMT):
all i need for a the smallest dev env is just one yaml file with these 5 services: 1. chaincode 2. orderer 3. client 4. peer

greg2git (Fri, 09 Nov 2018 00:31:40 GMT):
and 5. couchdb for slice&dice

githubcpc (Fri, 09 Nov 2018 01:07:10 GMT):
When I use example02 chaincode.go to query in fabric v1.2,it doesn't work.Does the fabric v1.2 is relate to docker image v1.2.0 or v1.2.1?Now my docker image hava download by the bootstrap.sh.

githubcpc (Fri, 09 Nov 2018 01:08:02 GMT):
The error is Attempting to Query PEER0 ...24 secs Attempting to Query PEER0 ...27 secs 2018-11-09 00:52:47.047 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: 7DEB6D1C9E7C4A054907ABD971D906C3A2819A03DFDF9DA6A508146AF4D01BB6 100 !!!!!!!!!!!!!!! Query result on PEER0 is INVALID !!!!!!!!!!!!!!!!

githubcpc (Fri, 09 Nov 2018 01:16:53 GMT):
peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' It returns the correct response.But it can't continue anymore.

ttarey (Fri, 09 Nov 2018 01:32:24 GMT):
Has joined the channel.

AlexanderZhovnuvaty (Fri, 09 Nov 2018 08:20:32 GMT):
Has left the channel.

migrenaa (Fri, 09 Nov 2018 10:11:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=K6uMSIcXUjg38IUJen) sendTransactionProposal returns [Array, Client.Proposal] , in the ProposalResponse there is property response, in which there is property status and message - the status is correct, but the message is always empty.

migrenaa (Fri, 09 Nov 2018 10:11:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=K6uMSIcXUjg38IUJen) sendTransactionProposal returns [Array, Client.Proposal] , in the ProposalResponse there is property response, in which there is property status and message, but this response object is always empty when there is an error.

migrenaa (Fri, 09 Nov 2018 10:11:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=K6uMSIcXUjg38IUJen) sendTransactionProposal returns [Array, Client.Proposal] , in the ProposalResponse there is property response, in which there is property status and message, but this response object is always empty when the chaincode returns error.

adamhardie (Fri, 09 Nov 2018 15:29:40 GMT):
Has joined the channel.

adamhardie (Fri, 09 Nov 2018 15:31:00 GMT):
hi all! I have a chaincode function that is trying to figure out which client is calling it I use id, err := stub.GetCreator() which works a charm. I serialise the result into a SHA hash and save. however, i noticed that when i call from a different use cerficate , the hash is exactly the same

adamhardie (Fri, 09 Nov 2018 15:31:20 GMT):
is getCreator telling me the caller? or is it just the MSP, sorry i couldnt find this out from docs

adamhardie (Fri, 09 Nov 2018 15:31:22 GMT):
thanks!

adamhardie (Fri, 09 Nov 2018 15:36:16 GMT):
PS I tried and failed to use the cid library as i wasnt sure how to implement it into my peer container. if you could point to instructions on using this i would be greatful

greg2git (Fri, 09 Nov 2018 15:41:32 GMT):
my couchdb state is showing a higher block height than my peer channel getinfo, so how do i sync them up?

adamhardie (Fri, 09 Nov 2018 15:47:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BKQv3u6h8DbXmWMyf) https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetCreator says doc can be found in interfaces.go but is not referenced in interfaces.go at all

adamhardie (Fri, 09 Nov 2018 15:49:50 GMT):
https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetCreator > GetCreator documentation can be found in interfaces.go

adamhardie (Fri, 09 Nov 2018 15:49:54 GMT):
where is interfaces.go ?

dave.enyeart (Fri, 09 Nov 2018 18:40:20 GMT):
you can stop peer, drop couchdb data (delete from /opt/couchdb/data), then restart peer. State database will automatically be rebuilt from the blockchain.

dave.enyeart (Fri, 09 Nov 2018 18:46:05 GMT):
@migrenaa Are you calling your own custom chaincode? If there is an error status but not error message, it likely means that your chaincode did not set an error message.

AlexArise (Fri, 09 Nov 2018 19:25:48 GMT):
Has joined the channel.

AlexArise (Fri, 09 Nov 2018 20:35:25 GMT):
Has anyone found a way to reset the data saved on a channel to an earlier point in time? I'm looking for a way to periodically reset a channel that our dev team is building against, but it also could be useful for CI purposes.

AlexArise (Fri, 09 Nov 2018 20:35:57 GMT):
We control all the peers and orderers in this scenario

AlexArise (Fri, 09 Nov 2018 20:36:56 GMT):
I've tried resetting the channel backup files on the orderers and then deleting the ledger data on each peer and then restarting those processes hoping they'll resync from the orderers

rizwan92 (Sat, 10 Nov 2018 07:08:43 GMT):
Has joined the channel.

rizwan92 (Sat, 10 Nov 2018 07:10:04 GMT):
hello everyone i have installed fabcar chain code in my network now i want to install my own chain code name is mychaincode.js how can i do that ?

muralisr (Sun, 11 Nov 2018 14:21:30 GMT):
@adamhardie GetCreator pertains to the ID that submitted the proposal (see https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/interfaces.go#L313). As far as fabric is concerned the "client"

muralisr (Sun, 11 Nov 2018 14:23:10 GMT):
@AlexArise not sure if this is what you are looking for ... have you looked into `GetHistoryForKey` interface (see https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/interfaces.go#L237)

SamRasha (Mon, 12 Nov 2018 09:43:55 GMT):
Has joined the channel.

nhrishi (Mon, 12 Nov 2018 10:38:03 GMT):
Hi, quick question, In the collection_config JSON, when we define a policy with participants using "OR" or "AND" , how does it make a difference. I thought using collection level policy, we are defining a distribution policy and all parties listed in this should receive a private data. Shouldn't it be always "AND "?

nhrishi (Mon, 12 Nov 2018 11:41:36 GMT):
Hi , I am getting below error while invoking a chaincode on v1.3 and with key based endorsement. ```2018-11-12 10:58:30.198 UTC [shim] handlePutState -> ERRO 001 [faec7d7c] Received ERROR. Payload: PUT_STATE failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyAssetPrivateCC], pass the collection configuration upon chaincode definition/instantiation ###### AssetOwnershipCC: function: setEndorsementPolicy 2018-11-12 10:58:30.200 UTC [shim] handlePutStateMetadataEntry -> ERRO 002 [faec7d7c]Received ERROR. Payload: PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation newAssetToken: SetPrivateDataValidationParameter PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation ```

nhrishi (Mon, 12 Nov 2018 11:41:36 GMT):
Hi , I am getting below error while invoking a chaincode on v1.3 and with key based endorsement. I am passing collection json with required collection names and policies. Any idea about the reason behind this error? ```2018-11-12 10:58:30.198 UTC [shim] handlePutState -> ERRO 001 [faec7d7c] Received ERROR. Payload: PUT_STATE failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyAssetPrivateCC], pass the collection configuration upon chaincode definition/instantiation ###### AssetOwnershipCC: function: setEndorsementPolicy 2018-11-12 10:58:30.200 UTC [shim] handlePutStateMetadataEntry -> ERRO 002 [faec7d7c]Received ERROR. Payload: PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation newAssetToken: SetPrivateDataValidationParameter PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation ```

nhrishi (Mon, 12 Nov 2018 11:41:36 GMT):
Hi , I am getting below error while invoking a chaincode on v1.3 and with key based endorsement. I am passing collection json with required collection names and policies. Any idea about the reason behind this error? I have 2 chaincodes A and B. Invoking a transaction in A and that in turns invoke in B. ```2018-11-12 10:58:30.198 UTC [shim] handlePutState -> ERRO 001 [faec7d7c] Received ERROR. Payload: PUT_STATE failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyAssetPrivateCC], pass the collection configuration upon chaincode definition/instantiation ###### AssetOwnershipCC: function: setEndorsementPolicy 2018-11-12 10:58:30.200 UTC [shim] handlePutStateMetadataEntry -> ERRO 002 [faec7d7c]Received ERROR. Payload: PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation newAssetToken: SetPrivateDataValidationParameter PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation ```

nhrishi (Mon, 12 Nov 2018 11:41:36 GMT):
Hi , I am getting below error while invoking a chaincode on v1.3 and with key based endorsement. I am passing collection json with required collection names and policies. Any idea about the reason behind this error? I have 2 chaincodes A and B. Invoking a transaction in A and that in turns invoke in B. I am getting this error for chaincode B invoke. ```2018-11-12 10:58:30.198 UTC [shim] handlePutState -> ERRO 001 [faec7d7c] Received ERROR. Payload: PUT_STATE failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyAssetPrivateCC], pass the collection configuration upon chaincode definition/instantiation ###### AssetOwnershipCC: function: setEndorsementPolicy 2018-11-12 10:58:30.200 UTC [shim] handlePutStateMetadataEntry -> ERRO 002 [faec7d7c]Received ERROR. Payload: PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation newAssetToken: SetPrivateDataValidationParameter PUT_STATE_METADATA failed: transaction ID: faec7d7c83f0515204a5a2a9098ccfb320e3f59d7c3902bba22ddb3a5a978968: collection config not defined for chaincode [MultiPartyPrivateCC], pass the collection configuration upon chaincode definition/instantiation ```

maozhuzi (Mon, 12 Nov 2018 13:46:48 GMT):
Has joined the channel.

tanguyracinet (Mon, 12 Nov 2018 15:42:32 GMT):
Has joined the channel.

tanguyracinet (Mon, 12 Nov 2018 15:42:59 GMT):
Hey there, I am having an issue deploying my chaincode to a local fabric ledger. I am working with a Fabric basic-network. The setup goes fine. I can install my chaincode on the peer, the problem is when I try to instantiate. It goes into timeout and nothing happens, my code is never instantiated on the channel. After looking at the logs and investigating what could be happening it seems the orderer receives the transaction information, validates it and then starts a broadcast loop at the cli:59208 and then nothing happens. Any idea what I might be missing? what config/files could be helpful for me to test on ?

dave.enyeart (Mon, 12 Nov 2018 16:08:42 GMT):
@nhrishi the private data distribution doesn't have to go to all orgs at endorsement time, so the list of orgs in the collection config is modeled as OR. Admittedly this is not a great format to model the list of orgs, but it was used as it already existed for endorsement policy syntax, rather than inventing a new syntax for distribution policy.

dave.enyeart (Mon, 12 Nov 2018 16:09:44 GMT):
concerning your problem, I suspect the collection did not get defined when the chaincode was instantiated, maybe there was an issue with how it was passed from the client side that you need to investigate

dave.enyeart (Mon, 12 Nov 2018 16:10:17 GMT):
if you are using sdk, you can query for the available collections, see https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/fabric-client/lib/Channel.js#L2313

mcoblenz (Mon, 12 Nov 2018 20:38:46 GMT):
Just wanted to bump @tanguyracinet's post since I'm having a similar problem.

dnquark (Mon, 12 Nov 2018 23:04:47 GMT):
Has joined the channel.

nhrishi (Tue, 13 Nov 2018 09:40:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CZabH6xv4McoMauHM) @dave.enyeart Thanks @dave.enyeart Makes sense now. For querying available collections, are we looking to have a quick peer chaincode command to query all collections apart from SDK level query.

Abhijeet.K (Tue, 13 Nov 2018 10:12:25 GMT):
Has joined the channel.

sai_mamidi (Tue, 13 Nov 2018 12:58:53 GMT):
Has joined the channel.

megafyk (Tue, 13 Nov 2018 15:14:25 GMT):
Has joined the channel.

walmon (Tue, 13 Nov 2018 20:52:42 GMT):
Hello all, if you are developing with JavaScript you may find this article interesting: https://medium.com/worldsibu/convector-cli-662ac141183e

LevinLMKwong (Wed, 14 Nov 2018 03:00:16 GMT):
Has joined the channel.

deenario (Wed, 14 Nov 2018 05:30:20 GMT):
Has joined the channel.

deenario (Wed, 14 Nov 2018 05:30:33 GMT):
Hello guys i need a little help .

deenario (Wed, 14 Nov 2018 05:33:49 GMT):
I have two struct in my chaincode. Student and Teacher. The student table has Student ID and Teacher table has TeacherID. Now upon insertion i am checking if the studentID 1 already exsists or not. What i am doing for it is this. StudentAsBytes, err := stub.GetState(studentID) if err != nil { return shim.Error("Student Failed with Error: " + err.Error()) } else if ConversionAsBytes != nil { return shim.Error("The Inserted Student ID already Exists: " + StudentID) } The Problem is even. There is no data in the student struct but the teacher table has ID 1. So it will give me this error for the student Table that ID 1 already exsists.

deenario (Wed, 14 Nov 2018 05:33:49 GMT):
I have two struct in my chaincode. Student and Teacher. The student table has Student ID and Teacher table has TeacherID. Now upon insertion i am checking if the studentID 1 already exsists or not. What i am doing for it is this. StudentAsBytes, err := stub.GetState(studentID) if err != nil { return shim.Error("Student Failed with Error: " + err.Error()) } else if StudentAsBytes != nil { return shim.Error("The Inserted Student ID already Exists: " + StudentID) } The Problem is even. There is no data in the student struct but the teacher table has ID 1. So it will give me this error for the student Table that ID 1 already exsists.

deenario (Wed, 14 Nov 2018 05:34:18 GMT):
How can i make it check ID one only in the same struct i am sending data to.

naveen_saravanan (Wed, 14 Nov 2018 08:02:05 GMT):
Hi guys, I have a question regarding the hyperledger fabric.Can we exchange data between two channels? For example consider the hyperledger

naveen_saravanan (Wed, 14 Nov 2018 08:06:30 GMT):
Hi guys, I have a question regarding the hyperledger fabric. Can we exchange data between two channels? *For example*: Consider the hyperledger fabric consisting of three orgs (such as A, B and C) with two channels A-B and A-C. A record is created in channel A-B. Can it be checked from channel A-C? Is it possible?

rthatcher (Wed, 14 Nov 2018 10:05:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SbxkS4R3jCjdhtWTk) @deenario The State database is a "document store" noSQL database - there is no concept of tables, just the *Key* and the *Value* for each document. You will need to maintain the uniqueness of each Key across your whole data domain - Fabric does help with this, allowing for composite keys, so in your case you could create a composite key for Student and 01, and also for Teacher 01. If you search the Fabric Docs, and the Shim doc you will find Composite keys, and this is a good place to start: https://fabric-shim.github.io/release-1.3/fabric-shim.ChaincodeStub.html#createCompositeKey__anchor

rthatcher (Wed, 14 Nov 2018 10:05:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SbxkS4R3jCjdhtWTk) @deenario The State database is a "document store" noSQL database - there is no concept of tables, just the *Key* and the *Value* for each document. You will need to maintain the uniqueness of each Key across your whole data domain - Fabric does help with this, allowing for *composite keys*, so in your case you could create a composite key for *Student* and *01*, and also for *Teacher 01*. If you search the Fabric Docs, and the Shim doc you will find Composite keys, and this is a good place to start: https://fabric-shim.github.io/release-1.3/fabric-shim.ChaincodeStub.html#createCompositeKey__anchor

rthatcher (Wed, 14 Nov 2018 10:19:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=djXykWevRAPEqpr8c) @naveen_saravanan What you can do is to Invoke a Chaincode (Smart Contract) from within a Chaincode, including the case where they are on different channels (assuming the identifier you are using has the access to do so.) This Q&A on Stack Overflow show how to do it https://stackoverflow.com/questions/49360796/how-we-can-call-one-chaincode-from-another-chaincode-in-fabric-1-0-if-anyone - read all the comments at the bottom as they provide additional information.

rthatcher (Wed, 14 Nov 2018 10:19:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=djXykWevRAPEqpr8c) @naveen_saravanan What you can do is to Invoke a Chaincode (Smart Contract) from within a Chaincode, including the case where they are on different channels (assuming the identifier you are using has the access to do so.) This Q&A on Stack Overflow show how to do it https://stackoverflow.com/questions/49360796/how-we-can-call-one-chaincode-from-another-chaincode-in-fabric-1-0-if-anyone - read all the comments at the bottom as they provide additional information. So you can't automatically replicate data between channels, but you can write code to do it yourself.

dnquark (Wed, 14 Nov 2018 11:58:13 GMT):
Hi all, I'm trying to experiment with chaincode in devmode. I am following https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4ade.html, but am not using docker containers since that's not how our environment is set up. I am running one peer and one orderer; I am able to register the chaincode with the peer, but the CLI install command fails: `ubuntu@ip-172-31-41-77:~/src/chaincode-sandbox/tutorials/sacc$: peer chaincode install -n mycc -v 0 -p .` `Error: error getting endorser client for install: endorser client failed to connect to localhost:7051: failed to create new connection:` But my peer is listening on 7051. What's going on?

Switch2Logic (Wed, 14 Nov 2018 14:41:14 GMT):
Has joined the channel.

dnquark (Wed, 14 Nov 2018 22:55:50 GMT):
Hi all, I'm trying to run the SimpleAsset example from https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4ade.html, with the caveat that I am not using Fabric Docker images, but deploying a custom network. Unfortunately, I keep running into permission issues when using the peer CLI: e.g. `peer chaincode list --installed` results in `Error: Bad response: 500 - access denied for [getinstalledchaincodes]: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]`. I have an admin cert in `msp/admincerts/peer0-admin.cert.pem`, and it looks like it's being loaded at some point, so I'm not sure what is causing the error. Any help would be appreciated, I've been stuck for hours :/

Skprog (Thu, 15 Nov 2018 06:40:43 GMT):
Has joined the channel.

naveen_saravanan (Thu, 15 Nov 2018 10:43:27 GMT):
@rthatcher Thanks for your response, I will go through the link.

mahoney1 (Thu, 15 Nov 2018 11:05:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jWhqtt5bkw6TxPgjM) @dnquark well, to some extent, it depends on that 'custom network' you mention. This thread (albeit an earlier Fabric release, but same issues apply) - click 'more' to expand may give you some clues -> https://lists.hyperledger.org/g/fabric/topic/24092472#4257 - suggestion is setting of CORE_PEER_CHAINCODEADDRESS - ie you need to make sure the chaincode container can successfully resolve the peer's address, and connect to it on the right port (eg 7052). It can also occur (looking at the admin error - and depending on the environment) if the certificate generated has not been uploaded to the peer / the admin you're using is not recognized by your Fabric CA server .

mahoney1 (Thu, 15 Nov 2018 11:05:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jWhqtt5bkw6TxPgjM) @dnquark well, to some extent, it depends on that 'custom network' you mention. This thread (albeit an earlier Fabric release, but same issues apply) - click 'more' to expand may give you some clues -> https://lists.hyperledger.org/g/fabric/topic/24092472#4257 - suggestion is setting of CORE_PEER_CHAINCODEADDRESS - ie you need to make sure the chaincode container can successfully resolve the peer's address, and connect to it on the right port (eg 7052). It can also occur (looking at the admin error - and depending on the environment) if the certificate generated has not been uploaded to the peer / the admin you're using is not recognized by your Fabric CA server (and/or it isn't actually an admin cert).

Switch2Logic (Thu, 15 Nov 2018 12:11:53 GMT):
Hy ladies and gents has anyone implemented Application level ACL on Hyperledger Fabric Chaincode? Like restrict access to say fabcar -> changeOwner method so that only a specific orgs user may access it... This is supper simple in Hyplergder Composer I know... But I am running multiple channels and Composer does not directly support multiple channels also less flexible

mahoney1 (Thu, 15 Nov 2018 12:38:27 GMT):
@Switch2Logic you might want to use the Client Identity Chaincode Library for that as an attribute (eg, restrict access to a app group/role ; invocation denied to those not a member by virtue of a custom attribute for the identity etc) -> https://github.com/hyperledger/fabric/blob/master/core/chaincode/lib/cid/README.md#client-identity-chaincode-library

mahoney1 (Thu, 15 Nov 2018 12:38:27 GMT):
@Switch2Logic you might want to use the Client Identity Chaincode Library for that, as an attribute (eg, restrict access to a app group/role ; invocation denied to those not a member by virtue of a custom attribute for the identity etc) -> https://github.com/hyperledger/fabric/blob/master/core/chaincode/lib/cid/README.md#client-identity-chaincode-library

mahoney1 (Thu, 15 Nov 2018 12:38:27 GMT):
@Switch2Logic you might want to consider the Client Identity Chaincode Library for that, as an attribute (eg, restrict access to a app group/role ; invocation denied to those not a member by virtue of a custom attribute for the identity etc) -> https://github.com/hyperledger/fabric/blob/master/core/chaincode/lib/cid/README.md#client-identity-chaincode-library

muralisr (Thu, 15 Nov 2018 13:58:49 GMT):
@Switch2Logic https://hyperledger-fabric.readthedocs.io/en/release-1.3/access_control.html#how-acls-are-formatted-in-configtx-yaml gives overview of ACL both from chaincode and the "resource" based ACL. Perhaps you have looked at this already ?

Switch2Logic (Thu, 15 Nov 2018 19:39:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CRzQvdo7xShHhbxqG) @muralisr I have read the documentation and go back there regularly. I want an example of like ACL implemented for fabcar. I don't want to guess how it works through documentation. So wondering if anyone has tried it and got it to work

h4995974 (Thu, 15 Nov 2018 22:03:00 GMT):
Has joined the channel.

h4995974 (Thu, 15 Nov 2018 22:03:02 GMT):
Hello everyone. We're receiving the following error when trying to spin up peers inside a kubernetes pods. `2018-11-15 21:52:25.172 UTC [gossip/gossip] handleMessage -> WARN 01f Message GossipMessage: tag:EMPTY alive_msg: timestamp: > , Envelope: 83 bytes, Signature: 70 bytes Secret payload: 16 bytes, Secret Signature: 71 bytes isn't valid` Any ideas?

dileban (Fri, 16 Nov 2018 04:33:50 GMT):
With Fabric supporting calls from one chaincode to another, is there some way (e.g. meta data somewhere) to tell if the current executing chaincode was called directly or delegated via another contract?

dileban (Fri, 16 Nov 2018 04:33:50 GMT):
With Fabric supporting calls from one chaincode to another, is there a way to tell if the current executing chaincode was called directly or delegated via another contract?

Unni_1994 (Fri, 16 Nov 2018 08:23:40 GMT):
private data transient

Unni_1994 (Fri, 16 Nov 2018 08:36:37 GMT):
Hi , how can we pass the transient field (private data) by using node.js fabric sdk . I have tried but unable to retrieve transientMap on chaincode during Invocation

jd232 (Fri, 16 Nov 2018 10:24:34 GMT):
Has joined the channel.

dave.enyeart (Fri, 16 Nov 2018 11:49:11 GMT):
There is an example of passing transient here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/invoke.js#L627

dave.enyeart (Fri, 16 Nov 2018 11:49:11 GMT):
There is an example of passing transient here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/invoke.js#L627 although that is only available in the new v1.4 beta apis. for the existing apis you set transientMap on the request as documented in https://fabric-sdk-node.github.io/release-1.3/global.html#ChaincodeInvokeRequest

dave.enyeart (Fri, 16 Nov 2018 11:49:11 GMT):
@Unni_1994 There is an example of passing transient here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/invoke.js#L627 although that is only available in the new v1.4 beta apis. for the existing apis you set transientMap on the request as documented in https://fabric-sdk-node.github.io/release-1.3/global.html#ChaincodeInvokeRequest. for follow-up questions please post to #fabric-sdk-node

dave.enyeart (Fri, 16 Nov 2018 11:49:11 GMT):
@Unni_1994 There is an example of passing transient here: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/integration/network-e2e/invoke.js#L627 although that is only available in the new v1.4 beta apis. for the existing apis you set transientMap on the request as documented in https://fabric-sdk-node.github.io/release-1.3/global.html#ChaincodeInvokeRequest.

dave.enyeart (Fri, 16 Nov 2018 11:49:25 GMT):
If you have more questions, try #fabric-sdk-node

dave.enyeart (Fri, 16 Nov 2018 12:05:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pGGqiBd59ndd6eEBA) @dileban There is nothing built in to provide this, but you can easily add a parameter to the called chaincode and pass a field to indicate the caller.

dileban (Fri, 16 Nov 2018 12:06:33 GMT):
@dave.enyeart Thanks, but I'm looking for something that's secure. i.e., I would only want the invoked contract to take certain actions iff a former contract was invoked.

dileban (Fri, 16 Nov 2018 12:06:57 GMT):
Are transient fields preserved across called contracts?

dave.enyeart (Fri, 16 Nov 2018 12:07:30 GMT):
Not sure, @muralisr is an expert in this area and may know

dileban (Fri, 16 Nov 2018 12:09:13 GMT):
Cool, I might have a chat with him. It would be desirable to have some meta data injected by the platform in scenarios where contracts call other contracts, that's secure and unforgable. There's a nice benefit from a design standpoint especially when creating reusable contracts.

dave.enyeart (Fri, 16 Nov 2018 12:10:01 GMT):
agreed, please create a Jira enhancement after discussing options with @muralisr

muralisr (Fri, 16 Nov 2018 20:50:52 GMT):
@dileban you can extract the original chaincode name from proposal object returned by stub.GetSignedProposal ... if that's same as your chaincode then its not called by another. Would that work ?

muralisr (Fri, 16 Nov 2018 20:51:27 GMT):
but yes, this might be made a first class option

muralisr (Fri, 16 Nov 2018 20:51:27 GMT):
but yes, this might be made a first class api on the stub

dileban (Fri, 16 Nov 2018 20:51:44 GMT):
That would work, thanks!

dileban (Fri, 16 Nov 2018 20:53:40 GMT):
Also agree, it would be nice if the ChaincodeStubInterface's InvokeChaincode function supported passing additional map of meta-data that can only be sent through only by a delegating chaincode

dileban (Fri, 16 Nov 2018 20:53:40 GMT):
Also agree, it would be nice if the ChaincodeStubInterface's InvokeChaincode function supported passing an additional map of meta-data that can only be sent through only by a delegating chaincode

dileban (Fri, 16 Nov 2018 20:55:17 GMT):
Would this be something capturing on Jira?

dileban (Fri, 16 Nov 2018 20:55:17 GMT):
Would this be something worth capturing on Jira?

muralisr (Fri, 16 Nov 2018 20:58:58 GMT):
well, we certainly can discuss in a JIRA.. but how would you pass the metadata (over and above the args you pass to the chaincode anyway ?) ... I guess the use case is the key here

dileban (Fri, 16 Nov 2018 21:03:40 GMT):
I have one in mind, but let me think through this a bit to see if mine's not an edge case and this can be generally useful

dileban (Fri, 16 Nov 2018 21:05:05 GMT):
If InvokeChaincode isn't the right approach, perhaps this can be done differently. But, to your point, a first class API could be useful

BellaAdams (Sat, 17 Nov 2018 00:45:35 GMT):
Has joined the channel.

nadineouro (Mon, 19 Nov 2018 15:01:58 GMT):
Has joined the channel.

nadineouro (Mon, 19 Nov 2018 15:10:35 GMT):
Save New Duplicate & Edit Just Text Twitter 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 //I'm trying to invoke a chaincode from another to get some data that will be needed to do a specific function. When I do the invokeChaincode, I have ".protos.Response" as //response and I don't know why. //My query function looks like this: async queryFrigs(stub, args) { let first = "FRIG1"; let last = "FRIG999"; let it = await stub.getStateByRange(first, last); let results = []; while(true) { let res = await it.next(); if(res.value && res.value.value.toString()) { let jsonRes = {}; console.log (res.value.value.toString('utf8')); 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'); } results.push(jsonRes); } if(res.done) { console.log('End of data'); await it.close(); return Buffer.from(JSON.stringify(results)); } } //And my chaincode, where I'm trying to call this query, looks like this (just to test, without your real function): async sale(stub, args) { let frigs = await stub.invokeChaincode('frigCC', ['queryFrigs'], 'canal-frig'); console.log('frigs.toString() >>>' + frigs.toString()); // prints .prontos.response console.log('JSON.stringify(frigs) >>>' + JSON.stringify(frigs)); // prints {"status": 200, "message": "", "payload": {"buffer": {"type": "Buffer", "data": [... buffer result correspondent to the data. ..]}, "offset": 11, "markedOffset": - 1, "limit": 689, "littleEndian": true, "noAssert": false}} }

nadineouro (Mon, 19 Nov 2018 15:18:31 GMT):
I'm trying to invoke a chaincode from another to get some data that will be needed to do a specific function. When I do the invokeChaincode, I have ".protos.Response" as response and I don't know why. My query function looks like this: https://hastebin.com/asayupubiw.js And my chaincode, where I'm trying to call this query, looks like this (just to test, without your real function): https://hastebin.com/akehoboker.js I would like to receive the data in its original format, without the conversion to buffer. Can anyone help me? What I'm doing wrong?

ruien (Mon, 19 Nov 2018 15:35:17 GMT):
@nadineouro Getting a pb.Response is consistent with the documentation ( https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode ), but I can't really say why it's this way. Maybe that makes it more forward-compatible if Invokes (as opposed to just Queries) are ever supported in the future?

ruien (Mon, 19 Nov 2018 15:35:17 GMT):
@nadineouro Getting a pb.Response is consistent with the documentation ( https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode ), but I can't really say why it's this way. Maybe that makes it more forward-compatible if Invokes (as opposed to just Queries) are ever supported in the future? Edit: Actually, this makes sense for same-channel invokes, right? Those add the readset/writeset to the caller's transaction.

ruien (Mon, 19 Nov 2018 15:35:17 GMT):
@nadineouro Getting a pb.Response is consistent with the documentation ( https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode ), but I can't really say why it's this way. Maybe that makes it more forward-compatible if Invokes (as opposed to just Queries) are ever supported in the future? _Edit: Actually, this makes sense for same-channel invokes, right? Those add the readset/writeset to the caller's transaction._

ruien (Mon, 19 Nov 2018 15:35:17 GMT):
@nadineouro Getting a pb.Response is consistent with the documentation ( https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode ), but I can't really say why it's this way. Maybe that makes it more forward-compatible if cross-channel Invokes (as opposed to just Queries) are ever supported in the future? _Edit: Actually, this makes sense for same-channel invokes, right? Those add the readset/writeset to the caller's transaction._

ruien (Mon, 19 Nov 2018 15:35:17 GMT):
@nadineouro Getting a pb.Response is consistent with the documentation ( https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.InvokeChaincode ), but I can't really say why it's this way. Maybe that makes it more forward-compatible if cross-channel Invokes (as opposed to just Queries) are ever supported in the future? _Edit: Actually, this already makes sense for same-channel invokes, right? Those add the readset/writeset to the caller's transaction._

billchen (Mon, 19 Nov 2018 15:56:11 GMT):
Has joined the channel.

billchen (Mon, 19 Nov 2018 15:57:51 GMT):
Does anyone know how to determine if chaincode is called by chaincode? I want to restrict a chaincode function such that it can only be invoked by another chaincode

jrosmith (Mon, 19 Nov 2018 16:08:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6m4TJmpHq5syovYsc) @billchen from a conversation in this channel about the same topic on the 16th

billchen (Mon, 19 Nov 2018 16:18:40 GMT):
@jrosmith Potentially. Would it be a fair assumption that if the called chaincode is different (if a peer installed a different version of the called chaincode under the same name), then the endorsement is invalid?

muralisr (Mon, 19 Nov 2018 16:35:21 GMT):
@billchen the chaincode wouldn't come up if the fingerprint on filesystem does not match the instantiated chaincode. So it request would fail

muralisr (Mon, 19 Nov 2018 16:35:21 GMT):
@billchen the chaincode wouldn't come up if the fingerprint of the installed chaincode on filesystem does not match the instantiated chaincode. So the request would fail

billchen (Mon, 19 Nov 2018 17:40:41 GMT):
Thanks! @muralisr

HoneyShah (Tue, 20 Nov 2018 03:29:13 GMT):
Has joined the channel.

HoneyShah (Tue, 20 Nov 2018 03:29:18 GMT):
Hello, When chaincode container remains idle for some time then it stops with error: ``` ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: EOF\n at createStatusError (/usr/local/src/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:248:8)\n at /usr/local/src/node_modules/grpc/src/client.js:804:12" ``` And when the first request comes after idle time it gives an error of ``` Error: 14 UNAVAILABLE: TCP Write failed ``` And after that all works fine. How can I solve for the first request? Please help

qsmen (Tue, 20 Nov 2018 06:36:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=YDX4PxhG6dGptWDk8) @muralisr thanks

qsmen (Tue, 20 Nov 2018 06:43:28 GMT):
hi Muralisr, chaincode A is from channel A, and chaincode B is from channel B, do they run in different containers? If chaincode A and chaincode B both are from the same channel, do they run in one container? Thank you.

qsmen (Tue, 20 Nov 2018 06:46:14 GMT):
Furthermore, is it possible for a software running on host to steal data in a container ?

Link-He (Tue, 20 Nov 2018 07:42:40 GMT):
Has joined the channel.

sekiguchi.toru (Tue, 20 Nov 2018 07:57:00 GMT):
Has joined the channel.

sanav (Tue, 20 Nov 2018 08:07:44 GMT):
Has joined the channel.

davidkel (Tue, 20 Nov 2018 08:11:03 GMT):
@HoneyShah what version of fabric-shim are you using ?

sekiguchi.toru (Tue, 20 Nov 2018 08:17:17 GMT):
Hello !! I try chaincode deploy. But failed. Please give me advice. terminal 1. ``` hoge:~/work/src/github.com/hyperledger/fabric/.build/bin$ peer node start ``` It looks like good. It is no error. terminal 2 ``` hoge:~/work/src/sacc$ CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc 2018-11-20 17:08:33.066 DST [shim] setupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2018-11-20 17:08:33.066 DST [shim] setupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ... 2018-11-20 17:08:33.067 DST [shim] chatWithPeer -> ERRO 003 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing receive failed github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer /home/skewers/work/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:362 github.com/hyperledger/fabric/core/chaincode/shim.Start /home/skewers/work/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:156 main.main /home/skewers/work/src/sacc/sacc.go:88 runtime.main /usr/local/go/src/runtime/proc.go:201 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1333 Error starting SimpleAsset chaincode: receive failed: rpc error: code = Unavailable desc = transport is closing ``` At that time, the terminal 1 outputs the following 2018-11-20 17:08:33.066 DST [core/comm] ServerHandshake -> ERRO 01f TLS handshake failed with error tls: first record does not look like a TLS handshake {"server": "PeerServer", "remote address": "127.0.0.1:60199"} sacc is https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4ade.html#pulling-it-all-together My core.yaml is hyperledger/fabric/sampleconfig/core.yaml . I configured tls enabled false. Please help.

gennadyl (Tue, 20 Nov 2018 08:32:55 GMT):
Has joined the channel.

HoneyShah (Tue, 20 Nov 2018 11:05:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cCH4GghCzdafjC2sA) @davidkel 1.2.0

davidkel (Tue, 20 Nov 2018 11:19:22 GMT):
@HoneyShah try using 1.2.3 to see if that helps

HoneyShah (Tue, 20 Nov 2018 11:36:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Z7YpchTCuJTSZ6py7) @davidkel Let me try that

muralisr (Tue, 20 Nov 2018 14:13:19 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MgPDCahy8s8pckAXY

muralisr (Tue, 20 Nov 2018 14:15:23 GMT):
@qsmen chaincode A and B will run in one container each across all channels on the peer (so 2 containers total). The channel is part of the context passed to the chaincode and associates/isolates the running code from the ledger (ie, state)

qsmen (Wed, 21 Nov 2018 01:17:40 GMT):
You mean one container per channel? so chaincode a and chaincode b run in one container if they are in one channel. if they are in different channel, they will run in different containers. Thank you.

silliman (Wed, 21 Nov 2018 01:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mGiAisPP3AyWdPABY) @qsmen Chaincode A at a given version will have its own container and service multiple channels as the container is stateless. Chaincode B at a given version will have its own container and service multiple channels.

qsmen (Wed, 21 Nov 2018 05:33:09 GMT):
Thank you, Silliman. Thank you, Muralisr. I see now ``` ```

Rajatsharma (Wed, 21 Nov 2018 06:33:48 GMT):
Has joined the channel.

Rajatsharma (Wed, 21 Nov 2018 06:40:19 GMT):
Hello, I'm trying to run the sample System Chaincode following the steps on https://hyperledger-fabric.readthedocs.io/en/release-1.3/systemchaincode.html - I've used the example chaincode (https://github.com/hyperledger/fabric/tree/release-1.3/examples/plugins/scc). I copied this to the peer after building it on Go. and made the necassary changes at /etc/hyperledger/fabric/core.yaml. But there are no logs or no response when I restart the peer. Can anyone please help me eith the process.

Unni_1994 (Wed, 21 Nov 2018 08:07:44 GMT):
Hi All, Is it possible find the hash of private data which is inserted into the private state(hash of Key and value) from the proposal response.. I have tried but it resulted as empty ().

tanguyracinet (Wed, 21 Nov 2018 09:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uE9dtGW7MvNBra2kB) @mcoblenz @mcoblenz I found a solution to my problem, in case you're still stuck here. I added the following line in the docker-compose file: `CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052` It is an environment variable for the peer

tanguyracinet (Wed, 21 Nov 2018 09:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uE9dtGW7MvNBra2kB) @mcoblenz @mcoblenz I found a solution to my problem, in case you're still stuck here. I added the following line in the docker-compose file: ```CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052``` It is an environment variable for the peer

tanguyracinet (Wed, 21 Nov 2018 09:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uE9dtGW7MvNBra2kB) @mcoblenz I found a solution to my problem, in case you're still stuck here. I added the following line in the docker-compose file: ```CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052``` It is an environment variable for the peer

tanguyracinet (Wed, 21 Nov 2018 10:01:47 GMT):
But I am now faced with a rather interesting problem... I can install and instantiate without errors. However, my code isn't being actually installed... the ```dev-peer0.org1.example.com-mycc-1.0``` only has fabcar, which I do not understand. How would fabcar be installed and why not my chaincode ?

tanguyracinet (Wed, 21 Nov 2018 10:01:47 GMT):
But I am now faced with a rather interesting problem... I can install and instantiate without errors. However, my code isn't being actually installed... the `dev-peer0.org1.example.com-mycc-1.0` only has fabcar, which I do not understand. How would fabcar be installed and why not my chaincode ?

tanguyracinet (Wed, 21 Nov 2018 10:01:47 GMT):
But I am now faced with a rather interesting problem... I can install and instantiate without errors. However, my code isn't being actually installed... the `dev-peer0.org1.example.com-customcc-1.0` only has fabcar, which I do not understand. How would fabcar be installed and why not my chaincode ?

tanguyracinet (Wed, 21 Nov 2018 10:01:47 GMT):
But I am now faced with a rather interesting problem... I can install and instantiate without errors. However, my code isn't being actually installed... the `dev-peer0.org1.example.com-customcc-1.0` only has fabcar, which I do not understand. Why would fabcar be installed and why not my chaincode ?

tanguyracinet (Wed, 21 Nov 2018 10:01:47 GMT):
But I am now faced with a rather interesting problem... I can install and instantiate without errors. However, my code isn't being actually installed... the `dev-peer0.org1.example.com-customcc-1.0` only has fabcar, which I do not understand. How could fabcar be installed and why not my chaincode ?

HoneyShah (Wed, 21 Nov 2018 10:30:54 GMT):
Hello, How can I get data returned from the chaincode function which is writing some data to database (means not a query function)?

dave.enyeart (Wed, 21 Nov 2018 13:20:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qKkx5tZNP2vysTWMe) @Unni_1994 Not yet, there are plans to add a query by hash and query for history of private data APIs

ruien (Wed, 21 Nov 2018 13:59:45 GMT):
@tanguyracinet Have you invoked the chaincode yet? It won't build on a peer until the first endorsement.

tanguyracinet (Wed, 21 Nov 2018 15:11:29 GMT):
@ruien when I tried to invoque my initialisation chaincode function (to create test data), it failed. Because the function doesn't exist. My chaincode is not the chaincode being executed. It starts fabcar, the IBM example on the ledger. I have no idea why this is when I specifically installed and instantiated my custom chaincode

tanguyracinet (Wed, 21 Nov 2018 15:12:48 GMT):
I do not have any mentions or code samples from fabcar in my development environment so I can only assume fabcar is hardcoded somewhere on one of the fabric images

tanguyracinet (Wed, 21 Nov 2018 15:14:21 GMT):
I am using the basic-network folder from fabric-samples, but I cleaned it out. Only the essential parts remain and my code. But it still installs and instantiate a fabcar chaincode on the ledger

ruien (Wed, 21 Nov 2018 15:15:18 GMT):
It sounds like you might have some old docker containers lying around and/or ledger data. Are you completely clearing out everything before starting your network? Fabcar isn't hard-coded anywhere, because I've never actually even run that sample before.

tanguyracinet (Wed, 21 Nov 2018 15:16:23 GMT):
i do docker system prune between each restart

tanguyracinet (Wed, 21 Nov 2018 15:16:33 GMT):
should I be even more drastic with my cleaning?

tanguyracinet (Wed, 21 Nov 2018 15:16:51 GMT):
the weirdest part for me is that the container takes the name of my chaincode

tanguyracinet (Wed, 21 Nov 2018 15:16:56 GMT):
but contains fabcar code inside

ruien (Wed, 21 Nov 2018 15:18:04 GMT):
I don't keep my ledger data in docker, so I have to clear out the ledger data directory (/var/hyperledger) as well, but if you're cleaning out the data and your 'docker container ls -a' is empty, that's pretty clean. I'm assuming this is a Solo orderer; if you're using Kafka, you have to clean that out too.

tanguyracinet (Wed, 21 Nov 2018 15:18:55 GMT):
I am not dealing with kafka directly, but I have seen mentions of it, not sure if the `basic-network` uses it in the background

tanguyracinet (Wed, 21 Nov 2018 15:19:27 GMT):
and yes, it is a solo orderer

tanguyracinet (Wed, 21 Nov 2018 15:20:50 GMT):
I believe the data is kept in the docker container, because if I don't clean it before restarting, it tells me the customcc-v1.0 already exists

ruien (Wed, 21 Nov 2018 15:21:44 GMT):
yes, and you should also see that customcc container in your docker container ls', too. But there should be no fabcar there.

ruien (Wed, 21 Nov 2018 15:22:05 GMT):
If you're seeing fabcar, then I'm not sure what to suggest. Something's running fabcar, but without really knowing what commands are being run it's difficult to speculate. Can you eliminate docker from the equation and just start up the network one command at a time?

tanguyracinet (Wed, 21 Nov 2018 15:22:31 GMT):
I see it, and I also see the dev-peer0.org1.example.com after the instantiate. But when I go looking into the dev-* I see teh fabcar code instead of my chaincode

tanguyracinet (Wed, 21 Nov 2018 15:23:35 GMT):
```docker-compose -f basic-network/docker-compose.yml up -d docker exec \ -e "CORE_PEER_LOCALMSPID=Org1MSP" \ -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" \ peer0.org1.example.com \ peer channel create \ -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx docker exec \ -e "CORE_PEER_LOCALMSPID=Org1MSP" \ -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" \ peer0.org1.example.com \ peer channel join -b mychannel.block docker exec \ cli \ peer chaincode install -l node -n artys -v 1.0 -p /opt/gopath/src/github.com/artys docker exec \ cli \ peer chaincode instantiate -C mychannel -l node -n artys -v 1.0 -c '{"Args":["initArtys"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" ```

tanguyracinet (Wed, 21 Nov 2018 15:23:35 GMT):
```docker-compose -f basic-network/docker-compose.yml up -d docker exec \ -e "CORE_PEER_LOCALMSPID=Org1MSP" \ -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" \ peer0.org1.example.com \ peer channel create \ -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx docker exec \ -e "CORE_PEER_LOCALMSPID=Org1MSP" \ -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" \ peer0.org1.example.com \ peer channel join -b mychannel.block docker exec \ cli \ peer chaincode install -l node -n customcc -v 1.0 -p /opt/gopath/src/github.com/customcc docker exec \ cli \ peer chaincode instantiate -C mychannel -l node -n customcc -v 1.0 -c '{"Args":["init"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" ```

tanguyracinet (Wed, 21 Nov 2018 15:23:42 GMT):
I run those commands, one by one

ruien (Wed, 21 Nov 2018 15:24:28 GMT):
too much docker - there's no way to know what's really happening

ruien (Wed, 21 Nov 2018 15:25:26 GMT):
maybe there's something about fabcar in your basic-network image? I'm not sure because I don't use this.

tanguyracinet (Wed, 21 Nov 2018 15:26:03 GMT):
I have been exploring that but I believe I cleaned it pretty thoroughly of anything that's not essential

tanguyracinet (Wed, 21 Nov 2018 15:26:17 GMT):
and replace any instance of fabcar with my customcc chaincode

tanguyracinet (Wed, 21 Nov 2018 15:28:55 GMT):
How do you start all the instances locally without using docker?

tanguyracinet (Wed, 21 Nov 2018 15:29:29 GMT):
Is there some tutorial you could help me find for that? Because everything I've seen online uses the docker compose

tanguyracinet (Wed, 21 Nov 2018 15:29:54 GMT):
I've just been piecing out the start.sh scripts to execute them line by line

ruien (Wed, 21 Nov 2018 15:30:16 GMT):
I just now reset --hard'ed my fabric-samples and checked out release-1.3, and then looked at the basic-network sample. There's nothing in here specific to fabcar, and everything seems very straightforward.

tanguyracinet (Wed, 21 Nov 2018 15:30:59 GMT):
that was my impression as well. I cannot figure out where fabcar comes from

tanguyracinet (Wed, 21 Nov 2018 15:31:15 GMT):
how did you proceed to reset --hard your fabric ?

ruien (Wed, 21 Nov 2018 15:31:17 GMT):
I don't have such a tutorial -- it took me a week to peel away the layers of complexity and understand what's actually going on. In the end, it's just edit a few yaml files and `./orderer` and `./peer node start`. No docker (on the outside) needed at all -- just one created by the peer for the chaincode and that's all.

ruien (Wed, 21 Nov 2018 15:31:17 GMT):
I don't have such a tutorial -- it took me a week to peel away the layers of complexity and understand what's actually going on. In the end, it's just edit a few yaml files and `./orderer` and `./peer node start`. No docker (on the outside) needed -- just one created by the peer for the chaincode and that's all.

ruien (Wed, 21 Nov 2018 15:31:53 GMT):
tanguyracinet, i mean `git reset --hard && git clean -f -d -x` in git.

ruien (Wed, 21 Nov 2018 15:31:53 GMT):
tanguyracinet, i mean `git reset --hard && git clean -f -d -x` in the `fabric-samples` git repo.

ruien (Wed, 21 Nov 2018 15:31:53 GMT):
tanguyracinet, i mean `git reset --hard && git clean -f -d -x` in the `fabric-samples` git repo (to return to a pristine state).

tanguyracinet (Wed, 21 Nov 2018 15:32:02 GMT):
ok

tanguyracinet (Wed, 21 Nov 2018 15:32:59 GMT):
I tried from a clean fabric-sample installation and I had the same problems

ruien (Wed, 21 Nov 2018 15:35:08 GMT):
I'm not sure what to say. I can't see any possible way you started with the `basic-network` sample and ended up with fabcar.

tanguyracinet (Wed, 21 Nov 2018 15:35:27 GMT):
not sure what else to try, short of nuking my docker and re-installing all the fabric images...

tanguyracinet (Wed, 21 Nov 2018 15:35:59 GMT):
Yeah, it's mind boggling to me how fabcar can be there instead of my chaincode XD

tanguyracinet (Wed, 21 Nov 2018 15:38:19 GMT):
I checked, in the cli, my chaincode is wxactly where it should be. But the src/ in the dev-* is from fabcar

tanguyracinet (Wed, 21 Nov 2018 15:38:19 GMT):
I checked, in the cli, my chaincode is exactly where it should be. But the src/ in the dev-* is from fabcar

ruien (Wed, 21 Nov 2018 15:38:47 GMT):
I sympathize, I just don't know what to suggest. The docker-compose file isn't storing data outside of the container as far as I can tell (such as mapping a volume from the host for persistence), and so if `docker container ls -a` is empty and `git status ` on the whole `fabric-samples` is clean, then the only last variable seems to be a bug in one of the images itself -- which seems very unlikely.

ruien (Wed, 21 Nov 2018 15:39:21 GMT):
what `dev-*` are you referring to?

tanguyracinet (Wed, 21 Nov 2018 15:41:03 GMT):
the docker image that is started by the peer after instantiate. it's named dev-peer0.org1.example.com-customcc-1.0 in my case

tanguyracinet (Wed, 21 Nov 2018 15:41:03 GMT):
the docker image that is started by the peer after instantiate. it's named `dev-peer0.org1.example.com-customcc-1.0` in my case

ruien (Wed, 21 Nov 2018 15:41:53 GMT):
oh, you mean the chaincode image docker container. Right.

ruien (Wed, 21 Nov 2018 15:41:53 GMT):
oh, you mean the chaincode container. Right.

ruien (Wed, 21 Nov 2018 15:43:17 GMT):
Wait a minute...

ruien (Wed, 21 Nov 2018 15:44:03 GMT):
I've never tried node chaincode, so maybe there's something strange about the way the path in `peer chaincode install` works

ruien (Wed, 21 Nov 2018 15:44:42 GMT):
I'm used to saying something like `peer chaincode install -n mycc -p github.com/hyperledger/fabric/mycc -v 1.0`

tanguyracinet (Wed, 21 Nov 2018 15:45:03 GMT):
the only difference is -l node

tanguyracinet (Wed, 21 Nov 2018 15:45:11 GMT):
or it should be

ruien (Wed, 21 Nov 2018 15:46:06 GMT):
No, that's not the only difference. In my example, the path specified with `-p` is a go library path that I know is correct. I'm not sure how the path for the node stuff works -- maybe it's finding the wrong chaincode there?

tanguyracinet (Wed, 21 Nov 2018 15:46:55 GMT):
no, it's finding the package.json. Then it does npm start which is defined in the package as node customcc.js

tanguyracinet (Wed, 21 Nov 2018 15:47:39 GMT):
when I check the logs and install+instantiate, it seems all fine. But in the chaincode container, it has code coming from fabcar, which I cannot understand.

ruien (Wed, 21 Nov 2018 15:48:21 GMT):
I think I have to give up. Really not sure what to say other than that's weird.

ruien (Wed, 21 Nov 2018 15:49:37 GMT):
Hmm..

ruien (Wed, 21 Nov 2018 15:49:53 GMT):
Why are you running `peer channel join` from the peer's container instead of `cli`?

ruien (Wed, 21 Nov 2018 15:50:19 GMT):
same for `peer channel create`

ruien (Wed, 21 Nov 2018 15:50:34 GMT):
I doubt these are the problem, but it's odd to me, and who knows

tanguyracinet (Wed, 21 Nov 2018 15:50:42 GMT):
followed the init.sh from fabric-samples

tanguyracinet (Wed, 21 Nov 2018 15:52:05 GMT):
I'll try completely deleting my docker images and re-install fabric images

muralisr (Wed, 21 Nov 2018 15:52:42 GMT):
@ruien @tanguyracinet trying to follow the above conversation. Can try to help if you like

muralisr (Wed, 21 Nov 2018 15:52:53 GMT):
but would help if you can condense it a bit ?

ruien (Wed, 21 Nov 2018 15:52:54 GMT):
All yours :)

ruien (Wed, 21 Nov 2018 15:53:04 GMT):
Yeah, here's a summary:

tanguyracinet (Wed, 21 Nov 2018 15:54:39 GMT):
I have a custom chaincode using fabric-samples/basic-network. I can install and instantiate without errors. When checking the cli, it has code form my custom chaincode. However, the code on the docker image created after instantiate `dev-peer0.org1...-customcc-1.0` doesn't have my chaincode. It has IBM's example chaincode: fabcar

tanguyracinet (Wed, 21 Nov 2018 15:54:39 GMT):
I have a custom chaincode using fabric-samples/basic-network. I can install and instantiate without errors. When checking the cli, it has code from my custom chaincode in the expected folder: `/opt/gopath/src/github.com/customcc`. However, the code on the docker image created after instantiate `dev-peer0.org1...-customcc-1.0` doesn't have my chaincode. It has IBM's example chaincode: fabcar

ruien (Wed, 21 Nov 2018 15:56:21 GMT):
tanguyracinet has completely cleared out all docker containers and is running from a fresh `fabric-samples` with the only exception being that he's added a `customcc` nodejs chaincode in fabric-samples/chaincode (which should then be mapped into the`cli` container as a volume), and then starts the network and sets it up according to the paste from earlier. However, after instantiating the chaincode, he sees `fabcar` chaincode docker image instead of `customcc`. The code inside the `cli` container from where `peer chaincode install` has the correct chaincode at the specified install path. This is my understanding. Done.

tanguyracinet (Wed, 21 Nov 2018 16:00:55 GMT):
ok, I am done completely destroying any and all docker images, etc. I am running the boostrap script from fabric-samples to re-download the latest fabric images (v 1.3).

ruien (Wed, 21 Nov 2018 16:01:31 GMT):
(make sure your `fabric-samples` is on the latest commit on `release-1.3` branch as well)

ruien (Wed, 21 Nov 2018 16:01:31 GMT):
(make sure your `fabric-samples` is on the latest commit on `release-1.3` branch as well -- 53ae4353)

ruien (Wed, 21 Nov 2018 16:01:31 GMT):
(make sure your `fabric-samples` is on the latest commit on `release-1.3` branch as well -- `53ae4353`)

tanguyracinet (Wed, 21 Nov 2018 16:11:13 GMT):
same problem.

tanguyracinet (Wed, 21 Nov 2018 16:12:28 GMT):
Same error starting from a fresh basic-network clone with a fresh docker install.

tanguyracinet (Wed, 21 Nov 2018 16:12:34 GMT):
any ideas @muralisr

tanguyracinet (Wed, 21 Nov 2018 16:12:34 GMT):
any ideas @muralisr ?

muralisr (Wed, 21 Nov 2018 16:13:10 GMT):
sorry got distracted..reading now

muralisr (Wed, 21 Nov 2018 16:14:48 GMT):
so you are installing with something like `peer chaincode install -n customcc -v 1.0 -p github.com/customcc`

muralisr (Wed, 21 Nov 2018 16:15:43 GMT):
and instantiating with something like `peer chaincode instantiate -n customcc -v 1.0 -C channelname -c '{"Args": "someargs"}'`

tanguyracinet (Wed, 21 Nov 2018 16:15:43 GMT):
yeah, with a -l node. I am using the node SDK

muralisr (Wed, 21 Nov 2018 16:15:48 GMT):
ok

muralisr (Wed, 21 Nov 2018 16:16:24 GMT):
so `peer chaincode install -n customcc -v 1.0 -p opt/gopath/src/github.com/customcc `

muralisr (Wed, 21 Nov 2018 16:16:24 GMT):
so `peer chaincode install -n customcc -v 1.0 -p opt/gopath/src/github.com/customcc -l node`

ruien (Wed, 21 Nov 2018 16:17:16 GMT):
No, his has an absolute path: `/opt/gopath/src/github.com/customcc`

muralisr (Wed, 21 Nov 2018 16:17:46 GMT):
right, didn't mean to leave out the `/`

muralisr (Wed, 21 Nov 2018 16:18:40 GMT):
before you do the instantiate `docker images | grep "dev-peer" ` returns empty

tanguyracinet (Wed, 21 Nov 2018 16:18:49 GMT):
hmmm I think I've had some progress... It seems the peer (or CLI ?) image had a container that was not purged

tanguyracinet (Wed, 21 Nov 2018 16:18:49 GMT):
hmmm I think I've had some progress... It seems the peer (or CLI ?) image had a container/image that was not purged

tanguyracinet (Wed, 21 Nov 2018 16:19:16 GMT):
and the hard reset cleaned that

ruien (Wed, 21 Nov 2018 16:19:22 GMT):
`docker container ls -a` definitely needs to be _empty_

muralisr (Wed, 21 Nov 2018 16:19:31 GMT):
so one thing to remember

muralisr (Wed, 21 Nov 2018 16:19:44 GMT):
(and this may have nothing to do with your current problem)

tanguyracinet (Wed, 21 Nov 2018 16:19:48 GMT):
the docker container ls -a was empty, but not the docker images

muralisr (Wed, 21 Nov 2018 16:20:17 GMT):
assuming docker images shows `dev-peer0...-customcc-...`

muralisr (Wed, 21 Nov 2018 16:20:52 GMT):
(first of all . do you see that ?)

tanguyracinet (Wed, 21 Nov 2018 16:21:11 GMT):
yeah, after the docker system prune, the image dev-peer stil exists

tanguyracinet (Wed, 21 Nov 2018 16:21:11 GMT):
yeah, after the docker system prune, the image dev-peer still exists

tanguyracinet (Wed, 21 Nov 2018 16:21:25 GMT):
so that might have been my problem

muralisr (Wed, 21 Nov 2018 16:21:30 GMT):
ok

tanguyracinet (Wed, 21 Nov 2018 16:21:48 GMT):
that means that between each restart of the ledger, I'll need to remove any dev-* image

muralisr (Wed, 21 Nov 2018 16:22:02 GMT):
if you make changes to the node chaincode, manually remove that image

muralisr (Wed, 21 Nov 2018 16:22:43 GMT):
only if you make chane to the chaincode

muralisr (Wed, 21 Nov 2018 16:23:10 GMT):
(and redeploy of course)

tanguyracinet (Wed, 21 Nov 2018 16:23:21 GMT):
ok. I'll probably add that in my restart operations to be sure not to forget

tanguyracinet (Wed, 21 Nov 2018 16:23:32 GMT):
Many thanks

muralisr (Wed, 21 Nov 2018 16:24:13 GMT):
more efficient to purge ONLY if you change chaincode and redeploy

ruien (Wed, 21 Nov 2018 16:24:13 GMT):
Sorry, now that the solution is evident, it reminds me that this has been part of my cleaning script from long ago: ``` ids=$(docker image ls -a | grep mycc | cut -d ' ' -f 1) if ! [[ -z "$ids" ]]; then docker image rm $ids fi ```

muralisr (Wed, 21 Nov 2018 16:25:42 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9uFGrbi7XEBZHKt8E

muralisr (Wed, 21 Nov 2018 16:29:30 GMT):
@Rajatsharma those docs relating to building the peer with your SCC are no longer valid. If you are NOT loading your CC as a plugin but want to build it with the peer as of old, the approach would be to have the chaincode implement the "SelfDescribingCC" interface https://github.com/hyperledger/fabric/blob/release-1.3/core/scc/sysccapi.go#L78 and register an instance of it in https://github.com/hyperledger/fabric/blob/release-1.3/peer/node/start.go#L549

muralisr (Wed, 21 Nov 2018 16:29:30 GMT):
@Rajatsharma those docs relating to building the peer with your SCC are no longer valid. If you are NOT loading your CC as a plugin but want to build it with the peer as of old, the approach would be to have the chaincode implement the "SelfDescribingCC" interface https://github.com/hyperledger/fabric/blob/release-1.3/core/scc/sysccapi.go#L78 and register an instance of it in https://github.com/hyperledger/fabric/blob/release-1.3/peer/node/start.go#L549 (and rebuild the peer).

muralisr (Wed, 21 Nov 2018 16:29:30 GMT):
@Rajatsharma those docs relating to building the peer with your SCC are no longer valid. If you are NOT loading your CC as a plugin but want to build it with the peer as of old, the approach would be to have the chaincode implement the "SelfDescribingSysCC" interface https://github.com/hyperledger/fabric/blob/release-1.3/core/scc/sysccapi.go#L78 and register an instance of it in https://github.com/hyperledger/fabric/blob/release-1.3/peer/node/start.go#L549 (and rebuild the peer).

muralisr (Wed, 21 Nov 2018 16:29:30 GMT):
@Rajatsharma those docs relating to building the peer with your SCC are no longer valid. If you are NOT loading your CC as a plugin but want to build it with the peer as of old, the approach would be to have the chaincode implement the `SelfDescribingSysCC` interface https://github.com/hyperledger/fabric/blob/release-1.3/core/scc/sysccapi.go#L78 and register an instance of it in https://github.com/hyperledger/fabric/blob/release-1.3/peer/node/start.go#L549 (and rebuild the peer).

muralisr (Wed, 21 Nov 2018 16:30:37 GMT):
you could follow anyone of the system chaincodes (cscc, lscc etc) there

muralisr (Wed, 21 Nov 2018 16:33:09 GMT):
BUT... better to load your CC as a plugin. That way you don't have to build the peer every time you change your syscc. You _do_ have to build the peer once to enable loading plugins (see https://jira.hyperledger.org/browse/FAB-7710)

Rajatsharma (Wed, 21 Nov 2018 17:09:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zcGjoEqm8hDhZoFZL) Thanks. I'll try this. I guess I could use this for my case.

Rajatsharma (Wed, 21 Nov 2018 17:10:40 GMT):
Well still do you know any resource for deploying our own System Chaincodes.

Rajatsharma (Wed, 21 Nov 2018 17:27:46 GMT):
Going through these files mentioned, Initially I thought, that I had mentioned in the core.yaml file, chaincode: systemPlugins: - enabled: true name: myscc path: /opt/lib/myscc.so invokableExternal: true invokableCC2CC: true and even whitelisted the chaincode myscc with the build file present at /opt/lib/myscc.so. It should have started the chaincode, as other mentioned chaincodes(qscc,lscc) start too. So the only way out is that I'll have to make the changes and build the peer?

muralisr (Wed, 21 Nov 2018 18:32:24 GMT):
@Rajatsharma you have to build the peer once for enabling loading plugins.. here are the steps

muralisr (Wed, 21 Nov 2018 18:38:19 GMT):
``` 1. build your scc cd to/your/scc/dir go build -buildmode=plugin this will produce a .so 2. build your peer to enable loading GO plugins GO_TAGS+=" pluginsenabled" make peer this needs to be done only once 3. configure peer to use the SCC. For example make the changes in core.yaml a) enable the scc by adding "my-scc-name: enable" under chaincode:system (you'll see other system ccs enabled here) b) add a stanza for the plugin under chaincode:systemPlugins - enabled: true name: my-scc-name path: to/your/scc/dir/.so invokableExternal: true invokableCC2CC: true restart the peer ```

muralisr (Wed, 21 Nov 2018 18:38:58 GMT):
that should take care of it...

httran88 (Wed, 21 Nov 2018 20:18:58 GMT):
Hello friends. I am having some issues with chaincode instantiate that I've never experienced before. If anyone has any inside please help. Context: Kubernetes deployment with couchdb, peer, dind in the same POD. Using fabric-samples/example_02/go chaincode. After instantiation, the instantiation is successful, I can see from peer logs Aval and Bval got instantiated and using docker exec dind container, i can see the chaincode container created. The problem occurs when I try to use peer chaincode list --instantiated -C foo, the chaincode doesn't seem to be instantiated. Using peer chaincode list --installed, I can see the cc got installed. I checked the couchdb at endpoint/_utils and I only see the foo_ and foo_lscc created but foo_lscc documents are zero. From other environments when instantiation is correct, foo_lscc would contain 1 document that contains information about the chaincode and the foo_chaincodeid db would get created. Can someone help me debug and find out why the foo_lscc and foo_chaincodeid isn't being modified? I've tried exec'ing into the cc container and using localhost:5984 to check the connection to the db and its there. I've set CORE_PEER_CHAINCODELISTENADDRESS to localhost:7052 and CORE_PEER_CHAINCODEADDRESS to localhost:7052 and to my peer container. One huge question is, if the database isn't being created in the couchdb, how can the cc use Putstate and Getstate successfully ? Thank you for your help

dave.enyeart (Wed, 21 Nov 2018 23:04:04 GMT):
@httran88 sounds like the instantiation proposal was successful, but the instantiation commit was not. this means you won't be able to invoke the chaincode on the channel. check your peer logs when you instantiate... i suspect the peers either aren't getting the instantiation transaction or it is getting invalidated.

Rajatsharma (Thu, 22 Nov 2018 09:59:51 GMT):
cd cd cd ..

Rajatsharma (Thu, 22 Nov 2018 11:12:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zyLFEKdXi7dQJKCdu) @muralisr Thanks a lot !!! This really helped, although when I was using make peer-docker, it was throwing warning "In function `pluginOpen': Using 'dlopen". And when I followed the specified method, the peer docker container exited on restarting. Then I used the peer make method, build the image and container and it worked fine. But I'm still unable to figure out what's the problem with the make peer-docker method.

Rajatsharma (Thu, 22 Nov 2018 11:16:51 GMT):
@muralisr could you help me with invoking the system chaincode too. I'm not able to find any resource on that too. Thanks a lot !!!! I was really struggling to make this work.

kwakwa (Thu, 22 Nov 2018 11:51:35 GMT):
Has joined the channel.

akshay.lawange (Thu, 22 Nov 2018 12:16:24 GMT):
Hi, I have tried rich query, composite key query,partial composite key query and passing all the necessary arguments. But when I see in the particular peer's container log, it gives an error 'Document Not Found'. However when I query to couchdb through rest calls, it gives document details. So data is going into state but I am unable to query through query methods. Can anyone help with this?

akshay.lawange (Thu, 22 Nov 2018 12:17:11 GMT):
Sorry forgot to mention I am trying this for private data.

dave.enyeart (Thu, 22 Nov 2018 12:43:56 GMT):
@akshay.lawange The query should be same whether via chaincode or via CouchDB REST. Turn on peer debug so that you can see the actual CouchDB queries being made, and then compare that with your REST query that works. I expect you'll find something different. Sample debug: `CORE_LOGGING_LEVEL=info:couchdb=debug peer node start`

ShefaliMittal (Thu, 22 Nov 2018 12:56:14 GMT):
hi .. I have recently upgraded to fabric 1.3 version. Now I am getting this error while invoking chaincode Error: endorsement failure during invoke. response: status:500 message:"GET_STATE_BY_RANGE failed: transaction ID: 33bbe785870bf3ee6ca6e97fce28a76f5bed421550d23456ccb5ba595a68455b: version field ~version was not found" Does anyone have any idea about it

akshay.lawange (Thu, 22 Nov 2018 13:14:20 GMT):
@dave.enyeart yes. apparently the peer's container log does contain the REST query, i tried the same url with GET which they have used with POST and i got the data but via chaincode somehow i am not getting.

akshay.lawange (Thu, 22 Nov 2018 13:14:32 GMT):
```func (t *sampleChaincode) readJSON(stub shim.ChaincodeStubInterface,collection string, objectType string, attributes []string) ([]byte, error) { fmt.Println("###### sampleChaincode: function: readJSON ") Key := []string{} for cnt := 0; cnt < len(attributes); cnt++ { if attributes[cnt] != "" { Key = append(Key, attributes[cnt]) } } compositeKey, _ := stub.CreateCompositeKey(objectType, Key) JSONBytes, _ := stub.GetPrivateData(collection,compositeKey) fmt.Println("Retrived JSON ::", string(compositeKey), string(JSONBytes)) return JSONBytes, nil }```

dave.enyeart (Thu, 22 Nov 2018 13:25:22 GMT):
@ShefaliMittal If you are upgrading from v1.0 then as part of the upgrade process you need to drop your CouchDB state database. It will automatically get rebuilt on the first peer start post-upgrade.

nurulmac11 (Thu, 22 Nov 2018 15:12:04 GMT):
Has joined the channel.

muralisr (Thu, 22 Nov 2018 16:59:40 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jJnjDwGPhp7aPTLih

muralisr (Thu, 22 Nov 2018 17:00:10 GMT):
@Rajatsharma the system chaincode you installed can be invoked in the same manner you would any chaincode

muralisr (Thu, 22 Nov 2018 17:00:53 GMT):
basically `peer chaincode invoke -n -C -c '{"Args":...}`

muralisr (Thu, 22 Nov 2018 17:00:53 GMT):
basically `peer chaincode invoke -n -C -c '{"Args":...}` (and equivalently with SDK)

chill37 (Fri, 23 Nov 2018 00:44:43 GMT):
Has left the channel.

Heena078 (Fri, 23 Nov 2018 05:50:40 GMT):
Has joined the channel.

HoneyShah (Fri, 23 Nov 2018 06:14:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Z7YpchTCuJTSZ6py7) @davidkel I tried using shim 1.3.0 but the error is still there.

Unni_1994 (Fri, 23 Nov 2018 06:55:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SFHKw4vXtx8v3Sjv3) @dave.enyeart Thanks. I hope Private data transfer between organizations aslo will not work

Unni_1994 (Fri, 23 Nov 2018 06:57:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=dhabYESRihHQEtk6g) `The endorsing peer sends the proposal response back to the client with public data, including a hash of the private data key and value. No private data is sent back to the client. `

Unni_1994 (Fri, 23 Nov 2018 07:02:08 GMT):
`The endorsing peer sends the proposal response back to the client with public data, including a hash of the private data key and value. No private data is sent back to the client. ` We got this information from the Fabric 1.2 document, under the Private data section https://hyperledger-fabric.readthedocs.io/en/release-1.2/private-data/private-data.html Our requirement is to get the hash of the private data (key and value) when endorsing peers send back the proposal response back to client. Kindly let me know this is possible

Rajatsharma (Fri, 23 Nov 2018 07:27:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pg8BZ8o29gNuMFAyX) @muralisr Thanks a lot !! this worked fine.

Rajatsharma (Fri, 23 Nov 2018 07:29:23 GMT):
ls

HoneyShah (Fri, 23 Nov 2018 09:18:03 GMT):
@dave.enyeart When chaincode container remains idle for some time then it stops with error: ``` ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: EOF\n at createStatusError (/usr/local/src/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:248:8)\n at /usr/local/src/node_modules/grpc/src/client.js:804:12" ``` And when the first request comes after idle time it gives an error of ``` Error: 14 UNAVAILABLE: TCP Write failed ``` And after that all works fine. How can I solve for the first request? Please help

HoneyShah (Fri, 23 Nov 2018 09:18:03 GMT):
@dave.enyeart When chaincode container remains idle for some time then it stops with error: ``` ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: EOF\n at createStatusError (/usr/local/src/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:248:8)\n at /usr/local/src/node_modules/grpc/src/client.js:804:12" ``` And when the first request comes after idle time it gives an error of ``` Error: 14 UNAVAILABLE: TCP Write failed ``` And after that all works fine. How can I solve for the first request? Please help

johnlohith (Fri, 23 Nov 2018 09:19:50 GMT):
I am unable to get an error message from the chaincode to the node SDK. Even after passing the error message inside shim.error() it is not received back in the node SDK. Can anyone help?

johnlohith (Fri, 23 Nov 2018 09:46:46 GMT):
This can be done by changing the source code. At line 2922 of Channel.js of fabric-client change throw new Error('Parameter must be a ProposalResponse Object');

johnlohith (Fri, 23 Nov 2018 09:46:46 GMT):
This can be done by changing the source code. At line 2922 of Channel.js of fabric-client change throw new Error('Parameter must be a ProposalResponse Object'); to throw new Error(proposal_response);

PaddyBN (Fri, 23 Nov 2018 10:58:05 GMT):
Has joined the channel.

muralisr (Fri, 23 Nov 2018 14:37:46 GMT):
@johnlohith thanks for the investigation... your issue sounds like this one https://jira.hyperledger.org/browse/FAB-12676 ... perhaps you can comment on your situation and your resolution ?

muralisr (Fri, 23 Nov 2018 14:37:46 GMT):
@johnlohith thanks for the investigation... your issue sounds like this one https://jira.hyperledger.org/browse/FAB-12676 ... perhaps you can add a comment there on your situation and your resolution ?

muralisr (Fri, 23 Nov 2018 14:37:46 GMT):
@johnlohith thanks for the investigation... your issue sounds like this one https://jira.hyperledger.org/browse/FAB-12676. There the error from the lscc chaincode is not treated in the SDK. Perhaps you can add a comment there on your situation and your resolution ?

muralisr (Fri, 23 Nov 2018 14:43:29 GMT):
@HoneyShah suggest trying setting the `chaincode:keepalive` param in core.yaml (or the CORE_CHAINCODE_KEEPALIVE env var) to a non-zero value

muralisr (Fri, 23 Nov 2018 14:43:29 GMT):
@HoneyShah suggest try setting the `chaincode:keepalive` param in core.yaml (or the CORE_CHAINCODE_KEEPALIVE env var) to a non-zero value

dave.enyeart (Fri, 23 Nov 2018 17:25:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mtCTXE2w4rN6BpHYr) @Unni_1994 Yes hash of private key and private value is in the proposal response ReadWriteSet, see https://github.com/hyperledger/fabric/blob/release-1.3/protos/ledger/rwset/rwset.proto#L39 and https://github.com/hyperledger/fabric/blob/release-1.3/protos/ledger/rwset/kvrwset/kv_rwset.proto#L24

dave.enyeart (Fri, 23 Nov 2018 17:26:21 GMT):
@HoneyShah Please open a Jira bug and somebody can take a look.

dave.enyeart (Fri, 23 Nov 2018 17:26:21 GMT):
@HoneyShah Please open a Jira issue and mention results of your keepalive trial. This could be improved with either an enhancement or improved doc.

dileban (Sat, 24 Nov 2018 04:51:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6m4TJmpHq5syovYsc) @muralisr I just started looking into this and before I get coding I wanted to confirm something. When a chaincode calls another chaincode, the fact that the original transaction context is preserved let us retrieve the first chaincode's ID from stub.GetSignedProposal(). How do I dynamically retrieve the second (called) chaincode's ID in order to compare with the one on the original transaction context? I suppose this something I would have to set in the call to the second chaincode's Init() function. Is there a better way for me to do this?

HoneyShah (Sat, 24 Nov 2018 05:32:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4ACGjPKPYzyYks8Yq) @muralisr Thanks. I will try that

HoneyShah (Sat, 24 Nov 2018 05:33:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=x9q4X9M37C5QjssxL) @dave.enyeart Okay. Will do that

HoneyShah (Sat, 24 Nov 2018 05:33:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=x9q4X9M37C5QjssxL) @dave.enyeart Okay. Will do that. Thanks for the answer.

HoneyShah (Sat, 24 Nov 2018 10:18:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8esusdzZ7TSgsdbkq) I tried by setting it to 10 but error is still there.

davidkel (Sat, 24 Nov 2018 10:45:04 GMT):
@HoneyShah try using fabric 1.3.1 shim and not setting that value at all and leave it at the default value. A value of 10 might mean 10 milliseconds which is not going to work.

davidkel (Sat, 24 Nov 2018 10:45:04 GMT):
@HoneyShah try using fabric 1.3.1 shim and not setting that value at all, ie leave it at the default value. A value of 10 might mean 10 milliseconds which is not going to work.

davidkel (Sat, 24 Nov 2018 10:45:04 GMT):
@HoneyShah try using fabric 1.3.1 shim and not setting that value at all, ie leave it to default. A value of 10 might mean 10 milliseconds which is not going to work.

HoneyShah (Sat, 24 Nov 2018 11:29:29 GMT):
@davidkel I am trying that. I didn't get the in which unit it takes time so I ketp it to 10 as I show this at some examples. But now I have removed that and trying with 1.3.1

HoneyShah (Sat, 24 Nov 2018 11:29:29 GMT):
@davidkel I am trying that. I didn't get in which unit it takes time so I ketp it to 10 as I show this at some examples. But now I have removed that and trying with 1.3.1

HoneyShah (Sat, 24 Nov 2018 12:14:18 GMT):
@davidkel It has the same error still.

HoneyShah (Sat, 24 Nov 2018 12:14:18 GMT):
@davidkel It still has the same error.

davidkel (Sat, 24 Nov 2018 12:45:57 GMT):
@HoneyShah Do the Peer logs have any entries in there ?

muralisr (Sun, 25 Nov 2018 15:31:50 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wSguHHveoBu2KhdXY

muralisr (Sun, 25 Nov 2018 15:34:30 GMT):
@dileban currently there's no way to get "this" chaincodes ID automatically. I think it would be reasonable (and simple) to add that capability to the stub interface rather than users having to deal with it in the ways you have pointed out

muralisr (Sun, 25 Nov 2018 15:34:30 GMT):
@dileban currently there's no way to get "this" chaincodes ID automatically. I think it would be reasonable (and simple) to add that capability to the stub interface rather than users having to deal with it in the ways you have pointed out. Perhaps you could attempt that as part of this work

longnv1a (Mon, 26 Nov 2018 04:31:40 GMT):
Has joined the channel.

ShefaliMittal (Mon, 26 Nov 2018 07:43:42 GMT):
Hi All, Anyone got any idea around indexes with couchdb. I am able to create index by referring to this URL- https://hyperledger-fabric.readthedocs.io/en/release-1.2/couchdb_tutorial.html#cdb-create-index But after creating index getStateByRange query is not working - It says Error: GET_STATE_BY_RANGE failed: transaction ID: 1514f7e48055fd83a96a8878bee31e8106693e97147e793d32f20e346a9458c2: version field ~version was not found Please help.

ascatox (Mon, 26 Nov 2018 08:20:07 GMT):
Hi All! I'm developing a Chaincode using a Composite Key, made by two different fields (id1, id2). I want to execute queries separate for the first part of the key and for the second one. Is it possible with the method *getStateByPartialCompositeKey*? Thanks for the help.

HoneyShah (Mon, 26 Nov 2018 08:28:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=R3TcwDtTJv3rFwFMi) @davidkel I didn't find any suspicious entry in peer logs. Chaincode container doesn't stop now but the error logs are still same

HoneyShah (Mon, 26 Nov 2018 08:28:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=R3TcwDtTJv3rFwFMi) @davidkel I didn't find any suspicious entry in peer logs. Chaincode container doesn't stop now but the error logs are still same i.e ``` error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: TCP Write failed\n at Object.exports.createStatusError (/app/node_modules/grpc/src/common.js:87:15)\n at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:235:26)\n at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8)\n at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15)\n at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42)\n at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8)\n at /app/node_modules/grpc/src/client_interceptors.js:1110:18" sending response inside catch Error: SERVICE_UNAVAILABLE at ClientDuplexStream.broadcast.on (/app/node_modules/fabric-client/lib/Orderer.js:172:22) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:236:12) at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8) at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15) at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8) at /app/node_modules/grpc/src/client_interceptors. ```

HoneyShah (Mon, 26 Nov 2018 08:28:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=R3TcwDtTJv3rFwFMi) @davidkel I didn't find any suspicious entry in peer logs. Chaincode container doesn't stop now but the error is still there i.e ``` error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: TCP Write failed\n at Object.exports.createStatusError (/app/node_modules/grpc/src/common.js:87:15)\n at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:235:26)\n at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8)\n at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15)\n at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42)\n at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8)\n at /app/node_modules/grpc/src/client_interceptors.js:1110:18" sending response inside catch Error: SERVICE_UNAVAILABLE at ClientDuplexStream.broadcast.on (/app/node_modules/fabric-client/lib/Orderer.js:172:22) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:236:12) at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8) at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15) at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8) at /app/node_modules/grpc/src/client_interceptors. ```

davidkel (Mon, 26 Nov 2018 08:31:13 GMT):
@HoneyShah So it looks like you have fixed the problem with comms between the chaincode and the peer. Now it looks like you have some issue client side trying to communicate with the orderer.

HoneyShah (Mon, 26 Nov 2018 08:59:52 GMT):
@davidkel Yes, but I didn't get what's the problem because it is also happens randomly and after this issue occurs and if I send request again it gets successful. Can you help me on this? How should I troubleshoot this?

davidkel (Mon, 26 Nov 2018 09:02:15 GMT):
@HoneyShah Either you have a network problem or there is a problem with the orderer itself, you might want to as on #fabric-orderer as well as get debug logs from the orderer itself. If it's a network problem then that tends to be environmental and unique to your setup so you would need to look into how to investigate these types of problems

davidkel (Mon, 26 Nov 2018 09:02:15 GMT):
@HoneyShah Either you have a network problem or there is a problem with the orderer itself, you might want to ask on #fabric-orderer as well as get debug logs from the orderer itself. If it's a network problem then that tends to be environmental and unique to your setup so you would need to look into how to investigate these types of problems

HoneyShah (Mon, 26 Nov 2018 09:08:31 GMT):
@davidkel Okay. I will try to the same. Thanks for all your help:grinning:

dave.enyeart (Mon, 26 Nov 2018 12:11:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=q5LP2jJm7Ngq7zM8q) @ShefaliMittal Did you by chance upgrade from v1.0? It's saying that the version field that Fabric writes to the document is not there. This would be true if you upgraded from v1.0. You can drop the state database (delete data from /opt/couchdb/data) and restart peer to rebuild state database with correct format. Note that this has nothing to do with an index... an index is used for JSON queries, not range queries.

AndresMartinezMelgar.itcl (Mon, 26 Nov 2018 12:36:57 GMT):
Has joined the channel.

Rajatsharma (Mon, 26 Nov 2018 14:52:25 GMT):
Is there any way I can spawn a docker container of my own and make that a part of fabric network. If i'm the network admin.

gsolaich (Tue, 27 Nov 2018 06:14:29 GMT):
Has joined the channel.

chuda (Tue, 27 Nov 2018 06:42:32 GMT):
Has joined the channel.

chuda (Tue, 27 Nov 2018 06:48:12 GMT):
hi all, i need help here, iam surprised with fabric behaviour while testing in aws ,, i designed a network with only 1-org,1-peer solo based in aws ubuntu instance , for testing i have choosed that istance of having 4gb ram,12 gb ...while tried to hit 6 transactions per 3 sec, its got crashed it showned that 100 iops ...how its possible if i made only 6 requests????can any one help me here...

FLASHJr (Tue, 27 Nov 2018 07:16:36 GMT):
Has joined the channel.

Naveen4091 (Tue, 27 Nov 2018 10:10:07 GMT):
Has joined the channel.

HaydenG (Tue, 27 Nov 2018 10:15:15 GMT):
Has joined the channel.

mahoney1 (Tue, 27 Nov 2018 10:16:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=PGAxNhAXwsvxjCWTb) @ascatox should be - there's an example of something similar in the marbles sample - see https://github.com/hyperledger/fabric-samples/blob/release-1.3/chaincode/marbles02/node/marbles_chaincode.js#L238 fyi the function is described [here](https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetStateByPartialCompositeKey)

ascatox (Tue, 27 Nov 2018 10:17:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=q2AWCZo4n57zX84KN) @mahoney1 :thumbsup:

joaquimpedrooliveira (Tue, 27 Nov 2018 13:29:43 GMT):
Has joined the channel.

joaquimpedrooliveira (Tue, 27 Nov 2018 13:32:19 GMT):
Hello, everybody! On a NodeJS chaincode, why do we need to call other methods using 'reflection' (don't know if it's the correct term) instead of calling it directly? Sample: https://github.com/hyperledger/fabric-samples/blob/release-1.3/chaincode/marbles02/node/marbles_chaincode.js#L263

joaquimpedrooliveira (Tue, 27 Nov 2018 13:32:29 GMT):
Couldn't find anything abou it in the docs.

joaquimpedrooliveira (Tue, 27 Nov 2018 13:32:50 GMT):
When I call the method directly from another, the chaincode execution says that the method is not defined

huxiangdong (Tue, 27 Nov 2018 13:33:57 GMT):
here's what I would like to achieve, user A can input some secret data to a program, the program will do some computation based on the input and produce some output, the output can only be read by user B, during this process, no one else except user A himself should be able to get value of the secret data input by user A...can this be done by using hyperledger fabric by any chance? any idea?

billchen (Wed, 28 Nov 2018 00:59:25 GMT):
Hello, I'm trying to send a string to an event listener from chaincode. I am able to get the event, but not pass a payload. So far I have this: ``` stub.SetEvent("MyEvent", []byte("this is a test")) ``` but my chaincode event listener keeps saying that there is no payload data when I try this: `let eventPayload = event.payload.toString('utf8');`.

billchen (Wed, 28 Nov 2018 00:59:25 GMT):
Hello, I'm trying to send a string to an event listener from chaincode. I am able to get the event, but not pass a payload. So far I have this: ``` stub.SetEvent("MyEvent", []byte("this is a test")) ``` but my chaincode event listener keeps saying that there is no payload data when I try this: ```let eventPayload = event.payload.toString('utf8');```.

billchen (Wed, 28 Nov 2018 00:59:25 GMT):
Hello, I'm trying to send a string to an event listener from chaincode. I am able to get the event, but not pass a payload. So far I have this: ``` stub.SetEvent("MyEvent", []byte("this is a test")) ``` but my chaincode event listener keeps saying that there is no payload data when I try this: ```let eventPayload = event.payload.toString('utf8');```. Could someone help me with this?

HoneyShah (Wed, 28 Nov 2018 05:28:02 GMT):
I am trying to integrate pagination using node js but I am stuck with point. When I iterate through data I am getting value in the form of: ``` ByteBuffer { buffer: , offset: 57, markedOffset: -1, limit: 281, littleEndian: true, noAssert: false } ``` How can I get back into string? Anyone has done this?

BernardDK (Wed, 28 Nov 2018 08:37:42 GMT):
Has joined the channel.

HoneyShah (Wed, 28 Nov 2018 08:54:00 GMT):
Hello, How can we get count of documents with some filter?

iridescent995 (Wed, 28 Nov 2018 09:27:31 GMT):
Has joined the channel.

iridescent995 (Wed, 28 Nov 2018 09:28:10 GMT):
Hello everyone, Is there a way to install java chaincode directly as a jar in hyperledger fabric v1.3 without exposing the source code?

haggis (Wed, 28 Nov 2018 10:05:48 GMT):
Has joined the channel.

KartikChauhan (Wed, 28 Nov 2018 10:42:14 GMT):
Has joined the channel.

Rajatsharma (Wed, 28 Nov 2018 12:04:44 GMT):
I had setup a network and restarted a peer and after that when I was creating a channel this error popped up. Error: rpc error: code = Unavailable desc = transport is closing

rthatcher (Wed, 28 Nov 2018 13:28:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EkGQXvLBbN8Y4tEgT) @HoneyShah afaik there is no "count" feature. You will have to return all the results and then interrogate the returned object to find the count. You can use `getStateByRange()` or `getQueryResult()` - both of which will return an iterator object. https://fabric-shim.github.io/release-1.3/fabric-shim.ChaincodeStub.html#getQueryResult

haggis (Wed, 28 Nov 2018 15:19:29 GMT):
Have you guys ever encountered the error `Contract name is not known ::` when invoking a chaincode in dev-mode? I get this in both terminals: the one which invokes the CC and the other which runs the CC. Any ideas?

davidkel (Wed, 28 Nov 2018 15:21:55 GMT):
@mbwhite ^^^

haggis (Wed, 28 Nov 2018 15:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8AjRX8Ko486jXB7kS) to answer my own question: the invoke arguments must not be '{"Args":["com.contract.my:myMethod","3"]}' rather than '{"Args":["myMethod","3"]}'

haggis (Wed, 28 Nov 2018 15:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8AjRX8Ko486jXB7kS) to answer my own question: the invoke arguments must not be `{"Args":["com.contract.my:myMethod","3"]}` rather than `{"Args":["myMethod","3"]}`

haggis (Wed, 28 Nov 2018 15:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8AjRX8Ko486jXB7kS) to answer my own question: the invoke arguments must be `{"Args":["com.contract.my:myMethod","3"]}` rather than `{"Args":["myMethod","3"]}`

mbwhite (Wed, 28 Nov 2018 15:39:00 GMT):
@haggis - guess you're running with the new Contract-api?

haggis (Wed, 28 Nov 2018 15:39:11 GMT):
yes :)

haggis (Wed, 28 Nov 2018 15:39:27 GMT):
It needs a lot of "reverse engineering"

mbwhite (Wed, 28 Nov 2018 15:40:06 GMT):
Fair point; a lot more documentation has been written recently - along with some samples that are available. Hope to push a beta up again this week...

haggis (Wed, 28 Nov 2018 15:41:24 GMT):
Nice. I don't want to complain about documentation, though. HL has great docs and the new contract-api is still in beta, so... ;)

haggis (Wed, 28 Nov 2018 15:42:39 GMT):
`Calling chaincode Invoke() succeeded. Sending COMPLETED message back to peer ` -> best moment to end my working day with a smile

mbwhite (Wed, 28 Nov 2018 15:42:45 GMT):
Have you checked the master version of the Read-the-docs docs... there's a whole new developing apps section there

mbwhite (Wed, 28 Nov 2018 15:42:53 GMT):
ah yes... :-)

haggis (Wed, 28 Nov 2018 15:43:11 GMT):
Yep, I'm switching a lot between the 1.3 and latest docs

haggis (Wed, 28 Nov 2018 15:43:34 GMT):
there's so much explained, really great job!

gravity (Wed, 28 Nov 2018 16:01:27 GMT):
Hi all how to read chaincode logs? I've set up logging in a chaincode like this `var logger = shim.NewLogger("example_cc")`, set log level ` logger.SetLevel(shim.LogInfo)` and log messages in `Init` and `Invoke` functions like this `logger.Warning("init func: received apiKey=%v", apiKey)` also, peer config has this env variable: `CORE_CHAINCODE_LOGGING_LEVEL=INFO` when I do `docker logs ` I receive empty output

gravity (Wed, 28 Nov 2018 16:01:27 GMT):
Hi all how to read chaincode logs? I've set up logging in a chaincode like this `var logger = shim.NewLogger("example_cc")`, set log level ` logger.SetLevel(shim.LogInfo)` and log messages in `Init` and `Invoke` functions like this `logger.Warning("init func: received apiKey=%v", apiKey)` also, peer config has this env variable: `CORE_CHAINCODE_LOGGING_LEVEL=INFO` when I do `docker logs ` I receive an empty output

gravity (Wed, 28 Nov 2018 16:01:27 GMT):
Hi all how to read chaincode logs? I've set up logging in a chaincode like this `var logger = shim.NewLogger("example_cc")`, set log level ` logger.SetLevel(shim.LogInfo)` and log messages in `Init` and `Invoke` functions like this `logger.Info("init func: received apiKey=%v", apiKey)` also, peer config has this env variable: `CORE_CHAINCODE_LOGGING_LEVEL=INFO` when I do `docker logs ` I receive an empty output

theezenaku (Wed, 28 Nov 2018 22:48:23 GMT):
Has joined the channel.

ChanderGovindarajan (Thu, 29 Nov 2018 04:28:39 GMT):
Has joined the channel.

HoneyShah (Thu, 29 Nov 2018 05:54:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=g4Y5SqYXspnJg7BFL) @rthatcher Yes, we can do that but that wont be efficient way, as we are fetching all the data at one time just for the count. Is there any better way we can do that? Or this is the only way?

HoneyShah (Thu, 29 Nov 2018 05:54:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=g4Y5SqYXspnJg7BFL) @rthatcher Yes, we can do that but that won't be an efficient way, as we are fetching all the data at one time just for the count. Is there any better way we can do that? Or this is the only way? And is there a limitation on the number of records fetched by `getQueryResult()`?

Naveen4091 (Thu, 29 Nov 2018 06:06:40 GMT):
I installed and instantiated two chain codes on the same peer and channel, but I am not able to access chaincode1 variables in chaincode2 and vice versa. Is it possible to do like that? help me please

haggis (Thu, 29 Nov 2018 06:41:29 GMT):
@Naveen4091 I guess you need to expose respective getter/setter functions and, if you want to restrict access to the other chaincode, you would like to check the identity of the callee

ShefaliMittal (Thu, 29 Nov 2018 07:35:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=znLsoDWADwXRdhLpG) @dave.enyeart Thanks for your response. However I didn't find anything in data folder as I restarted the whole network. Also, problem occurs only when I create index, else everything works fine.

Msaleh97 (Thu, 29 Nov 2018 07:59:01 GMT):
Has joined the channel.

Msaleh97 (Thu, 29 Nov 2018 08:01:17 GMT):
Hi, I know that both the GetHistoryForKey and getQueryResult functions aren't supported by mockstub for unit testing. Do you guys have any recommendations on how I can get around it? I'm trying to hit 90% code coverage and those two functions are stopping from reaching my goal.

ttarey (Thu, 29 Nov 2018 09:00:13 GMT):
Hello, what should set for *peer chaincode instantiate -P* flag if I want a policy of "( A or B) and ( C or D)", I tried something like "AND ((OR('A','B')), (OR('A','B')))", but then encountered some invoke error.

ttarey (Thu, 29 Nov 2018 09:02:09 GMT):
Oop B) = B )

haggis (Thu, 29 Nov 2018 09:11:34 GMT):
Is it possible to access chaincode events from within the chaincode? And maybe even to filter it by payload?

Naveen4091 (Thu, 29 Nov 2018 10:29:32 GMT):
@haggis Thank you for the response. I suspect that you might have confused with my question. I am creating an asset in one chain code and trying to access that asset using another chain code. My objective is the user of first chain code is from one org and the chain code2 user is from different org. I am trying to test the buyer and seller analogy. The Seller will raise the invoice and buyer will approve. However the chain code2 is not able to access asset created by chain code1.

Naveen4091 (Thu, 29 Nov 2018 10:29:54 GMT):
@haggis The version I am using is 1.3

haggis (Thu, 29 Nov 2018 10:45:54 GMT):
@Naveen4091 That's intentional. To do this you would need to have a getter function at the CC which holds the data. There's no shared data between different chaincodes afaik

haggis (Thu, 29 Nov 2018 10:49:44 GMT):
I've got *two questions*: 1) Is it possible to access chaincode events from within the chaincode (and maybe even to filter it by payload)? 2) Should (node) chaincode always return a Buffer? If yes, why? Just asking because that's what is done in examples.

haggis (Thu, 29 Nov 2018 10:59:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DstKa6NthuukzJY79) to 2) Nope, it must not. At least getter functions are perfectly fine to return e.g. json

ShefaliMittal (Thu, 29 Nov 2018 11:18:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=hESSMf5bR7YmhaCex) I further found that when I do getStateByRange("",""), it fails. But if I do getStateByRange("marble1","marble3") it works

ShefaliMittal (Thu, 29 Nov 2018 11:19:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=z8yDB47nMtnuYWP7n) my keys are random and does not necessarily contain any number like marble1 or marble2. omitting startkey and endkey was working for me. How do I specify startkey and endkey now with index

haggis (Thu, 29 Nov 2018 13:12:54 GMT):
How can one do a `peer chaincode invoke ...` to get an endorsement of two endorsers? The chaincode requires endorsements of two orgs.

huikang (Thu, 29 Nov 2018 15:15:29 GMT):
Hi, I have a question about concurrent requests being sent to an endorser. If two requests (for indepenent data sets) are being sent to the same endorser, how does the endorser handle them? Will the endorser create two chaincode containers or execute them sequentially on one chaincode container? Thanks.

muralisr (Thu, 29 Nov 2018 15:39:17 GMT):
https://chat.hyperledger.org/channel/fabric-peer-endorser-committer?msg=qHBswuhYZoRCk8Zq8

muralisr (Thu, 29 Nov 2018 15:39:23 GMT):
^^ @huikang

huikang (Thu, 29 Nov 2018 15:50:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=yfqyvh4x7wSc6576H) @muralisr @muralisr thanks. If there are multiple requests, will the container spawn multiple threads to handle these concurrent requests?

Rajatsharma (Thu, 29 Nov 2018 15:51:43 GMT):
can anyone help me out, I'm getting this error Error: rpc error: code = Unavailable desc = transport is closing while creating a channel

Rajatsharma (Thu, 29 Nov 2018 15:51:45 GMT):
PLs help

Rajatsharma (Thu, 29 Nov 2018 16:07:37 GMT):
failed to create deliver client: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error:

Naveen4091 (Fri, 30 Nov 2018 09:51:43 GMT):
Error: error getting chaincode code invoice: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/common/util: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH) Please help me to resolve this issue

nhrishi (Fri, 30 Nov 2018 14:01:35 GMT):
Hi, I am working on a simple asset tokenization chaincode on v1.3. I am using first-network setup from fabric-samples where I have 2 orgs – Org1 and Org2. I have defined one collection per organization for 2 different users. User Alice belongs to Org1 and has collection with name “Alice”. User Bob belongs to Org2 and has collection with name “Bob”. I have configured a collection_json with respective organization accordingly. I have a very simple chaincode where it issues an asset/token with asset name, qty, owner. I can issue an asset for Alice and Bob and query them. For asset transfer between Alice and Bob, I am written a transfer Function. Let’s say Alice (Org1) is transferring her asset to Bob (Org2). In function, I retrieve a Alice asset using GetPrivateData and “Allice” collection and change owner to Bob and PutPrivateData using “Bob” collection. I also do DelPrivateData on “Alice” collection. The transaction proposal is invoked by Alice using Org1 peer0. In this case, transfer doesn’t work and Alice’s asset remains with Alice. I think the reason is because Org1 doesn’t have an access to Bob’s collection from Org2. Is this correct? If yes, what is the solution for such a usecase. Do we always need third-party Org3 which is part of both “Alice” and “Bob” collections and that invokes this transfer transaction from its own node? Can someone pls help me clarify this. Thanks. Regards, Hrishi

nhrishi (Fri, 30 Nov 2018 14:01:35 GMT):
Hi, I am working on a simple asset tokenization chaincode on v1.3. I am using first-network setup from fabric-samples where I have 2 orgs – Org1 and Org2. I have defined one collection per organization for 2 different users. User Alice belongs to Org1 and has collection with name “Alice”. User Bob belongs to Org2 and has collection with name “Bob”. I have configured a collection_json with respective organization accordingly. I have a very simple chaincode where it issues an asset/token with asset name, qty, owner. I can issue an asset for Alice and Bob and query them. For asset transfer between Alice and Bob, I have written a transfer Function. Let’s say Alice (Org1) is transferring her asset to Bob (Org2). In function, I retrieve a Alice asset using GetPrivateData and “Allice” collection and change owner to Bob and PutPrivateData using “Bob” collection. I also do DelPrivateData on “Alice” collection. The transaction proposal is invoked by Alice using Org1 peer0. In this case, transfer doesn’t work and Alice’s asset remains with Alice. I think the reason is because Org1 doesn’t have an access to Bob’s collection from Org2. Is this correct? If yes, what is the solution for such a usecase. Do we always need third-party Org3 which is part of both “Alice” and “Bob” collections and that invokes this transfer transaction from its own node? Can someone pls help me clarify this. Thanks. Regards, Hrishi

nhrishi (Fri, 30 Nov 2018 14:01:35 GMT):
Hi, I am working on a simple asset tokenization chaincode on v1.3. I am using first-network setup from fabric-samples where I have 2 orgs – Org1 and Org2. I have defined one collection per organization for 2 different users. User Alice belongs to Org1 and has collection with name “Alice”. User Bob belongs to Org2 and has collection with name “Bob”. I have configured a collection_json with respective organization accordingly. I have a very simple chaincode where it issues an asset/token with asset name, qty, owner. I can issue an asset for Alice and Bob and query them. For asset transfer between Alice and Bob, I have written a transfer Function. Let’s say Alice (Org1) is transferring her asset to Bob (Org2). In function, I retrieve a Alice asset using GetPrivateData and “Allice” collection and change owner to Bob and PutPrivateData using “Bob” collection. I also do DelPrivateData on “Alice” collection. The transaction proposal is invoked by Alice using Org1 peer0. In this case, transfer doesn’t work and Alice’s asset remains with Alice. I think the reason is because Org1 doesn’t have an access to Bob’s collection data from Org2 during an endorsement time. Is this correct? If yes, what is the solution for such a usecase. Do we always need third-party Org3 which is part of both “Alice” and “Bob” collections and that invokes this transfer transaction from its own node? Can someone pls help me clarify this. Thanks. Regards, Hrishi

nhrishi (Fri, 30 Nov 2018 14:01:35 GMT):
Hi, I am working on a simple asset tokenization chaincode on v1.3. I am using first-network setup from fabric-samples where I have 2 orgs – Org1 and Org2. I have defined one collection per organization for 2 different users. User Alice belongs to Org1 and has collection with name “Alice”. User Bob belongs to Org2 and has collection with name “Bob”. I have configured a collection_json with respective organization accordingly. I have a very simple chaincode where it issues an asset/token with asset name, qty, owner. I can issue an asset for Alice and Bob and query them. For asset transfer between Alice and Bob, I have written a transfer Function. Let’s say Alice (Org1) is transferring her asset to Bob (Org2). In function, I retrieve Alice's asset using GetPrivateData and “Allice” collection and change owner to Bob and PutPrivateData using “Bob” collection. I also do DelPrivateData on “Alice” collection. The transaction proposal is invoked by Alice using Org1 peer0. In this case, transfer doesn’t work and Alice’s asset remains with Alice. I think the reason is because Org1 doesn’t have an access to Bob’s collection data from Org2 during an endorsement time. Is this correct? If yes, what is the solution for such a usecase. Do we always need third-party Org3 which is part of both “Alice” and “Bob” collections and that invokes this transfer transaction from its own node? Can someone pls help me clarify this. Thanks. Regards, Hrishi

dave.enyeart (Fri, 30 Nov 2018 17:12:34 GMT):
@nhrishi Org1 peer can indeed write to a Org2 collection, to support these types of scenarios. Some people don't want this ability and therefore there is plan to add a collection config option to control this behavior, but in current releases it is supported out of the box. What is the error that you get?

dave.enyeart (Fri, 30 Nov 2018 17:14:29 GMT):
Note that you will Org1 peer will send the private data to Org2 peer via gossip at endorsement time, based on collection config settings, so it is critical that gossip is configured correctly (which should be the case in first-network)

nhrishi (Sat, 01 Dec 2018 02:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Gi73nraQxqhmFjnfz) @dave.enyeart okay. I don't see any error. the transfer transaction is successful but ownership is not transferred. here is a function code -- ```func (t *AssetChaincode) transferAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response { var collection, owner, assetName, newOwner, asset_key string if len(args) < 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } fmt.Println("- func transferAsset ") assetName = args[0] owner = args[1] newOwner = args[2] fmt.Println("- start transferAsset ", assetName, owner, newOwner) collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) assetAsBytes, err := stub.GetPrivateData(collection, asset_key) if err != nil { return shim.Error("Failed to get asset:" + err.Error()) } else if assetAsBytes == nil { return shim.Error("asset does not exist") } fmt.Println("- existing Asset ", string(assetAsBytes)) assetToTransfer := asset{} err = json.Unmarshal(assetAsBytes, &assetToTransfer) //unmarshal it aka JSON.parse() if err != nil { return shim.Error(err.Error()) } collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) err = stub.DelPrivateData(collection, asset_key) //Delete the asset if err != nil { return shim.Error(err.Error()) } assetToTransfer.Owner = newOwner //change the owner collection = newOwner asset_key = assetName + newOwner assetJSONasBytes, _ := json.Marshal(assetToTransfer) fmt.Println("- new Asset key and data ", asset_key, string(assetJSONasBytes)) err = stub.PutPrivateData(collection, asset_key, assetJSONasBytes) //write the asset if err != nil { return shim.Error(err.Error()) } fmt.Println("- end transferAsset (success)") return shim.Success(nil) } ```

nhrishi (Sat, 01 Dec 2018 02:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Gi73nraQxqhmFjnfz) @dave.enyeart okay. I don't see any error. The transfer transaction is successful but ownership is not transferred. I still see original asset belongs to Alice and Bob query is blank. Here is a function code. Do you see any issue with this -- ```func (t *AssetChaincode) transferAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response { var collection, owner, assetName, newOwner, asset_key string if len(args) < 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } fmt.Println("- func transferAsset ") assetName = args[0] owner = args[1] newOwner = args[2] fmt.Println("- start transferAsset ", assetName, owner, newOwner) collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) assetAsBytes, err := stub.GetPrivateData(collection, asset_key) if err != nil { return shim.Error("Failed to get asset:" + err.Error()) } else if assetAsBytes == nil { return shim.Error("asset does not exist") } fmt.Println("- existing Asset ", string(assetAsBytes)) assetToTransfer := asset{} err = json.Unmarshal(assetAsBytes, &assetToTransfer) //unmarshal it aka JSON.parse() if err != nil { return shim.Error(err.Error()) } collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) err = stub.DelPrivateData(collection, asset_key) //Delete the asset if err != nil { return shim.Error(err.Error()) } assetToTransfer.Owner = newOwner //change the owner collection = newOwner asset_key = assetName + newOwner assetJSONasBytes, _ := json.Marshal(assetToTransfer) fmt.Println("- new Asset key and data ", asset_key, string(assetJSONasBytes)) err = stub.PutPrivateData(collection, asset_key, assetJSONasBytes) //write the asset if err != nil { return shim.Error(err.Error()) } fmt.Println("- end transferAsset (success)") return shim.Success(nil) } ```

nhrishi (Sat, 01 Dec 2018 02:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Gi73nraQxqhmFjnfz) @dave.enyeart okay. I don't see any error. The transfer transaction output shows successful but ownership is not transferred and error says ```{"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [vscc] Validate -\u003e ERRO 068\u001b[0m VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612580357Z"} {"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [committer/txvalidator] validateTx -\u003e ERRO 069\u001b[0m VSCCValidateTx for transaction txId = 063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53 returned error: validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612686095Z"} {"log":"\u001b[34m2018-12-01 03:44:16.612 UTC [committer/txvalidator] Validate -\u003e INFO 06a\u001b[0m [pchannel] Validated block [6] in 17ms\n","stream":"stderr","time":"2018-12-01T03:44:16.612833605Z"} {"log":"\u001b[33m2018-12-01 03:44:16.613 UTC [valimpl] preprocessProtoBlock -\u003e WARN 06b\u001b[0m Channel [pchannel]: Block [6] Transaction index [0] TxId [063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]\n","stream":"stderr","time":"2018-12-01T03:44:16.61316474Z"} ``` .I still see original asset belongs to Alice and Bob query is blank. Here is a function code. Do you see any issue with this -- ```func (t *AssetChaincode) transferAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response { var collection, owner, assetName, newOwner, asset_key string if len(args) < 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } fmt.Println("- func transferAsset ") assetName = args[0] owner = args[1] newOwner = args[2] fmt.Println("- start transferAsset ", assetName, owner, newOwner) collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) assetAsBytes, err := stub.GetPrivateData(collection, asset_key) if err != nil { return shim.Error("Failed to get asset:" + err.Error()) } else if assetAsBytes == nil { return shim.Error("asset does not exist") } fmt.Println("- existing Asset ", string(assetAsBytes)) assetToTransfer := asset{} err = json.Unmarshal(assetAsBytes, &assetToTransfer) //unmarshal it aka JSON.parse() if err != nil { return shim.Error(err.Error()) } collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) err = stub.DelPrivateData(collection, asset_key) //Delete the asset if err != nil { return shim.Error(err.Error()) } assetToTransfer.Owner = newOwner //change the owner collection = newOwner asset_key = assetName + newOwner assetJSONasBytes, _ := json.Marshal(assetToTransfer) fmt.Println("- new Asset key and data ", asset_key, string(assetJSONasBytes)) err = stub.PutPrivateData(collection, asset_key, assetJSONasBytes) //write the asset if err != nil { return shim.Error(err.Error()) } fmt.Println("- end transferAsset (success)") return shim.Success(nil) } ```

nhrishi (Sat, 01 Dec 2018 02:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Gi73nraQxqhmFjnfz) @dave.enyeart okay. The transfer invoke transaction output shows successful but ownership is not transferred and peer log error says ```{"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [vscc] Validate -\u003e ERRO 068\u001b[0m VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612580357Z"} {"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [committer/txvalidator] validateTx -\u003e ERRO 069\u001b[0m VSCCValidateTx for transaction txId = 063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53 returned error: validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612686095Z"} {"log":"\u001b[34m2018-12-01 03:44:16.612 UTC [committer/txvalidator] Validate -\u003e INFO 06a\u001b[0m [pchannel] Validated block [6] in 17ms\n","stream":"stderr","time":"2018-12-01T03:44:16.612833605Z"} {"log":"\u001b[33m2018-12-01 03:44:16.613 UTC [valimpl] preprocessProtoBlock -\u003e WARN 06b\u001b[0m Channel [pchannel]: Block [6] Transaction index [0] TxId [063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]\n","stream":"stderr","time":"2018-12-01T03:44:16.61316474Z"} ``` .I still see original asset belongs to Alice and Bob query is blank. Here is a function code. Do you see any issue with this -- ```func (t *AssetChaincode) transferAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response { var collection, owner, assetName, newOwner, asset_key string if len(args) < 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } fmt.Println("- func transferAsset ") assetName = args[0] owner = args[1] newOwner = args[2] fmt.Println("- start transferAsset ", assetName, owner, newOwner) collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) assetAsBytes, err := stub.GetPrivateData(collection, asset_key) if err != nil { return shim.Error("Failed to get asset:" + err.Error()) } else if assetAsBytes == nil { return shim.Error("asset does not exist") } fmt.Println("- existing Asset ", string(assetAsBytes)) assetToTransfer := asset{} err = json.Unmarshal(assetAsBytes, &assetToTransfer) //unmarshal it aka JSON.parse() if err != nil { return shim.Error(err.Error()) } collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) err = stub.DelPrivateData(collection, asset_key) //Delete the asset if err != nil { return shim.Error(err.Error()) } assetToTransfer.Owner = newOwner //change the owner collection = newOwner asset_key = assetName + newOwner assetJSONasBytes, _ := json.Marshal(assetToTransfer) fmt.Println("- new Asset key and data ", asset_key, string(assetJSONasBytes)) err = stub.PutPrivateData(collection, asset_key, assetJSONasBytes) //write the asset if err != nil { return shim.Error(err.Error()) } fmt.Println("- end transferAsset (success)") return shim.Success(nil) } ```

nhrishi (Sat, 01 Dec 2018 02:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Gi73nraQxqhmFjnfz) @dave.enyeart okay. The transfer invoke transaction output shows successful but ownership is not transferred and peer log error says ```{"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [vscc] Validate -\u003e ERRO 068\u001b[0m VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612580357Z"} {"log":"\u001b[31m2018-12-01 03:44:16.612 UTC [committer/txvalidator] validateTx -\u003e ERRO 069\u001b[0m VSCCValidateTx for transaction txId = 063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53 returned error: validation of endorsement policy for chaincode tassetcc in tx 6:0 failed: signature set did not satisfy policy\n","stream":"stderr","time":"2018-12-01T03:44:16.612686095Z"} {"log":"\u001b[34m2018-12-01 03:44:16.612 UTC [committer/txvalidator] Validate -\u003e INFO 06a\u001b[0m [pchannel] Validated block [6] in 17ms\n","stream":"stderr","time":"2018-12-01T03:44:16.612833605Z"} {"log":"\u001b[33m2018-12-01 03:44:16.613 UTC [valimpl] preprocessProtoBlock -\u003e WARN 06b\u001b[0m Channel [pchannel]: Block [6] Transaction index [0] TxId [063db33f2b208a28c706242e0f668fc70674027d2a2615534a93495090857d53] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]\n","stream":"stderr","time":"2018-12-01T03:44:16.61316474Z"} ``` Code ```func (t *AssetChaincode) transferAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response { var collection, owner, assetName, newOwner, asset_key string if len(args) < 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } fmt.Println("- func transferAsset ") assetName = args[0] owner = args[1] newOwner = args[2] fmt.Println("- start transferAsset ", assetName, owner, newOwner) collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) assetAsBytes, err := stub.GetPrivateData(collection, asset_key) if err != nil { return shim.Error("Failed to get asset:" + err.Error()) } else if assetAsBytes == nil { return shim.Error("asset does not exist") } fmt.Println("- existing Asset ", string(assetAsBytes)) assetToTransfer := asset{} err = json.Unmarshal(assetAsBytes, &assetToTransfer) //unmarshal it aka JSON.parse() if err != nil { return shim.Error(err.Error()) } collection = owner asset_key = assetName + owner fmt.Println("- AssetKey :", asset_key) err = stub.DelPrivateData(collection, asset_key) //Delete the asset if err != nil { return shim.Error(err.Error()) } assetToTransfer.Owner = newOwner //change the owner collection = newOwner asset_key = assetName + newOwner assetJSONasBytes, _ := json.Marshal(assetToTransfer) fmt.Println("- new Asset key and data ", asset_key, string(assetJSONasBytes)) err = stub.PutPrivateData(collection, asset_key, assetJSONasBytes) //write the asset if err != nil { return shim.Error(err.Error()) } fmt.Println("- end transferAsset (success)") return shim.Success(nil) } ```

adave (Sat, 01 Dec 2018 12:53:56 GMT):
Has joined the channel.

ks2117 (Sat, 01 Dec 2018 18:22:05 GMT):
Has joined the channel.

cppchedy (Sun, 02 Dec 2018 00:18:06 GMT):
Has joined the channel.

martin-halford (Mon, 03 Dec 2018 03:25:25 GMT):
Has joined the channel.

nhrishi (Mon, 03 Dec 2018 03:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=k55HnZyErgxGz6XNX) I tried with passing 2 endorsing peers (one for org1 and other for org2) and it worked. For private data, do we need to pass all the org's peer that are involved in the private data transaction. With public transaction, I always used to only pass one peer of submitter organization. Could you please confirm this. Thanks.

nhrishi (Mon, 03 Dec 2018 03:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=k55HnZyErgxGz6XNX) @dave.enyeart I tried with passing 2 endorsing peers (one for org1 and other for org2) and it worked. For private data, do we need to pass all the org's peer that are involved in the private data transaction. With public transaction, I always used to only pass one peer of submitter organization. Could you please confirm this. Thanks.

dave.enyeart (Mon, 03 Dec 2018 03:34:27 GMT):
@nhrishi You just need to satisfy the endorsement policy that is set at chaincode instantiation time. If the endorsement policy is one org, then you need to submit to one org. If the endorsement policy is for two orgs, then you need to submit to two orgs. The peers will automatically distribute the private data to the other orgs peers that are members of the private data collection.

nhrishi (Mon, 03 Dec 2018 04:36:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uePYaw64XoSAzi9qz) @dave.enyeart Okay got it. Last question - so policy is in the collection is only for distribution. Policy passed using -p on chaincode instantiate command is taken as a endorsement policy. When we implement key level endorsement policy inside the chaincode, it would override the chaincode instantiate command level endorsement policy. Is this understanding correct? And in key level endorsement case, we need to make sure to pass all required peers in the invoke transaction depending on all policies set in the chaincode ?

dave.enyeart (Mon, 03 Dec 2018 04:46:54 GMT):
@nhrishi That's all correct

nhrishi (Mon, 03 Dec 2018 04:52:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CSqkvcTh2tJFy2Wca) @dave.enyeart Perfect. Thanks very much!!

HarshiChandraSekar (Mon, 03 Dec 2018 06:16:15 GMT):
Hi, Is there any way to generate loanID sequeance from 1 to 9999 in golang fabric shim . Im using couchDB as stateDB.

dave.enyeart (Mon, 03 Dec 2018 06:21:43 GMT):
@HarshiChandraSekar No, different endorsing peers will be adding to ledger in parallel, you don't want collisions by having them read from a sequence. You're better off using an id from a source system or using a UUID.

Aschi (Mon, 03 Dec 2018 10:09:33 GMT):
Has joined the channel.

KartikChauhan (Mon, 03 Dec 2018 13:22:26 GMT):
I found these lines in configtx.yaml of basic-network. What does batch and message mean here? Do they mean block and transaction? # Batch Timeout: The amount of time to wait before creating a batch BatchTimeout: 2s # Batch Size: Controls the number of messages batched into a block BatchSize: # Max Message Count: The maximum number of messages to permit in a batch MaxMessageCount: 10 # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed for # the serialized messages in a batch. A message larger than the preferred # max bytes will result in a batch larger than preferred max bytes. PreferredMaxBytes: 512 KB

jbisson (Mon, 03 Dec 2018 21:54:19 GMT):
Has joined the channel.

rootDistress (Tue, 04 Dec 2018 09:25:51 GMT):
Has joined the channel.

ShefaliMittal (Tue, 04 Dec 2018 10:53:02 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

AndresMartinezMelgar.itcl (Tue, 04 Dec 2018 10:55:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2ZXHbCdG3kQt4v5ce) @ShefaliMittal maybe you must control it with events from your sdk.

ShefaliMittal (Tue, 04 Dec 2018 11:05:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=K6W8z6jgqELv7iy2m) @AndresMartinezMelgar.itcl do u have any example for it

AndresMartinezMelgar.itcl (Tue, 04 Dec 2018 11:11:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LaznvukPfW4eAJ6iL) @ShefaliMittal i supose it, i dont try it yet

albert.lacambra (Tue, 04 Dec 2018 11:37:06 GMT):
is devmode disabled on fabric 1.3?

haggis (Tue, 04 Dec 2018 13:07:34 GMT):
@ShefaliMittal sounds like that hasn't anything to do with hlf. That's the job of your client application.

jrosmith (Tue, 04 Dec 2018 14:02:32 GMT):
@ShefaliMittal - @haggis and @AndresMartinezMelgar.itcl are correct, there is no mechanism to 'schedule' a transaction from within the chaincode, nor should that logic live there. an external application should be notified of the commitment of the first transaction and then schedule the next transaction for timestamp + 5 hrs.

jrosmith (Tue, 04 Dec 2018 14:03:16 GMT):
@KartikChauhan yes that is correct

akshay.lawange (Tue, 04 Dec 2018 14:32:26 GMT):
Hi, We are using first-network (two-org) configuration for 1.3 version. Its the same sample configuration, but the only difference is we have installed 2 chaincodes on the same channel, among which one invokes the another. We are using private data for invocation, so we have provided with same collection names to both the chaincodes. While starting the network log shows as it instantiated the chaincodes but when we invoke through cli it gives an error for each peer's instantiation as below on cli log. ``Error: error getting endorser client for invoke: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded`` Also in peer container log, it shows "ENDORSEMENT_POLICY_FAILURE" although policies are correct. Can anyone please help with this? Thanks.

akshay.lawange (Tue, 04 Dec 2018 14:38:14 GMT):
Hi We are using first-network (two-org) configuration for 1.3 version. Its the same sample configuration, but the only difference is we have installed2 chaincodes on the same channel, among which one invokes the another. We are using private data for invocation, so we have provided with same collection names to both the chaincodes. While starting the network, cli log shows as it instantiated the chaincodes but when we invoke through cli, it gives an error as below on cli log - `` Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode SamplePrivateCC has been successfully instantiated and try again: chaincode SamplePrivateCC not found" `` Although the Endorsement policies are correct in instantiation command and collections. Can anyone please help with this?

ambersz (Tue, 04 Dec 2018 21:50:22 GMT):
Has joined the channel.

arjitkhullar (Wed, 05 Dec 2018 00:01:07 GMT):
Has joined the channel.

Pradeep_Pentakota (Wed, 05 Dec 2018 01:39:01 GMT):
Has joined the channel.

PyiTheinKyaw (Wed, 05 Dec 2018 03:53:44 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

ShefaliMittal (Wed, 05 Dec 2018 05:26:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=N5SBnJ34osh6nfqMR) @jrosmith thanks all for your inputs.

dave.enyeart (Wed, 05 Dec 2018 06:25:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GcWnKsvC6TKQ3ApMS) @akshay.lawange It means the chaincode you thought you instantiated did not get instantiated. Check the peer logs to see if the instantiation transaction got validated and committed

HarshiChandraSekar (Wed, 05 Dec 2018 06:39:47 GMT):
@akshay.lawange check whether the chaincode has instantiated or upgraded to your new version . To list the chaincode use peer chaincode list --instantiated -C channelName.

VarunVerma (Wed, 05 Dec 2018 06:43:20 GMT):
Has joined the channel.

VarunVerma (Wed, 05 Dec 2018 06:43:23 GMT):
type marble struct { Name string `json:"name"` Color string `json:"color"` Size int `json:"size"` Owner string `json:"owner"` } type marbleStore struct { ObjectType string `json:"docType"` Storename string `json:"storename"` Ownername string `json:"ownername"` Owner owner `json:"owner"` Employees int `json:"employees"` Marbles []marble `json:"marbles"` } Can any one please help me with this? If i want to Query storename on basis of Color so what should be my query and indexing.

HarshiChandraSekar (Wed, 05 Dec 2018 06:49:58 GMT):
@VarunVerma use peer chaincode query -C chanelName -n chaincodeName -c '{"Args":["methodName","{\"selector\":{\"Color\":\"red\"}}"]}

Rajatsharma (Wed, 05 Dec 2018 07:13:17 GMT):
I was trying to make GRPC request to another docker container from a self-made System Chaincode but I'm receiving this error: panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace. goroutine 1 [running]: golang.org/x/net/trace.init.0() /opt/gopath/src/golang.org/x/net/trace/trace.go:117 +0x151 plugin.open(0xc4204ae0a0, 0xe, 0xc4200da0d0, 0x0, 0x0) /opt/go/src/plugin/plugin_dlopen.go:113 +0xb21 plugin.Open(0xc4204ae0a0, 0x11, 0x166b2e0, 0xc4200da0d0, 0x0) /opt/go/src/plugin/plugin.go:32 +0x35 github.com/hyperledger/fabric/core/scc.loadPlugin(0xc4204ae0a0, 0x11, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:70 +0x175 github.com/hyperledger/fabric/core/scc.loadSysCCsWithConfig(0xc42031e170, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:51 +0x123 github.com/hyperledger/fabric/core/scc.loadSysCCs.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:44 +0x97 sync.(*Once).Do(0x1f0d100, 0x15c8418) /opt/go/src/sync/once.go:44 +0xbe github.com/hyperledger/fabric/core/scc.loadSysCCs(0xc42030c370, 0x0, 0xc420053c00, 0x14aef40) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:38 +0x39 github.com/hyperledger/fabric/core/scc.CreatePluginSysCCs(0xc42030c370, 0xc4201990a0, 0x166ae60, 0xc42030c370) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/register_pluginsenabled.go:15 +0x40 github.com/hyperledger/fabric/peer/node.registerChaincodeSupport(0xc4201b2150, 0xc420287520, 0x1b, 0x1661b20, 0xc4200f20d0, 0xc4204c0f90, 0x164fda0, 0xc42039b9c0, 0xc42024ea00, 0xc4204bbd50, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:593 +0x752 github.com/hyperledger/fabric/peer/node.startChaincodeServer(0xc420036102, 0x16, 0x164fda0, 0xc42039b9c0, 0xc42024ea00, 0xc4204bbd40, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:628 +0x34b github.com/hyperledger/fabric/peer/node.serve(0x1f0d028, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:230 +0x9f0 github.com/hyperledger/fabric/peer/node.glob..func1(0x1e04c40, 0x1f0d028, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:112 +0x9c github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x1e04c40, 0x1f0d028, 0x0, 0x0, 0x1e04c40, 0x1f0d028) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1e052a0, 0x0, 0x1e045e0, 0x1e053e0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1e052a0, 0xc4203c5f30, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:52 +0x2e5 Please help me out with this?

Rajatsharma (Wed, 05 Dec 2018 07:14:43 GMT):
``` ```

Rajatsharma (Wed, 05 Dec 2018 07:15:00 GMT):
``` hello ```

vikpande (Wed, 05 Dec 2018 07:59:42 GMT):
Has joined the channel.

haggis (Wed, 05 Dec 2018 09:32:55 GMT):
Can Clients filter chaincode events by attribute like we can do it with Solidity indexes?

MuhammedHafil (Wed, 05 Dec 2018 11:41:14 GMT):
How can i get user role? is it possible to get user role by `cid.GetAttributeValue` ?

MuhammedHafil (Wed, 05 Dec 2018 11:41:14 GMT):
How can i get user role? is it possible to get user role by `cid.GetAttributeValue` ? Something like this? ``` val, ok, err := cid.GetAttributeValue(stub, "hf.Registrar.Roles") ```

pujabhattad (Wed, 05 Dec 2018 12:04:58 GMT):
Has joined the channel.

pujabhattad (Wed, 05 Dec 2018 12:07:04 GMT):
While specifying endorsement policy, MSPID.Member/MSPID.Admin , how peer decides to endorse the transaction as Member or Admin? Can there be a case where a peer ( Peer0 part of Org1) is not an admin, but endorsement policy requires it (Org1.Admin).

mahoney1 (Wed, 05 Dec 2018 12:20:46 GMT):
@VarunVerma there are at least 2 examples on Stack Overflow -> [one](https://stackoverflow.com/questions/35784178/how-to-index-multidimensional-arrays-in-couchdb) and [two - ie answer 2 near the bottom](https://stackoverflow.com/questions/33262573/cloudant-selector-query/33835521)

mahoney1 (Wed, 05 Dec 2018 12:20:46 GMT):
@VarunVerma on "If i want to Query storename on basis of Color so what should be my query and indexing." there are at least 2 examples on Stack Overflow -> [one](https://stackoverflow.com/questions/35784178/how-to-index-multidimensional-arrays-in-couchdb) and [two - ie answer 2 near the bottom](https://stackoverflow.com/questions/33262573/cloudant-selector-query/33835521)

dave.enyeart (Wed, 05 Dec 2018 12:57:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fqdNbeaQ4EQWFqyTx) @haggis Yes clients can parse the transaction in the events and do any filtering they like. Ask any follow-up questions in the #fabric-sdk-* channel depending on which sdk you use.

dave.enyeart (Wed, 05 Dec 2018 13:00:33 GMT):
@skarim @adc Could you look at the questions from @MuhammedHafil and @pujabhattad . Is there good doc to point to for these or is a doc enhancement needed?

dave.enyeart (Wed, 05 Dec 2018 13:00:33 GMT):
@skarim @adc Could you look at the questions from @MuhammedHafil and @pujabhattad . Is there good doc to point to for these or is a doc enhancement needed? It seems people don't understand the use cases around roles and attributes in general.

adc (Wed, 05 Dec 2018 13:00:34 GMT):
Has joined the channel.

skarim (Wed, 05 Dec 2018 13:00:34 GMT):
Has joined the channel.

pujabhattad (Wed, 05 Dec 2018 13:11:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=A4KYvnTeregFaLBfX) @dave.enyeart Is there any good example demonstrating negative scenario for endorsement policies in detail with all the properties/attributes which can be set in configtx.yaml(channel configuration)

MuhammedHafil (Wed, 05 Dec 2018 13:18:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jAPCZ5KXEHjKaysuA) if i call `cert, err := cid.GetX509Certificate(stub)` the `cert.Subject.OrganizationalUnit` array have have 3 values. first one is role second one mspid third department `cert.Subject.OrganizationalUnit[0]` always will be role, right? is my assumption is correct? @skarim @adc

MuhammedHafil (Wed, 05 Dec 2018 13:18:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jAPCZ5KXEHjKaysuA) if i call `cert, err := cid.GetX509Certificate(stub)` the `cert.Subject.OrganizationalUnit` array have have 3 values. first one is role second one mspid third department `cert.Subject.OrganizationalUnit[0]` always will be role, right? is my assumption is correct? @skarim @adc Thanks

MuhammedHafil (Wed, 05 Dec 2018 13:18:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jAPCZ5KXEHjKaysuA) if i call `cert, err := cid.GetX509Certificate(stub)` the `cert.Subject.OrganizationalUnit` array gives 3 values. first one is role second one mspid third department `cert.Subject.OrganizationalUnit[0]` always will be role, right? is my assumption is correct? @skarim @adc Thanks

skarim (Wed, 05 Dec 2018 14:23:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jAPCZ5KXEHjKaysuA) @MuhammedHafil You would need to use 'hf.Type' to get the role of the chaincode invoker.

skarim (Wed, 05 Dec 2018 14:23:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=A4KYvnTeregFaLBfX) @dave.enyeart I do think that we need to enhance the doc to cover this better

akshay.lawange (Wed, 05 Dec 2018 15:18:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HW4Ra7i46FrPMjWyH) @dave.enyeart In peer log of peer0.org2.example.com, it showed an error with `2018-12-05 07:11:31.051 UTC [gossip/service] updateEndpoints -> WARN 035 Failed to update ordering service endpoints, due to Channel with mychannel id was not found` which was confusing even though the channel is created. When we tried invoke in cli and once it was successful, still we got another error `Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:

akshay.lawange (Wed, 05 Dec 2018 15:18:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HW4Ra7i46FrPMjWyH) @dave.enyeart In peer log of peer0.org2.example.com, it showed an error with `2018-12-05 07:11:31.051 UTC [gossip/service] updateEndpoints -> WARN 035 Failed to update ordering service endpoints, due to Channel with mychannel id was not found` which was confusing even though the channel is created. When we tried invoke in cli and once it was successful, still we got another error `Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:

akshay.lawange (Wed, 05 Dec 2018 15:18:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HW4Ra7i46FrPMjWyH) @dave.enyeart @HarshiChandraSekar In peer log of peer0.org2.example.com, it showed an error with `2018-12-05 07:11:31.051 UTC [gossip/service] updateEndpoints -> WARN 035 Failed to update ordering service endpoints, due to Channel with mychannel id was not found` which was confusing even though the channel is created. When we tried invoke in cli and once it was successful, still we got another error `Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:

akshay.lawange (Wed, 05 Dec 2018 15:18:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HW4Ra7i46FrPMjWyH) @dave.enyeart @HarshiChandraSekar In peer log of peer0.org2.example.com, it showed an error with `2018-12-05 07:11:31.051 UTC [gossip/service] updateEndpoints -> WARN 035 Failed to update ordering service endpoints, due to Channel with mychannel id was not found` which was confusing even though the channel is created. When we tried invoke in cli and once it was successful, still we got another error `Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:

mallikarjunasai995 (Wed, 05 Dec 2018 15:31:29 GMT):
Has joined the channel.

mallikarjunasai995 (Wed, 05 Dec 2018 15:35:02 GMT):
Suppose there are two peers I want one one peer to setup the some rules then the second peer has to initialize the data , but while initializing it has to check and satisfy the rules created by another peer …. Where should I write this thing?

mallikarjunasai995 (Wed, 05 Dec 2018 15:35:16 GMT):
can anyone help me out with the above query

Rajatsharma (Wed, 05 Dec 2018 20:37:11 GMT):
I was trying to make GRPC request to another docker container from a self-made System Chaincode but I'm receiving this error: ``` panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace. goroutine 1 [running]: golang.org/x/net/trace.init.0() /opt/gopath/src/golang.org/x/net/trace/trace.go:117 +0x151 plugin.open(0xc4204ae0a0, 0xe, 0xc4200da0d0, 0x0, 0x0) /opt/go/src/plugin/plugin_dlopen.go:113 +0xb21 plugin.Open(0xc4204ae0a0, 0x11, 0x166b2e0, 0xc4200da0d0, 0x0) /opt/go/src/plugin/plugin.go:32 +0x35 github.com/hyperledger/fabric/core/scc.loadPlugin(0xc4204ae0a0, 0x11, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:70 +0x175 github.com/hyperledger/fabric/core/scc.loadSysCCsWithConfig(0xc42031e170, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:51 +0x123 github.com/hyperledger/fabric/core/scc.loadSysCCs.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:44 +0x97 sync.(*Once).Do(0x1f0d100, 0x15c8418) /opt/go/src/sync/once.go:44 +0xbe github.com/hyperledger/fabric/core/scc.loadSysCCs(0xc42030c370, 0x0, 0xc420053c00, 0x14aef40) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:38 +0x39 github.com/hyperledger/fabric/core/scc.CreatePluginSysCCs(0xc42030c370, 0xc4201990a0, 0x166ae60, 0xc42030c370) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/register_pluginsenabled.go:15 +0x40 github.com/hyperledger/fabric/peer/node.registerChaincodeSupport(0xc4201b2150, 0xc420287520, 0x1b, 0x1661b20, 0xc4200f20d0, 0xc4204c0f90, 0x164fda0, 0xc42039b9c0, 0xc42024ea00, 0xc4204bbd50, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:593 +0x752 github.com/hyperledger/fabric/peer/node.startChaincodeServer(0xc420036102, 0x16, 0x164fda0, 0xc42039b9c0, 0xc42024ea00, 0xc4204bbd40, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:628 +0x34b github.com/hyperledger/fabric/peer/node.serve(0x1f0d028, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:230 +0x9f0 github.com/hyperledger/fabric/peer/node.glob..func1(0x1e04c40, 0x1f0d028, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:112 +0x9c github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x1e04c40, 0x1f0d028, 0x0, 0x0, 0x1e04c40, 0x1f0d028) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1e052a0, 0x0, 0x1e045e0, 0x1e053e0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1e052a0, 0xc4203c5f30, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:52 +0x2e5 ``` Could you help me out with this?

Rajatsharma (Wed, 05 Dec 2018 20:37:22 GMT):
This is my System chaincode: ``` package main import ( "github.com/hyperledger/fabric/core/chaincode/shim" "context" "fmt" "log" "database/databasepb" "google.golang.org/grpc" pb "github.com/hyperledger/fabric/protos/peer" ) // New returns an implementation of the chaincode interface func New() shim.Chaincode { return &scc{} } type scc struct{} // Init implements the chaincode shim interface func (s *scc) Init(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Hello I'm a client") return shim.Success(nil) } // Invoke implements the chaincode shim interface func (s *scc) Invoke(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Hello I'm a client") cc, err := grpc.Dial("localhost:50051", grpc.WithInsecure()) if err != nil { log.Fatalf("could not connect: %v", err) } defer cc.Close() c := databasepb.NewDatabaseServiceClient(cc) // fmt.Printf("Created client: %f", c) //doUnary(c) fmt.Println("Starting to do a Unary RPC...") req := &databasepb.DatabaseRequest{ Database: &databasepb.Database{ Name: "Rajat", token: "qde@!5806825275", }, } res, err := c.Database(context.Background(), req) if err != nil { log.Fatalf("error while calling RPC: %v", err) log.Printf("Response from RPC: %v", res.Result) return shim.Success(nil) } func main() {} ```

hyperlearner (Thu, 06 Dec 2018 04:22:57 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 ?

MuhammedHafil (Thu, 06 Dec 2018 05:38:23 GMT):
what is the best way to make identifier(ID) related to a document or simply just pass ID from client side?

mallikarjunasai995 (Thu, 06 Dec 2018 05:47:00 GMT):
where are assets stored in blockchain network ?

mallikarjunasai995 (Thu, 06 Dec 2018 05:47:11 GMT):
is it only transaction data that is storing if so then wat about assets

VarunVerma (Thu, 06 Dec 2018 05:58:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=xwNC6oED4GbFN9onH) @mahoney1 yes i'm able to query but again if you see in the array part how i can specific field from array

SanjeevKumarn (Thu, 06 Dec 2018 06:07:14 GMT):
Has joined the channel.

halilkalkan (Thu, 06 Dec 2018 08:16:44 GMT):
Hello guys, do you know how to implement key-level endorsement policy. I couldn't find any samples using SetPrivateDataValidationParameter(collection, key string, ep []byte) function.

romanychda (Thu, 06 Dec 2018 10:03:38 GMT):
Has joined the channel.

vnea (Thu, 06 Dec 2018 10:04:24 GMT):
Has joined the channel.

rthatcher (Thu, 06 Dec 2018 10:05:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wnwd8Y9wiMT8TKBNu) @mallikarjunasai995 This document should help you understand the Ledger and the data storage: https://hyperledger-fabric.readthedocs.io/en/latest/ledger/ledger.html?highlight=world%20state

mallikarjunasai995 (Thu, 06 Dec 2018 10:07:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Mv8igHuBiGmr5nYnJ) @rthatcher thanks rthatcher got it but can you please help me on this : Suppose there are two peers I want one one peer to setup the some rules then the second peer has to initialize the data , but while initializing it has to check and satisfy the rules created by another peer …. Where should I write this thing?

rthatcher (Thu, 06 Dec 2018 10:34:28 GMT):
@mallikarjunasai995 - I'm sorry, I don't understand the scenario you are asking about - perhaps you could post a Stack Overflow question with all the detail of what you are trying to achieve.

mallikarjunasai995 (Thu, 06 Dec 2018 10:38:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cwXeuBZoWMMKEZhLM) @rthatcher okay thanks :relaxed:

RodneySa (Thu, 06 Dec 2018 12:48:29 GMT):
Has joined the channel.

romanychda (Thu, 06 Dec 2018 13:15:46 GMT):
Hello! Can someone give advice with testing chaincodes? I have a main "chaincode_A". It calls the other 5 chaincodes. I'm trying to write "chaincode_A_test", which mocks all 6 chaincodes, and executes some scripts with them. Actually the problem is that all 6 chaincodes are in different "main package", but I need to import them all into "chaincode_A_test". How best to solve this problem? Can I just rename all the "main package"? Are there any best practices? Or maybe someone has a repository with a similar solution?

romanychda (Thu, 06 Dec 2018 13:15:46 GMT):
Hello! Can someone give advice with testing chaincodes? I have a main "chaincode_A". It invokes the other 5 chaincodes. I'm trying to write "chaincode_A_test", which mocks all 6 chaincodes, and executes some scripts with them. Actually the problem is that all 6 chaincodes are in different "main package", but I need to import them all into "chaincode_A_test". How best to solve this problem? Can I just rename all the "main package"? Are there any best practices? Or maybe someone has a repository with a similar solution?

jrosmith (Thu, 06 Dec 2018 13:43:38 GMT):
@MuhammedHafil if you are only storing a document identifier in the ledger its better to have it passed in by the client application

jrosmith (Thu, 06 Dec 2018 13:44:59 GMT):
@hyperlearner to my knowledge, no. there might be a different way of interacting with the history db but it is not readily available in the docs

pujabhattad (Fri, 07 Dec 2018 05:45:52 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?

mahoney1 (Fri, 07 Dec 2018 11:22:58 GMT):
@VarunVerma do you mean 'how can I specify [nested] field from array in your selector'? the links I sent previously do exactly that. Also I believe (given the structure you posted) you want to query `marbleStore` for color, rather than `storeName` (on the basis of querying by color in the `Marbles` array) - nested examples also shown [here](http://docs.couchdb.org/en/2.2.0/api/database/find.html#find-selectors)

mahoney1 (Fri, 07 Dec 2018 11:22:58 GMT):
@VarunVerma do you mean 'how can I specify [nested] field from array in your selector'? the links I sent previously do exactly that. Also I believe (given the structure you posted) you want to query `marbleStore` for color, rather than `storeName` (on the basis of querying by color in the `Marbles` array) - nested examples also shown [here](http://docs.couchdb.org/en/2.2.0/api/database/find.html#find-selectors). HTH

mbanerjee (Fri, 07 Dec 2018 21:08:03 GMT):
Has joined the channel.

mikd (Fri, 07 Dec 2018 21:46:25 GMT):
Has joined the channel.

mallikarjunasai995 (Sat, 08 Dec 2018 07:03:42 GMT):
hey hai everyone in the below example ownership of asset is changing now in my usecase i dont want to change the ownership though i can share some part of ownership ..... how can i do that Txn = buy Issuer = MagnetoCorp Paper = 00001 Current owner = MagnetoCorp New owner = DigiBank Purchase time = 31 May 2020 10:00:00 EST Price = 4.94M USD

mallikarjunasai995 (Sat, 08 Dec 2018 07:03:46 GMT):
any thoughts

muralisr (Sat, 08 Dec 2018 14:35:07 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=82F9SwCmC37Fqu2em

muralisr (Sat, 08 Dec 2018 14:36:33 GMT):
@Rajatsharma left suggestions in direct chat ... if that worked can you share here for others benefit please ?

mallikarjunasai995 (Sat, 08 Dec 2018 16:21:35 GMT):
while running "make cryptogen configtxgen " command in ubutu am getting below error ...... Need your help Team ☺ can't load package: package github.com/hyperledger/fabric/core/chaincode/shim: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: /usr/local/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) /home/mallikarjuna/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) find: ‘/src/github.com/hyperledger/fabric/core/chaincode/shim’: No such file or directory .build/bin/configtxgen CGO_CFLAGS=" " GOBIN=/home/mallikarjuna/fabric/.build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/tools/configtxgen/metadata.CommitSHA=abe9d79" github.com/hyperledger/fabric/common/tools/configtxgen can't load package: package github.com/hyperledger/fabric/common/tools/configtxgen: cannot find package "github.com/hyperledger/fabric/common/tools/configtxgen" in any of: /usr/local/go/src/github.com/hyperledger/fabric/common/tools/configtxgen (from $GOROOT) /home/mallikarjuna/go/src/github.com/hyperledger/fabric/common/tools/configtxgen (from $GOPATH) Makefile:258: recipe for target '.build/bin/configtxgen' failed make: *** [.build/bin/configtxgen] Error 1

Rajatsharma (Sat, 08 Dec 2018 17:01:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TRhKBXE3jQ4cbpCH7) @muralisr I'm just trying that out if that works, I'll share it here too. Thanks again.

DJ_HC (Sun, 09 Dec 2018 14:56:37 GMT):
Has joined the channel.

javapriyan (Sun, 09 Dec 2018 17:13:16 GMT):
Has joined the channel.

javapriyan (Sun, 09 Dec 2018 17:14:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=C3wTvptuJArbMrvJ5) @mallikarjunasai995 Clearly you have to ' go get ' your dependenices

muralisr (Sun, 09 Dec 2018 17:56:54 GMT):
@mallikarjunasai995 @javapriyan GOPATH says `/home/mallikarjuna/go` but you appear to be building under `/home/mallikarjuna/fabric/` .... I'd try ``` cd /home/mallikarjuna/go/src/github.com/hyperledger/fabric make cryptogen configtxgen ``` If your `fabric` dir is not under `/home/mallikarjuna/go/src/github.com/hyperledger`, move it to that first

ashlinSajan (Mon, 10 Dec 2018 09:14:40 GMT):
Has joined the channel.

HarshiChandraSekar (Mon, 10 Dec 2018 09:32:28 GMT):
How can i get the username from fabric-client (setting username in registerUser.js) and display in web browser (HTML) ?

mallikarjunasai995 (Mon, 10 Dec 2018 14:08:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CSAhzGAHmkoXHepqH) @muralisr yes muralisr .. thanks i did this :relaxed:

mahoney1 (Mon, 10 Dec 2018 17:46:35 GMT):
@mallikarjunasai995 use an array to store the state? the setOwner function would have to change to something like ```setOwner(newOwner) { let existOwner = []; if (! this.isIssued()) { existOwner = this.getOwner(); } this.owner = existOwner; this.owner.push(newOwner); }``` in paper.js etc - but you would need to review the code, eg. currently the transaction functions in that sample are decorated for String not Array etc FYI)

mahoney1 (Mon, 10 Dec 2018 17:46:35 GMT):
@mallikarjunasai995 use an array to store the state? the setOwner function would have to change to something like ```setOwner(newOwner) { let existOwner = []; if (! this.isIssued()) { existOwner = this.getOwner(); } this.owner = existOwner; this.owner.push(newOwner); }``` in paper.js etc - but you would need to review the code, determine what you want to store etc.... note also.. currently the transaction functions (eg `currentOwner`) in that sample are decorated for String not Array etc FYI)

mahoney1 (Mon, 10 Dec 2018 17:46:35 GMT):
@mallikarjunasai995 use an array to store the state? the setOwner function would have to change to something like ```setOwner(newOwner) { let existOwner = []; if (! this.isIssued()) { existOwner = this.getOwner(); } this.owner = existOwner; this.owner.push(newOwner); }``` in paper.js etc - but you would need to review the code, determine what you want to store etc.... note also.. currently the transaction functions (eg `currentOwner`) in that sample are currently decorated for String not Array etc FYI)

mahoney1 (Mon, 10 Dec 2018 17:46:35 GMT):
@mallikarjunasai995 `hey hai everyone in the below example ownership of asset is changing now in my usecase i dont want to change the ownership though i can share some part of ownership ..... how can i do that ` ..use an array to store the state of ownership? the setOwner function would have to change to something like ```setOwner(newOwner) { let existOwner = []; if (! this.isIssued()) { existOwner = this.getOwner(); } this.owner = existOwner; this.owner.push(newOwner); }``` in paper.js etc - but you would need to review the code, determine what you want to store etc.... note also.. currently the transaction functions (eg `currentOwner`) in that sample are currently decorated for String not Array etc FYI)

YashParihar (Tue, 11 Dec 2018 04:23:05 GMT):
Has joined the channel.

techragesh (Tue, 11 Dec 2018 09:24:31 GMT):
Has joined the channel.

mallikarjunasai995 (Tue, 11 Dec 2018 09:56:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GabzSBzXCvWgvuXMs) @mahoney1 okay thanks got it but can you help me on this like ... I have an agreement made by two parties(one of the party will set the agreement and other has to accept it ) ... so considering that agreement as an asset ... how should i store other assets based on that agreement .... what is the asset movement here ,.... was not able to understand how assetmovement is happeing when we are not totally exchanging the ownership of goods .... any ideas on this ?

mallikarjunasai995 (Tue, 11 Dec 2018 09:56:12 GMT):
thanks in advance

mallikarjunasai995 (Tue, 11 Dec 2018 09:56:49 GMT):
I have an agreement made by two parties(one of the party will set the agreement and other has to accept it ) ... so considering that agreement as an asset ... how should i store other assets based on that agreement .... what is the asset movement here ,.... was not able to understand how assetmovement is happeing when we are not totally exchanging the ownership of goods .... any ideas on this ?

FlorianStoica (Tue, 11 Dec 2018 10:46:48 GMT):
Has joined the channel.

Nammalvar (Tue, 11 Dec 2018 10:49:42 GMT):
Has joined the channel.

mahoney1 (Tue, 11 Dec 2018 11:35:39 GMT):
@mallikarjunasai995 you have to understand what your use case is: you can store the agreement number(s) in the 'assets based on that agreement' - and able to reference that agreement as and when. Sorry, I don't know your use case, some of which is dual or multi-stage approval, some is referential update and some is state change :-)

mallikarjunasai995 (Tue, 11 Dec 2018 12:09:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oSXmX4Xposm9RWF9J) @mahoney1 okay thanks for you help :relaxed: other than read the docs, fabric-samples if you can share me any other reading or handson material for farbic blockchain it would be so greatful :rl

NeerajKumar (Wed, 12 Dec 2018 05:55:09 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

NeerajKumar (Wed, 12 Dec 2018 05:55:56 GMT):
can some body please explain why when ever i run docker restart dev-peer1.org2.example.com-bel_adhaar-v1 command

NeerajKumar (Wed, 12 Dec 2018 05:56:14 GMT):
containers exites immediately after trying to restart with the above error

FLASHJr (Wed, 12 Dec 2018 08:44:24 GMT):
I'm trying Fabcar ex. and I want to write a function in fabcar chaincode which will take userName as input parameter and will return the car details owned by that user... so can anyone help me with this?

FLASHJr (Wed, 12 Dec 2018 08:44:24 GMT):
I'm trying Fabcar ex. and I want to write a function in fabcar chaincode using node which will take userName as input parameter and will return the car details owned by that user... so can anyone help me with this?

techragesh (Wed, 12 Dec 2018 10:55:45 GMT):
Hi All

techragesh (Wed, 12 Dec 2018 10:56:04 GMT):
I am using chaincodelogger for logging

techragesh (Wed, 12 Dec 2018 10:56:17 GMT):
using golang

techragesh (Wed, 12 Dec 2018 10:56:32 GMT):
anyone help me where can i see my logs

techragesh (Wed, 12 Dec 2018 10:56:55 GMT):
how to write logs in separate file using chaincodelogger

sanjayMeFy (Wed, 12 Dec 2018 11:23:41 GMT):
Has joined the channel.

jrosmith (Wed, 12 Dec 2018 14:54:39 GMT):
@NeerajKumar are you trying to manually start the chaincode containers? there's no need. once the peers are back up, execute a transaction against the system. the peer will restart the chaincode container. if theres an issue with the actual peer container coming back up, #fabric-peer-endorser-committer will be the better resource

NeerajKumar (Wed, 12 Dec 2018 15:20:07 GMT):
thanks @jrosmith i will consider the recommended channel

NeerajKumar (Wed, 12 Dec 2018 15:20:19 GMT):
thanks for the support

alejandrolr (Wed, 12 Dec 2018 15:37:09 GMT):
Hi!! I want to do some tests using mockstub to test my chaincode, I've included roles using the cid library. I don't know if it is possible to use mockstub with cid. Any help? Thank you!!

edwardlee (Thu, 13 Dec 2018 08:50:07 GMT):
Has joined the channel.

zimabry (Thu, 13 Dec 2018 18:47:03 GMT):
Hi! How can I invoke another transaction from a function within the same chaincode?? Thank you!

zimabry (Thu, 13 Dec 2018 18:47:03 GMT):
Hi! How can I invoke another transaction from a function within the same chaincode?? Thank you! @jrosmith

jrosmith (Thu, 13 Dec 2018 20:06:30 GMT):
@alejandrolr have not done this myself, so i am just speculating. but the cid library just checks specific parts of the cert that signed the transaction proposal, so you should be able to use [MockInvokeWithSignedProposal](https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/mockstub.go#L149). from there you just have to figure out how to go about generating certs with the attributes you want. should be possible since theyre just x509 certs. @zimabry when you say invoke another transaction do you mean the entire transaction or just the state change associated with it? it's perfectly feasible for a function to trigger another that also contains `PutState`, but if you want a full transaction (signed by a specific cert, specific arguments, specific transaction id in the ledger) you should handle this logic outside of the chaincode and in your application

jrosmith (Thu, 13 Dec 2018 20:06:30 GMT):
@alejandrolr have not done this myself, so i am just speculating. but the cid library just checks specific parts of the cert that signed the transaction proposal, so you should be able to use [MockInvokeWithSignedProposal](https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/mockstub.go#L149). from there you just have to figure out how to go about generating certs with the attributes you want. should be possible since theyre just x509 certs.

jrosmith (Thu, 13 Dec 2018 20:08:40 GMT):
@zimabry another full transaction or just state changes associated with it? if you just want the associated state changes, its perfectly feasible for one function to call another that contains multiple `PutState` calls. but if you want the full transaction (signed by specific certs, has specific args, has specific transaction id, satisfies specific endorsement policy...all the txn bells and whistles) you should handle this logic outside of the chaincode and in the application itself.

zimabry (Thu, 13 Dec 2018 20:22:24 GMT):
Okay thank you @jrosmith we will have to handle it in middleware itself

zimabry (Thu, 13 Dec 2018 20:38:05 GMT):
@jrosmith stub.invokeChaincode will not work within my chaincode?

mallikarjunasai995 (Fri, 14 Dec 2018 05:53:31 GMT):
Hi Team , i am trying to up the channel with dev mode but getting below error so i just read one stackoverflow answer stating that you should place organizations in the top place to remove the error i tried but it did not worked ........ any help me to resolve the below error ./trade.sh up -d true Starting with channel 'tradechannel' Continue? [Y/n] Y proceeding ... LOCAL_VERSION=1.2.0 DOCKER_IMAGE_VERSION=1.2.1 =================== WARNING =================== Local fabric binaries and docker images are out of sync. This may cause problems. =============================================== /home/mallikarjuna/go/src/github.com/hyperledger/fabric-samples/bin/cryptogen ########################################################## ##### Generate certificates using cryptogen tool ######### ########################################################## + cryptogen generate --config=./crypto-config.yaml devorg.trade.com + res=0 + set +x /home/mallikarjuna/go/src/github.com/hyperledger/fabric-samples/bin/configtxgen ########################################################### ######### Generating Orderer Genesis block ############## ########################################################### + configtxgen -profile OneOrgTradeOrdererGenesis -outputBlock ./channel-artifacts/genesis.block 2018-12-14 11:20:57.809 IST [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'. 2018-12-14 11:20:57.815 IST [common/tools/configtxgen] main -> INFO 002 Loading configuration 2018-12-14 11:20:57.816 IST [common/tools/configtxgen/localconfig] Load -> CRIT 003 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced 2018-12-14 11:20:57.816 IST [common/tools/configtxgen] func1 -> CRIT 004 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced [recovered] panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced goroutine 1 [running]: github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420195e00, 0xc4205a2390, 0x1, 0x1) /w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd main.main.func1() /w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:254 +0x1ae panic(0xc6ea00, 0xc4205a2380) /opt/go/go1.10.linux.amd64/src/runtime/panic.go:505 +0x229 github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420195c50, 0xc42018f6e0, 0x2, 0x2) /w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7ffcb6277ff1, 0x19, 0x0, 0x0, 0x0, 0x1) /w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469 main.main() /w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:265 +0xce7 + res=2 + set +x Failed to generate orderer genesis block...

alejandrolr (Fri, 14 Dec 2018 07:01:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=irAB2NTirYGKBvKmk) @jrosmith @jrosmith thank you!! I will try this approach. In case of success I'll post here the solution!!

alejandrolr (Fri, 14 Dec 2018 08:56:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=irAB2NTirYGKBvKmk) @jrosmith I have a question about how to sign a proposal, I've generated my custom x509 cert (with cid attrs), but I don't know how to continue to sign the proposal. Any help?

Rajatsharma (Fri, 14 Dec 2018 09:11:02 GMT):
Using 'https://godoc.org/github.com/jiangzhx/fabric/core/chaincode/shim#ChaincodeStub.InvokeChaincode` can't we invoke a chaincode on any other channel ??

Rajatsharma (Fri, 14 Dec 2018 09:12:38 GMT):
because when I was trying this I received no error while even receiving a 200 status ok. Andthere were ogs of that transaction too.

Rajatsharma (Fri, 14 Dec 2018 09:13:00 GMT):
But that entry was not made in the leisure and even in the orderers.

jrosmith (Fri, 14 Dec 2018 14:08:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CyicSkrWgHFHheRFp) @alejandrolr don't know off the top of my head, perhaps @muralisr could be of assistance

jrosmith (Fri, 14 Dec 2018 18:56:22 GMT):
@Rajatsharma if i recall correctly cross channel invokes are not permitted. they may be read only. you can only invoke chaincode to chaincode if the chaincodes are installed/instantiated on the same channel

jrosmith (Fri, 14 Dec 2018 18:57:54 GMT):
looked at the [source code](https://github.com/hyperledger/fabric/blob/release-1.3/core/chaincode/shim/interfaces.go#L66), the above is correct.

LowellDuke (Fri, 14 Dec 2018 20:40:21 GMT):
Has joined the channel.

LowellDuke (Fri, 14 Dec 2018 20:42:47 GMT):
Greetings everyone. We've been using HL Fabric for 4 months now.

LowellDuke (Fri, 14 Dec 2018 20:44:45 GMT):
With a local instance running quite well we are really starting heavy chaincode development. Would this be the best channel for questions relating to a few of the Stub calls? Specifically, the docs say getQueryResult shouldn't be used to read state in a tx that will write state. Um, okay so they what *should* we use to read state? I'm coming from Ethereum, EOS, where validation of blocks is handled differently.

LowellDuke (Fri, 14 Dec 2018 20:44:45 GMT):
With a local instance running quite well we are really starting heavy chaincode development. Would this be the best channel for questions relating to a few of the Stub calls? Specifically, the docs say getQueryResult shouldn't be used to read state in a tx that will write state. Um, okay so then what *should* we use to read state? I'm coming from Ethereum, EOS, where validation of blocks is handled differently.

LowellDuke (Fri, 14 Dec 2018 20:45:15 GMT):
For reference, Stub.getQueryResults docs state ---- The query is NOT re-executed during validation phase, phantom reads are not detected. That is, other committed transactions may have added, updated, or removed keys that impact the result set, and this would not be detected at validation/commit time. Applications susceptible to this should therefore not use GetQueryResult as part of transactions that update ledger, and should limit use to read-only chaincode operations

muralisr (Fri, 14 Dec 2018 22:07:34 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=y7PxxXGNpbXKQQ5ZF

muralisr (Fri, 14 Dec 2018 22:08:17 GMT):
@alejandrolr if I understand correctly, you have used the `cid` library and want to UT your chaincode with using the mock chaionode UT framework

Rajatsharma (Fri, 14 Dec 2018 22:11:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2DRET76SW98N7HKjE) @jrosmith Thanks !! This made all the points very clear.

muralisr (Fri, 14 Dec 2018 22:24:30 GMT):
@alejandrolr this is likely not what you are looking for exactly.... just a pointer that might help in your UT - https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/enccc_example/enccc_example.go uses the `ext` library just as you use the `cid` library. The https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/enccc_example/enccc_test.go UT might give you some pointers as to how to go about your UT

muralisr (Fri, 14 Dec 2018 22:24:30 GMT):
@alejandrolr this is likely not what you are looking for exactly.... just a pointer that might help in your UT - https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/enccc_example/enccc_example.go uses the `ext` library just as you use the `cid` library. The https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/enccc_example/enccc_test.go UT might give you some pointers as to how to go about your UT ... Also perhaps the `cid` library UT https://github.com/hyperledger/fabric/blob/master/core/chaincode/lib/cid/cid_test.go would be helpful as well (it has to prime a chaincode stub for the UT)

muralisr (Fri, 14 Dec 2018 22:25:33 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZnvSLxr48PJb8yEoq

muralisr (Fri, 14 Dec 2018 22:27:18 GMT):
@mallikarjunasai995 `Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced` suggests release mismatch between the referenced configtx.yaml and the fabric binary

ayanfecrown (Sat, 15 Dec 2018 08:39:15 GMT):
Has joined the channel.

mallikarjunasai995 (Sat, 15 Dec 2018 18:48:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oSXmX4Xposm9RWF9J) @mahoney1 How can I store an asset based on the agreement ?? What type of type struct i have to create ?

dinoradulovic (Mon, 17 Dec 2018 02:49:02 GMT):
Has joined the channel.

Thomas-tuo (Mon, 17 Dec 2018 06:53:01 GMT):
Has joined the channel.

MuhammedHafil (Mon, 17 Dec 2018 08:29:58 GMT):
is there any way to get all attributes of a user with cid library?

alejandrolr (Mon, 17 Dec 2018 08:58:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jZHQjub9dA5RM375d) @muralisr thank you!! I've seen these repos and I don't see the way of calling mockstub methods with the ```cid`` library ```

alejandrolr (Mon, 17 Dec 2018 08:58:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jZHQjub9dA5RM375d) @muralisr thank you!! I've seen these repos and I don't see the way of calling mockstub methods with the ``cid`` library, I've seen this jira task: https://jira.hyperledger.org/browse/FAB-5644, which is exactly what is needed to UT chaincode using mockstub and cid library

alejandrolr (Mon, 17 Dec 2018 08:58:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jZHQjub9dA5RM375d) @muralisr thank you!! I've seen these repos and I don't see the way of calling mockstub methods with the ```cid``` library, I've seen this jira task: https://jira.hyperledger.org/browse/FAB-5644, which is exactly what is needed to UT chaincode using mockstub and cid library

alejandrolr (Mon, 17 Dec 2018 08:58:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jZHQjub9dA5RM375d) @muralisr thank you!! I've seen these repos and I don't see the way of calling mockstub methods with the `cid` library, I've seen this jira task: https://jira.hyperledger.org/browse/FAB-5644, which is exactly what is needed to UT chaincode using mockstub and cid library

alejandrolr (Mon, 17 Dec 2018 09:03:12 GMT):
@muralisr do you have any idea of how to workarround this, I don't have enough knowledge about possible solutions.

GuillaumeTong (Mon, 17 Dec 2018 10:39:35 GMT):
Has left the channel.

edisinovcic (Mon, 17 Dec 2018 14:01:18 GMT):
Has joined the channel.

Rajatsharma (Mon, 17 Dec 2018 18:17:51 GMT):
Has anyone tried making a channel from within a chaincode ?? Is it possible ??

jrosmith (Mon, 17 Dec 2018 19:47:55 GMT):
@Rajatsharma theoretically i don't see why not, but you would need to import an sdk and configure it properly in order to do so. if that is not enough reason to deter you, it is fundamentally an anti-pattern. chaincode must be deterministic as it gets executed on multiple peers. if you try to create a channel from within the chaincode, multiple peers will attempt to create the same channel. the first may succeed, but the others will fail, causing the entire transaction to fail unless your endorsement policy only requires one valid proposal from one organization (which is also an anti-pattern). logic for creating a channel should be handled at the application level

KvdB (Mon, 17 Dec 2018 19:58:00 GMT):
Has joined the channel.

KvdB (Mon, 17 Dec 2018 20:08:29 GMT):
Hi, currently trying to create an app but having issues with the chaincode.go file. Whenever I change something to this file, the changes won't come through when shutting down the app and restarting with ./startFabric.sh

KvdB (Mon, 17 Dec 2018 20:08:43 GMT):
Does anyone know why this could be happening?

muralisr (Mon, 17 Dec 2018 20:11:58 GMT):
@KvdB if you change the chaincode but deploy it with the same name, you should delete the chaincode docker image created by fabric manually

KvdB (Mon, 17 Dec 2018 20:17:16 GMT):
Thanks for the fast response, will try that

KvdB (Mon, 17 Dec 2018 20:26:28 GMT):
That did the trick, thanks @muralisr !

KvdB (Mon, 17 Dec 2018 20:55:08 GMT):
So I now face the following error: "unexpected end of JSON input" when doing an queryall function. From what I can gather it seems that the query returns no values. However, the initLedger function clearly shows that records were added to the ledger.

Rajatsharma (Tue, 18 Dec 2018 07:39:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qHhnRckyc6TFT7CfJ) @jrosmith Thanks buddy !! I just missed this.

NeelKantht (Tue, 18 Dec 2018 09:33:27 GMT):
Has joined the channel.

sushmitha (Tue, 18 Dec 2018 09:38:27 GMT):
Has joined the channel.

sushmitha (Tue, 18 Dec 2018 09:41:31 GMT):
i have more than 300000 records in couch db , when querying couch db , it is taking forever to return the count , is there an efficient way for retrieving no. of records from DB.

NeelKantht (Tue, 18 Dec 2018 09:42:27 GMT):
you can use pagination to retrieve record from couchDb

kmohanar1 (Tue, 18 Dec 2018 10:26:54 GMT):
Has joined the channel.

dave.enyeart (Tue, 18 Dec 2018 10:41:20 GMT):
See CouchDB query tips at https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html#good-practices-for-queries

kmohanar1 (Tue, 18 Dec 2018 10:50:36 GMT):
Can anyone please help how to deploy go chaincode as binary mode(without source code). i can see there is a option "peer chaincode install" under this command there is a flag -l binary to install binary(.exe) file. Can any one help me on this

halilkalkan (Tue, 18 Dec 2018 11:27:06 GMT):
Hello, can I implement a feature such that when a contract asset's status is changed to "approved", other peer updates their own account balance? I'm using private data so the peer that changes the status to "approved" cannot change my balance. Hope I could explain well.

dave.enyeart (Tue, 18 Dec 2018 13:34:28 GMT):
@halilkalkan chaincode logic can have a mix of private and public data, you should be able to meet both your objectives in one chaincode function.

halilkalkan (Tue, 18 Dec 2018 13:38:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zKhLKGFq2fGRDeoja) Actually I don't have public data, Collection A consist of only Org1 and it contains a member's balance. Collection B contains Org1 and Org2. Member creates a contract to send money to someone in Collection B. Afterwards, another user from Collection B approves this request. I'm trying to find a way that when this confirmation happens Org1 updates his member's balance in Collection A.

Rajatsharma (Tue, 18 Dec 2018 13:42:28 GMT):
Can anyone help me I'm trying to create a channel using bash by `docker exec -it peer bash`. But when i run `peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx`, then the `channel.block` is created in one peer. How do i fetch that on another peer to run `peer channel join -b channel.block`

muralisr (Tue, 18 Dec 2018 14:23:31 GMT):
@Rajatsharma typically you would run the join from `cli` image and change the env vars to point to different peers with appropriate IDs

muralisr (Tue, 18 Dec 2018 14:23:31 GMT):
@Rajatsharma typically you would run the join from `cli` image and change the env vars to point to different peers with appropriate IDs ... https://github.com/hyperledger/fabric-samples/blob/release-1.3/first-network/byfn.sh#L168 shows the execution (and if you follow scripts/* you would find the actual join)

i_Abhijeet (Tue, 18 Dec 2018 15:06:29 GMT):
Has joined the channel.

RameshT (Tue, 18 Dec 2018 15:18:45 GMT):
Has joined the channel.

mslavitch (Tue, 18 Dec 2018 15:38:15 GMT):
Has joined the channel.

zacpl (Tue, 18 Dec 2018 15:53:15 GMT):
I have a question about the TxIDs: for example when using stub.GetTxId() from the shim package. With a given set of inputs (eg. ledger state), can I calculate the TxID for some arbitrary proposal without actually sending it form the client? Are TxIDs generated deterministically? If so, from what inputs?

Rajatsharma (Tue, 18 Dec 2018 16:05:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3m9FB4efyMNWeKfPY) @muralisr Thanks @muralisr !!

deepaks (Tue, 18 Dec 2018 18:43:11 GMT):
Has joined the channel.

deepaks (Tue, 18 Dec 2018 18:43:31 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

kmohanar1 (Wed, 19 Dec 2018 05:09:54 GMT):
Hi,

kmohanar1 (Wed, 19 Dec 2018 05:10:14 GMT):
is there any option to deploy our chaincode in binary format rather than as go source code

kmohanar1 (Wed, 19 Dec 2018 05:11:40 GMT):
i can see that there is a option while instantiating "-l binary" flag can be used to deploy binay on peers

kmohanar1 (Wed, 19 Dec 2018 05:11:40 GMT):
i can see that there is a option while instantiating "-l binary" flag can be used to deploy binary on peers

kmohanar1 (Wed, 19 Dec 2018 05:12:49 GMT):
please guide me on this

NickXie (Wed, 19 Dec 2018 07:11:13 GMT):
Has joined the channel.

DeepaMotwani (Wed, 19 Dec 2018 07:41:11 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.

vikpande (Wed, 19 Dec 2018 07:58:08 GMT):
@DeepaMotwani , a lot of reasons could cause this. your fabric version, docker images, config issues, amongst others. can u pls share the error message that you are getting. maybe that leads us to the solution

DeepaMotwani (Wed, 19 Dec 2018 08:02:14 GMT):
@vikpande below is the error which I am getting: [2018-12-19 12:56:45.976] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-12-19 12:56:45.978] [ERROR] instantiate-chaincode - instantiate proposal was bad [2018-12-19 12:56:45.978] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse [2018-12-19 12:56:45.978] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse (node:2057) UnhandledPromiseRejectionWarning: Error: Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse at Object.instantiateChaincode (/home/deepa/fabric-1.3-samples/fresh/balance-transfer/app/instantiate-chaincode.js:189:9) at (node:2057) 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)

vikpande (Wed, 19 Dec 2018 08:09:05 GMT):
thanks. i see that its not a problem with the version of fabric. can u pls try this. works in most situations. 1. stop and delete the container. 2. install the container again 3. instantiate the code again. pls let me know if you are successful. good luck.

DeepaMotwani (Wed, 19 Dec 2018 09:18:24 GMT):
@vikpande no success. Is there anything I should add to some configuration or any package that needs to be included in the chaincode?

DeepaMotwani (Wed, 19 Dec 2018 09:18:24 GMT):
@vikpande no success. Is there anything I should add to some configuration or any package that needs to be included in the chaincode? This is my collection json [{ "name": "collectionMarbles", "policy": { "identities": [{ "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 }, { "signed-by": 1 } ] } }, "requiredPeerCount": 1, "maxPeerCount": 2, "blockToLive": 100 }, { "name": "collectionMarblePrivateDetails", "policy": { "identities": [{ "role": { "name": "member", "mspId": "Org1MSP" } }], "policy": { "1-of": [{ "signed-by": 0 }] } }, "requiredPeerCount": 1, "maxPeerCount": 1, "blockToLive": 100 } ]

DeepaMotwani (Wed, 19 Dec 2018 09:18:24 GMT):
@vikpande no success. Is there anything I should add to some configuration or any package that needs to be included in the chaincode? This is my collection json [{ "name": "collectionMarbles", "policy": { "identities": [{ "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 }, { "signed-by": 1 } ] } }, "requiredPeerCount": 1, "maxPeerCount": 2, "blockToLive": 100 }, { "name": "collectionMarblePrivateDetails", "policy": { "identities": [{ "role": { "name": "member", "mspId": "Org1MSP" } }], "policy": { "1-of": [{ "signed-by": 0 }] } }, "requiredPeerCount": 1, "maxPeerCount": 1, "blockToLive": 100 } ] Below is my configuration settings in the instantiate-chaincode.js file: const collectionsConfigPath = path.resolve(__dirname, '/home/deepa/fabric-1.3-samples/fresh/balance-transfer/artifacts/src/github.com/example_cc/collections_config.json'); // send proposal to endorser var request = { targets : peers, chaincodeId: chaincodeName, chaincodeType: chaincodeType, chaincodeVersion: chaincodeVersion, args: args, txId: tx_id, 'collections-config': collectionsConfigPath };

vikpande (Wed, 19 Dec 2018 10:32:34 GMT):
dont see anything missing here though

vikpande (Wed, 19 Dec 2018 10:32:37 GMT):
:-(

DeepaMotwani (Wed, 19 Dec 2018 11:57:52 GMT):
@vikpande fixed the issue. Need to mention the version compatibilities in the configtx file

vikpande (Wed, 19 Dec 2018 12:10:17 GMT):
ahh. you are right . i remember i answered this one 3 day ago to another colleague of ours :-) . happy for you.

vikpande (Wed, 19 Dec 2018 12:10:25 GMT):
so it was version indeed :-)

vdods (Wed, 19 Dec 2018 20:59:24 GMT):
Hi all, has anyone had problems instantiating chaincode involving golang 1.11 modules? i'm getting apparent mismatch of source paths where some paths are included from my $GOPATH based source, and some from the go modules path (under $GOPATH/pkg/mod/...)

javapriyan (Thu, 20 Dec 2018 05:11:42 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/ledger/ledger_queries_test.go

javapriyan (Thu, 20 Dec 2018 05:11:42 GMT):
Guys, I am wondering why my chaincode is not working as per the documentation. The putstate is simply not working.Has anyone come across such scenario ever ?

javapriyan (Thu, 20 Dec 2018 05:13:41 GMT):
My system config: Ubuntu 18.04 fabric 1.3 golang 1.10

knagware9 (Thu, 20 Dec 2018 06:24:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6NoThvK9ZpWCtoikL) @javapriyan whats the error

sanket1211 (Thu, 20 Dec 2018 06:24:20 GMT):
Has joined the channel.

purandam (Thu, 20 Dec 2018 06:38:25 GMT):
Hi All,

rohitshukla11 (Thu, 20 Dec 2018 08:03:38 GMT):
Has joined the channel.

rohitshukla11 (Thu, 20 Dec 2018 08:04:18 GMT):
Hi, can I share private data between two users of same peers in fabric? Let's say I have 3 users U1, U2 and U3 all belongs to the same peers and I want to share data between U1 and U3 which U2 can't see. Is this possible?

qsmen (Thu, 20 Dec 2018 09:39:22 GMT):
hi experts here, in "github.com/hyperledger/fabric/core/chaincode/shim, invokechaincode can be used to invoke some function from other chaincode. My question is whether invokechaincode can run a piece of code that is not from other chaincode, but is a input parameter. I think the answer is no. I am wondering: add an api such that the api can run a piece of code whichi is a parameter to current chaincode.

qsmen (Thu, 20 Dec 2018 09:39:22 GMT):
hi experts here, in "github.com/hyperledger/fabric/core/chaincode/shim, invokechaincode can be used to invoke a function from other chaincode. My question is whether invokechaincode can run a piece of code that is not from other chaincode, but is a input parameter. I think the answer is no. I am wondering: add an api such that the api can run a piece of code which is a parameter to current chaincode.

qsmen (Thu, 20 Dec 2018 09:39:22 GMT):
hi experts here, in "github.com/hyperledger/fabric/core/chaincode/shim, invokechaincode can be used to invoke a function from other chaincode. My question is whether invokechaincode can run a piece of code that is not from other chaincode, but is a input parameter. I think the answer is no. I am wondering: add an api such that the api can run a piece of code which is a parameter to current chaincode.

qsmen (Thu, 20 Dec 2018 09:42:18 GMT):
is the idea possible?

qsmen (Thu, 20 Dec 2018 09:42:18 GMT):
is the idea possible? Thank you.

qsmen (Thu, 20 Dec 2018 09:51:00 GMT):
thank you

WouterVanHecke (Thu, 20 Dec 2018 10:00:29 GMT):
Has joined the channel.

javapriyan (Thu, 20 Dec 2018 10:00:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=L7RRz4Jz76DzcpE4w) @knagware9 There was no error.

WouterVanHecke (Thu, 20 Dec 2018 10:00:35 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

javapriyan (Thu, 20 Dec 2018 10:02:06 GMT):
It was always a 200. Later, I revisited and network config and found one of the peer address was not passed

javapriyan (Thu, 20 Dec 2018 10:03:41 GMT):
@knagware9 I really lost when I tried to rename the domain name and organization. I followed the e2e test .sh from the first network and tried to fix the same against my network and found few things leftout in the namings. Finally, its sort out

AVetter (Thu, 20 Dec 2018 10:32:38 GMT):
Has joined the channel.

AVetter (Thu, 20 Dec 2018 10:39:24 GMT):
What is the best way to test node-chaincode? (Missing a node runtime, like in HL Composer..)

Memo99 (Thu, 20 Dec 2018 10:50:19 GMT):
Has joined the channel.

Memo99 (Thu, 20 Dec 2018 10:50:27 GMT):
hi guys,

Memo99 (Thu, 20 Dec 2018 10:51:21 GMT):
I'm trying to instatiate chaincode from cli but getting always same error Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid

Memo99 (Thu, 20 Dec 2018 10:51:35 GMT):
someone knows what is wrong ?

knagware9 (Thu, 20 Dec 2018 14:00:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uprgqpQqWJr3SHotD) @javapriyan okay great

rthatcher (Thu, 20 Dec 2018 14:50:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8unN6ANym57TMfLNn) @AVetter There is a VSCode Extension from IBM that has features for Debugging and testing the Smart Contract: https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform (it is something from IBM though, not from Hyperledger)

lightcap (Thu, 20 Dec 2018 16:37:22 GMT):
Has joined the channel.

muralisr (Thu, 20 Dec 2018 16:53:30 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=E9XDnfkFtXSj95Xv7

muralisr (Thu, 20 Dec 2018 16:56:09 GMT):
@Memo99 assuming you are deploying a GO chaincode ... if your chaincode is `/a/b/c/src/e/f/g/mycc/` , your GOPATH is `/a/b/c` the `-p` param would be `e/f/g/mycc` ... in general the -p param for go chaincodes would be relative to GOPATH

muralisr (Thu, 20 Dec 2018 16:56:23 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=j2dvNynTeqstsWQP9

muralisr (Thu, 20 Dec 2018 16:57:10 GMT):
@javapriyan assume you are all set ?

muralisr (Thu, 20 Dec 2018 16:58:39 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZW3FkrN8xFrFjRXqh

muralisr (Thu, 20 Dec 2018 17:01:13 GMT):
@qsmen are you suggesting running a piece of code supplied as input param ? that would be unusual and moreover has nothing to do with "invokechaincode" which has strict chaincode semantics

muralisr (Thu, 20 Dec 2018 17:02:28 GMT):
not sure what your usecase is but suggest looking up things like plugins in fabric for flexible execution models

muralisr (Thu, 20 Dec 2018 17:03:20 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=L8aWa2RJb68Y4cEQw

muralisr (Thu, 20 Dec 2018 17:05:11 GMT):
@WouterVanHecke the `?` is the printer giving up on rendering binary data .. real question is what the data that was being passed and how you are going to interpret

muralisr (Thu, 20 Dec 2018 17:05:11 GMT):
@WouterVanHecke the `?` is the printer giving up on rendering binary data .. real question is what the data that was being passed and how you are going to interpret (basically, your app specific I'd guess)

mattmaru (Thu, 20 Dec 2018 17:11:01 GMT):
Has joined the channel.

mattmaru (Thu, 20 Dec 2018 17:11:30 GMT):
Hi guys, I'm a beginner in this world. I have a question... I need to know how is possible add a resource like an artwork to a "peer". In my project i create a chaincode that works with artwork. But how i can add these to a specific peer? Please answer me

jrosmith (Thu, 20 Dec 2018 21:15:19 GMT):
@mattmaru by definition whatever asset you have does not reside on a specific peer. using private collections you can ensure that the asset resides on a specific subset of peers, but if your usecase requires one node to have the data you may want to reconsider the usecase.

jrosmith (Thu, 20 Dec 2018 21:15:19 GMT):
@mattmaru by definition whatever asset you have does not reside on a specific peer. using private collections you can ensure that the asset resides on a specific subset of peers, but if your usecase requires exactly one node to have the data you may want to reconsider the usecase.

qsmen (Fri, 21 Dec 2018 01:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EYqxsdDRxSSXHRKRS) @muralisr THank you for the reply. Yes, I am suggesting running a piece of code supplied as input param. You mean plugin can be used for flexible execution? would you please in more detail?

qsmen (Fri, 21 Dec 2018 01:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EYqxsdDRxSSXHRKRS) @muralisr THank you for the reply. Yes, I am suggesting running a piece of code supplied as input param. You mean plugin can be used for flexible execution?

qsmen (Fri, 21 Dec 2018 01:08:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EYqxsdDRxSSXHRKRS) @muralisr THank you for the reply. Yes, I am suggesting running a piece of code supplied as input param.

AVetter (Fri, 21 Dec 2018 07:35:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=id5W9yj3mPpn9N6o7) @rthatcher Thank you! Will give it a try

johnlohith (Fri, 21 Dec 2018 09:52:48 GMT):
ClientIdentity is currently broken. Creating an object of it throws the following error: SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at new ClientIdentity (/usr/local/src/node_modules/fabric-shim/lib/chaincode.js:251:38)

johnlohith (Fri, 21 Dec 2018 09:53:08 GMT):
For Node SDK

davidkel (Fri, 21 Dec 2018 09:58:13 GMT):
@mbwhite ^^^

mbwhite (Fri, 21 Dec 2018 10:33:37 GMT):
https://jira.hyperledger.org/browse/FAB-13364

mbwhite (Fri, 21 Dec 2018 10:33:42 GMT):
is the related issue for this...

mbwhite (Fri, 21 Dec 2018 10:34:25 GMT):
@johnlohith could I ask what the scenario you where working with at the itme?

mbwhite (Fri, 21 Dec 2018 10:39:21 GMT):
I would expect that if in the chaincode, adding the x509 library explicitly at a fixed level should workaround the issues `npm install --save x509@0.3.3` The shim's package.json references ^0.3.2, so if you specifically add in the 0.3.3 version NPM should be happy

johnlohith (Fri, 21 Dec 2018 11:25:09 GMT):
The issue popped up yesterday on chaincode that was working fine previously

davidkel (Fri, 21 Dec 2018 11:52:42 GMT):
@johnlohith node and npm provide the concept of a shrinkwrap which locks down the exact npm modules to use. This protects against module changes that (although are supposed to be backward compatible and not introduce bugs) may affect the final application. I haven't tried but I would hope that fabric when it builds the node chaincode image would honour a supplied shrinkwrap file.

johnlohith (Fri, 21 Dec 2018 11:53:52 GMT):
I just tried adding the 0.3.3 version of x509 and the issue is resolved

johnlohith (Fri, 21 Dec 2018 11:55:24 GMT):
Thanks for the info @mbwhite and @davidkel

johnlohith (Fri, 21 Dec 2018 11:56:19 GMT):
Simply adding it to your chaincode's package.json file overrides fabric-shim's package.json file

mbwhite (Fri, 21 Dec 2018 12:34:19 GMT):
FYI fabric-shim - 1.3.2 published that should resolve the above issues...

muralisr (Fri, 21 Dec 2018 13:23:44 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mzvRQGB84GXZxydor

muralisr (Fri, 21 Dec 2018 13:37:51 GMT):
@qsmen what is the usecase ? All endorsers would have to execute the same code (so it cannot be peer/org specific in general). If all you are looking for is late binding plugins as defined here https://github.com/hyperledger/fabric/blob/release-1.4/sampleconfig/core.yaml#L321 might be an option.

chuda (Fri, 21 Dec 2018 13:43:34 GMT):
hi,feeling there is a bug in getallcarsbyrange(startkey,endkey)...if we give range as 1 to 12 having 20 records it retriving records like this...1,2,11,12,13,14...19...wats this error or bug..any one help me here

muralisr (Fri, 21 Dec 2018 14:07:18 GMT):
@chuda are you saying all records are there but they are out of order ? or are records missing ?

chuda (Fri, 21 Dec 2018 14:09:11 GMT):
yes your correct all records are there but out of order

chuda (Fri, 21 Dec 2018 14:12:33 GMT):
when i tried 3 to 9 it responds correctly,3,4,5,6,7,8....but when i put as 1 to 9...its responds like...1,11,12,13,14,15,...19

chuda (Fri, 21 Dec 2018 14:13:49 GMT):
i tried to change that data type of key as int...but not identified where to change that data type...is this bug???

muralisr (Fri, 21 Dec 2018 14:19:11 GMT):
Sounds like its doing dictionary order or something... perhaps @dave.enyeart might know

chuda (Fri, 21 Dec 2018 14:20:23 GMT):
ok thankyou...i posted .. but not replied yet

chuda (Fri, 21 Dec 2018 14:23:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Hoa6ySRDphRJAoj5x) @muralisr how to change that string to int type

dave.enyeart (Fri, 21 Dec 2018 14:49:25 GMT):
@muralisr @chuda range queries use a lexicographic order, not numeric order, so this looks correct

dave.enyeart (Fri, 21 Dec 2018 14:50:30 GMT):
if you want numeric order, you can zero pad or do some other order preserving encoding for your keys

studyblockchain (Fri, 21 Dec 2018 15:10:03 GMT):
Has joined the channel.

mbwhite (Fri, 21 Dec 2018 16:56:37 GMT):
FYI this week I was trying to work out something similar... I put the keys in question into a JavaScript array and ran `sort()` on them.. the output gave me a better understanding of what lexical order was

merq (Sat, 22 Dec 2018 03:43:03 GMT):
Has joined the channel.

chuda (Sat, 22 Dec 2018 05:15:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=yKeJFdPqSg9GC3pcq) @mbwhite great, may i know wats the output...

mbwhite (Sat, 22 Dec 2018 08:59:16 GMT):
It's probably best to try the experiment yourself with the keys you have. It gave me an intuitive understanding

mbwhite (Sat, 22 Dec 2018 09:06:38 GMT):
I would read this discussion. https://stackoverflow.com/q/47478926/1332076

hassan_ahmed4621 (Sat, 22 Dec 2018 16:07:28 GMT):
Has joined the channel.

hassan_ahmed4621 (Sat, 22 Dec 2018 16:08:35 GMT):
Err when try to instantiate Chaincode “failed to deserialize creator identity, err msp usermsp is unknown”

hassan_ahmed4621 (Sat, 22 Dec 2018 16:08:57 GMT):
0 I am using Basic network with my changed organizations "user" and "legaldocxauth" and fabcar chaincode to run with it (later i will change chaincode functions according to my use case) but whenever i run startFabric.sh on instantiating chaincode it gives error "failed to deserialize creator identity, err usermsp msp is unknown" Docker version latest 18.09.0 I have changed other network files configtx , docker-compose yaml and crypto configtx Msps accordingly I have also tried other solutions(on stackoverflow) of similar problem but no luck :(

davidkhala (Sun, 23 Dec 2018 09:58:40 GMT):
Is anyone know what is the usage of chaincodeStub.getBindings and getDecorations?

davidkhala (Sun, 23 Dec 2018 09:58:40 GMT):
Does anyone know what is the usage of chaincodeStub.getBindings and getDecorations?

ajaykumar213 (Sun, 23 Dec 2018 10:34:46 GMT):
Has joined the channel.

yacovm (Sun, 23 Dec 2018 11:38:25 GMT):
@davidkhala yep I do

yacovm (Sun, 23 Dec 2018 11:40:49 GMT):
binding is explained [here](https://github.com/yacovm/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L323). As for Decorations, a peer may add additional input to the chaincode input via custom endorsement handlers. You need to specify a plugin file in the [core.yaml](https://github.com/yacovm/fabric/blob/release-1.4/sampleconfig/core.yaml#L359) section that implements a [decorator](https://github.com/yacovm/fabric/blob/release-1.4/core/handlers/decoration/decoration.go#L14-L16).

muralisr (Sun, 23 Dec 2018 14:19:37 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=m6kRKB7w3P7Ns2v5o

muralisr (Sun, 23 Dec 2018 14:22:17 GMT):
@hassan_ahmed4621 I'd look into how you modified msp ids in the sample to `usermsp` (realize you have changed config files but likely there's some configuration that's not using the new mspid correctly)

davidkhala (Sun, 23 Dec 2018 16:10:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ziARQnx4DGXZRqxsh) @yacovm Thanks, yacov, but I am still not sure what information inside the []byte got from `GetBinding()` and how to use them. Is there an sample or integration test covering it?

yacovm (Sun, 23 Dec 2018 18:39:37 GMT):
it's just hash over nonce || creator || epoch

yacovm (Sun, 23 Dec 2018 18:39:46 GMT):
and i don't think epoch is used anywhere currently...

davidkhala (Mon, 24 Dec 2018 04:09:14 GMT):
@yacovm Ooh I see, I guess nonce is related to transaction id randomness, creator is what we can get from getCreator and feed into client identity library. Emm, is epoch related to txTime? Is my guessing correct?

yacovm (Mon, 24 Dec 2018 07:29:04 GMT):
yeah sort of

yacovm (Mon, 24 Dec 2018 07:29:08 GMT):
but i don't think epoch is implemented

DeepaMotwani (Mon, 24 Dec 2018 08:23:56 GMT):
do we have a support for private data using node chaincode?

DeepaMotwani (Mon, 24 Dec 2018 08:23:56 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.

javapriyan (Mon, 24 Dec 2018 09:06:30 GMT):
Guys, How to manage multiple assets using a single chaincode ?

pikvik (Mon, 24 Dec 2018 10:35:29 GMT):
Has joined the channel.

pikvik (Mon, 24 Dec 2018 10:36:33 GMT):
I m facing this error folks . Can someone help me out with this ?/ MacBook-Pro:fabCar Vikas$ node invoke.js Store path:/Users/techolution/fabric-samples/fabcar/hfc-key-store (node:2563) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead Successfully loaded user1 from persistence Assigning transaction_id: da25d154b226c92274b3366969dcbdb8a8345adfc1a3b8be66fbb482b34ec4c5 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...

hassan_ahmed4621 (Mon, 24 Dec 2018 10:41:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KGF3FTWuW7ipwsh4B) @muralisr yeah sure i have sent you config files in your inbox. Check them out and thanks alot for help

tuckerg (Mon, 24 Dec 2018 13:32:35 GMT):
Has joined the channel.

dave.enyeart (Mon, 24 Dec 2018 13:39:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZpECS3fvhYWHc4qoM) @DeepaMotwani yes, node chaincode supports private data

dave.enyeart (Mon, 24 Dec 2018 13:40:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CudRnyWPtBjca63G3) @javapriyan You would use a composite key, one part of the key for the asset type, one part of the key for that asset types unique key. You can build the composite key yourself, or use the convenience API CreateCompositeKey()

dave.enyeart (Mon, 24 Dec 2018 13:40:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CudRnyWPtBjca63G3) @javapriyan I assume you mean multiple asset types, each with multiple assets. You would use a composite key, one part of the key for the asset type, one part of the key for the unique key of the asset within the asset type. You can build the composite key yourself, or use the convenience API CreateCompositeKey()

muralisr (Mon, 24 Dec 2018 15:35:51 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TFxgKuEDqCnPnE5gC

muralisr (Mon, 24 Dec 2018 15:36:38 GMT):
@hassan_ahmed4621 error says `usermsp` but appears you have configuered `userMSP` ... msp ids are case senstive. Can you correct that and see if that takes care of it ?

hassan_ahmed4621 (Tue, 25 Dec 2018 14:16:35 GMT):
@muralisr sir i have corrected it(same case and spelling in all network files and startfabric.sh) but still no luck same error

muralisr (Tue, 25 Dec 2018 14:19:08 GMT):
So I assume you have have created the channel, have the peer join the channel etc successfully ?

muralisr (Tue, 25 Dec 2018 14:19:08 GMT):
So I assume you have have created the channel, have the peer join the channel etc using `userMSP` successfully ?

muralisr (Tue, 25 Dec 2018 14:19:16 GMT):
and the instantiate is the one that fails ?

hassan_ahmed4621 (Tue, 25 Dec 2018 16:48:04 GMT):
@muralisr thanks a alot for your help the problem was with my channel names(i changed channel name in network configs but didn't reflect them while installing and instantiating chaincode) which you pointed out thats y i was facing the error

muralisr (Tue, 25 Dec 2018 16:49:12 GMT):
good luck!

qsmen (Wed, 26 Dec 2018 02:49:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2RhbRk3n9fLkR6yaH) @muralisr Thanks for the link. In bitcoin, unlock script is run when it is input as a parameter to a transaction. If chaincode api

qsmen (Wed, 26 Dec 2018 02:49:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2RhbRk3n9fLkR6yaH) @muralisr Thanks for the link. In bitcoin, unlock script is run when it is input as a parameter to a transaction. If chaincode api can run the kind of code , it would be easy to implement utxo in fabric. But now I have give up that idea.

sanjeevkkn (Wed, 26 Dec 2018 06:18:09 GMT):
Has joined the channel.

VarunVerma (Wed, 26 Dec 2018 06:38:59 GMT):
Hi, How can i retrieve the user data from the Asset History. Basically i wanted to know who(user) invoked a particular Trasnsaction. Thankyou

fgimenez (Wed, 26 Dec 2018 09:30:29 GMT):
Has joined the channel.

WouterVanHecke (Wed, 26 Dec 2018 10:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=g8cuKnDvbsrSF3Kud) @VarunVerma take a look at the ClientIdentity in the fabric shim

ArpitKhurana1 (Wed, 26 Dec 2018 11:49:13 GMT):
Has joined the channel.

ArpitKhurana1 (Wed, 26 Dec 2018 11:50:00 GMT):
Is there any way to change log level of shim logger in golang. I mean we can set the variable in core.yaml, but i want to change it dynamically

ArpitKhurana1 (Wed, 26 Dec 2018 11:50:00 GMT):
Is there any way to change log level of shim logger in golang. I mean we can set the variable in core.yaml, but i want to change it dynamically. Can chaincode log level be controlled from peer logging topics

nhrishi (Wed, 26 Dec 2018 12:20:45 GMT):
Hi, currently, for a private data queries, we need to always use collection to query . Are we planning to have queries that can pull states across multiple collections.

RostyslavBortman (Wed, 26 Dec 2018 17:48:43 GMT):
Has joined the channel.

rohitshukla11 (Thu, 27 Dec 2018 06:36:32 GMT):
Hi everyone, Can I encrypt and decrypt data using Public/private key between two users? I want to develop a system in which I have multiple users. There is an option present in front of every user for sharing the data with another user. Let's say I have 3 users U1, U2 and U3 all belongs to the same peers and I want to share data between U1 and U3 which U2 can't see. Is this possible? I found only way to use asymmetric cryptography between users and wanted some help to implement this.

VarunVerma (Thu, 27 Dec 2018 07:20:02 GMT):
cid Package error Error: error getting chaincode code fabcar: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/lib/cid: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)

purandam (Thu, 27 Dec 2018 12:55:37 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/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-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/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 12:55:37 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 } ]

Bayeed (Thu, 27 Dec 2018 13:18:28 GMT):
Has joined the channel.

Bayeed (Thu, 27 Dec 2018 13:18:33 GMT):
can i integrate caliper with fabric v1.3 ?

dave.enyeart (Thu, 27 Dec 2018 16:15:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oGLoyMtrod4WYghWw) @nhrishi There is a future feature planned where there would be a single collection namespace and clients determine which orgs should get the private data. Then an org can query for any private data that they have access to.

ertalemdar (Thu, 27 Dec 2018 19:22:10 GMT):
Has joined the channel.

ertalemdar (Thu, 27 Dec 2018 19:24:56 GMT):
Hello! Just found out about this chat. I am currently trying to deploy Fabric with a custom chaincode onto AWS using the Ansible Agent in the Cello project. While I can get the network up and install the default chaincode onto the peers, I cannot switch the default with our custom chaincode that uses the Go extensions in the vendor folder (I think it uses fabric v1.3). Does anyone have any sources for deploying Fabric 1.3 onto AWS with a custom chaincode using Go extensions?

ertalemdar (Thu, 27 Dec 2018 19:24:56 GMT):
Hello! Just found out about this chat. I am currently trying to deploy Fabric with a custom chaincode onto AWS using the Ansible Agent in the Cello project. While I can get the network up and install the default chaincode onto the peers, I cannot switch the default with our custom chaincode that uses the Go extensions in the vendor folder (I think it uses fabric v1.3). Does anyone have any sources for deploying Fabric 1.3 onto AWS with a custom chaincode that uses Go extensions?

githubcpc (Fri, 28 Dec 2018 00:39:13 GMT):
If I invoke 10 from A to B .In my chaincode ,it stub.putState(A,A-10) and stub.putState(B,B+10) . If it putState(A,A-10) successfully ,but putState(B,B+10) fail. A has already minus 10,and write to the ledger.The result is wrong . How can I run the transaction successfully?

qsmen (Fri, 28 Dec 2018 02:53:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2RhbRk3n9fLkR6yaH) @muralisr Thank you Muralisr. I want to use the piece of code as a unlock script just as in Bitcoin.

vinita1701 (Fri, 28 Dec 2018 03:21:26 GMT):
Has joined the channel.

vinita1701 (Fri, 28 Dec 2018 03:25:15 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.

nhrishi (Fri, 28 Dec 2018 06:56:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2qPcazBbwzfYSrore) @dave.enyeart Thanks Dave. Could you pls share JIRA story for the same and also if any documentation on the future roadmap. It would be really helpful.

gravity (Fri, 28 Dec 2018 11:44:42 GMT):
Hi all what package should be used in chaincode development with the `cid` lib? `"github.com/hyperledger/fabric/core/chaincode/shim/ext/cid"` org `github.com/hyperledger/fabric/core/chaincode/lib/cid` is `cid` lib now a part of `fabric` and not a submodule? thanks in advance

KartikChauhan (Fri, 28 Dec 2018 11:46:22 GMT):
Hello! I'm trying to add 'affiliations' to a user's certificate at the time of registering him. I'm running fabcar network and adding affiliation: 'org1.department1' in the object in fabric_ca_client.register() function. But after successfully registering & enrolling the user, when I see the user's certificate I find the affiliation's value to be empty. Another question, how can I add attributes while registering or enrolling the user? I tried to run the script by adding attrs: [{"email": "testemail.com"}] in the register function. I tried to add it in enroll function as well. But it's not working. Could anyone show how it's done.

AVetter (Fri, 28 Dec 2018 16:12:02 GMT):
Despite the description I don't understand the reason why the node.js stub.createCompositeKey() function (https://github.com/hyperledger/fabric-chaincode-node/blob/f876aee9dc6e858ef176d30f09d1471302badb61/fabric-shim/lib/stub.js#L727 ) puts the special characters in the key. Does someone understand it and can tell me?

RodneySa (Fri, 28 Dec 2018 16:35:35 GMT):
Hey guys, I currently have a problem when invoking a chaincode that is installed in multiple hosts. If I call the host where the chaincode was instantiated, everything works fine, but if I call any other host where the chaincode was installed but not instantiated, I get an error like this: "failed to execute transaction d4957f13633f908ed9c78c200bcd706b53d6b8d2c644cf210f2bda1b150e3819: [channel channel] failed to get chaincode container info for chaincodename:1.1: could not get chaincode code: chaincode fingerprint mismatch: data mismatch" This is the order I am installing and instantiating the chaincode: 1. Install in host 1 2. Install in host 2 3. Instantiate in host 1 The chaincode should be instantiated only once, right? I read this doc (https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html) and I think I know what is wrong: Every host has its own copy of the chaincode code in node. This doc says something about packaging the code before installing it... Is this the problem? If so, how I am suposed to do it? I didn't find the doc clear enough.

RodneySa (Fri, 28 Dec 2018 17:01:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=E8fMiKeerhzs3xnCq) I figured this out. Basically the code was different in each host, so I getting the error.

RodneySa (Fri, 28 Dec 2018 19:59:08 GMT):
How can I shut down a peer and then restart it manually? I want to test how much time it will take to restart it and have its data synced.

dave.enyeart (Fri, 28 Dec 2018 22:51:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TTPKuWFMNCrkWHLpp) @nhrishi The roadmap for 2.0 includes the epics mentioned on this jira dashboard: https://jira.hyperledger.org/secure/Dashboard.jspa?selectPageId=11700

dave.enyeart (Fri, 28 Dec 2018 22:52:05 GMT):
The feature you are looking for is the one called "Local Collections"

dave.enyeart (Fri, 28 Dec 2018 22:53:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=PdAbX92DrGybxMu89) @gravity You should use and vendor the "github.com/hyperledger/fabric/core/chaincode/shim/ext/cid" dependency

klkumar369 (Sat, 29 Dec 2018 10:12:06 GMT):
Has joined the channel.

shrek95 (Sat, 29 Dec 2018 12:15:30 GMT):
Has joined the channel.

vijaybaskar17 (Mon, 31 Dec 2018 08:35:49 GMT):
Has joined the channel.

ashlinSajan (Mon, 31 Dec 2018 09:42:31 GMT):
@dave.enyeart 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?

ashlinSajan (Mon, 31 Dec 2018 09:42:31 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?

muralisr (Mon, 31 Dec 2018 17:09:56 GMT):
@ashlinSajan what release are you using

muralisr (Mon, 31 Dec 2018 17:09:56 GMT):
@ashlinSajan is this a recent issue (ie, has it worked before ?) .. what release are you using

ashlinSajan (Tue, 01 Jan 2019 03:53:32 GMT):
@muralisr i am using 1.3 version

uboznikov (Tue, 01 Jan 2019 08:09:09 GMT):
Has joined the channel.

muralisr (Tue, 01 Jan 2019 14:28:44 GMT):
(1) assume you are using node SDK... ? (2) do you see errors on the peer ?(3) did it work before `after editing configtx.yaml` ? (4) does it work if you undo the change ? (5) what change did you make to configtx.yaml .... ?

nageshbandaru (Tue, 01 Jan 2019 20:00:08 GMT):
Has joined the channel.

saketkmr (Wed, 02 Jan 2019 07:21:04 GMT):
Has joined the channel.

saketkmr (Wed, 02 Jan 2019 07:27:31 GMT):
Hi everyone, I am new in this world and want to create chaincode using java for supply chain.

gongliaoan (Wed, 02 Jan 2019 09:01:23 GMT):
Has joined the channel.

zhilongliu (Wed, 02 Jan 2019 09:28:56 GMT):
Has joined the channel.

DeepaMotwani (Wed, 02 Jan 2019 09:29:05 GMT):
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.

rthatcher (Wed, 02 Jan 2019 11:33:12 GMT):
@DeepaMotwani - the problem is that your chaincode container cannot connect to "registry.npmjs.org:443" when it is being created - perhaps you are behind a proxy, or on some private network. If you use an `npmrc` file for other nodejs development work you need to specify this for your chaincode container - I _think_ you need to put the npmrc file in the root folder of your chaincode package, but you may need to experiment with the location of the file.

mahoney1 (Wed, 02 Jan 2019 11:58:25 GMT):
@DeepaMotwani FYI this Stack overflow answer may also be of use -> https://stackoverflow.com/questions/52354240/node-chaincode-instantiate-behind-proxy

idavidasilva (Wed, 02 Jan 2019 14:43:19 GMT):
Has joined the channel.

ShajiThiyarathodi (Wed, 02 Jan 2019 19:32:24 GMT):
Has joined the channel.

DieYoungWsn (Thu, 03 Jan 2019 08:44:16 GMT):
Has joined the channel.

xaviarias (Thu, 03 Jan 2019 11:00:10 GMT):
Has joined the channel.

mattmaru (Thu, 03 Jan 2019 13:15:12 GMT):
Hi to everyone . I'm a beginner in this world and I've a question for you. I wrote a chaincode to manage artworks and I need to bring up a REST service. Can you show me any guides ,tutorials or steps to build it?

mattmaru (Thu, 03 Jan 2019 13:19:49 GMT):
I wrote chaincode in GOLANG

irkoch (Thu, 03 Jan 2019 13:32:39 GMT):
Has joined the channel.

knagware9 (Thu, 03 Jan 2019 13:35:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Nn3vdAwCaFfvRuNJ7) @mattmaru start with this https://fabric-sdk-node.github.io/release-1.4/index.html & https://github.com/hyperledger/fabric-samples/tree/v1.4.0-rc2/balance-transfer

mattmaru (Thu, 03 Jan 2019 13:36:38 GMT):
@knagware9 is there a guide for golang sdk?

knagware9 (Thu, 03 Jan 2019 13:37:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mueNN3JGLkXkLkfxH) @mattmaru its for node sdk..if you want to use go lang sdk you can use but many fabric sample are given use node sdk

mattmaru (Thu, 03 Jan 2019 13:39:02 GMT):
It's more difficult than i imagined

inhyukseo1 (Thu, 03 Jan 2019 13:39:32 GMT):
Has joined the channel.

knagware9 (Thu, 03 Jan 2019 13:39:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=smKSTnGMTuRGaGuBT) @mattmaru try with balance-transfer example

mattmaru (Thu, 03 Jan 2019 13:41:01 GMT):
@knagware9 i will try . Thanks for the help

KellyCooper (Thu, 03 Jan 2019 14:10:25 GMT):
The Learning Materials Development working group is in need of contributors for our 2019 objectives: edX Fabric update, edX Sawtooth update, edX Iroha tutorial. At this time, over 133,000 learners have participated in the edX courses. If you, or someone you know (university student, freelance developer, researcher, etc) is interested in contributing, please see the worksheet: 2019 Team and Individual/Small Group Objectives, Key Results, Participants and Tasks - https://goo.gl/1HzKaD The worksheet has two tabs, one for contributions to the group's 2019 OKRs, and a second that notes individual contributions. Feel free to message or reply with any questions. Thank you, Kelly

Imherenow (Thu, 03 Jan 2019 18:30:27 GMT):
Has joined the channel.

inhyukseo1 (Fri, 04 Jan 2019 03:30:56 GMT):
Hello, If i wanted to reset some values on my assets, or perform calculations every 5 minutes, how can it be done? Should I send a transaction that orders such reset/calculations or is there some other way to make a certain action performed every 5 minutes ?

javapriyan (Fri, 04 Jan 2019 09:34:58 GMT):
I am developing a chaincode. Having trouble during debugging. Written a script to automate bring the network up and install the code everytime. Though I clean the previous chaincode containers , the changes are not reflected until I clean the images. Anyone had this issue ?

rthatcher (Fri, 04 Jan 2019 11:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=smA2RLWjbcSCd9GZ9) @javapriyan I have seen problems with 'old' containers and images - and also seen problems with old docker volumes that were not removed/pruned. If you are doing lots of cycles of debugging and testing and re-writing, have you seen the feature to start a peer in dev mode so that you don't get a new image/container for each iteration? `--peer-chaincodedev=true` ? There is also the IBM VSCode extansion which lets you run Smart Contracts (chaincodes) in Debug mode in VSCode.

MikeT16 (Fri, 04 Jan 2019 13:04:19 GMT):
Has joined the channel.

MikeT16 (Fri, 04 Jan 2019 13:06:08 GMT):
Hello everyone, Is there any tutorial on how to use Java chaincode with the chaincode-docker-devmode ? I know how to use it with Go but I cannot find what I have to do to use Java instead.

muralisr (Fri, 04 Jan 2019 15:00:50 GMT):
@MikeT16 I don't lknow of a turorial but the mechanics should be identical ... just as you would start the go executable with the right env vars, start the java chaincide with the same env vars

muralisr (Fri, 04 Jan 2019 15:01:05 GMT):
perhaps you have tried that and it doesn't work ?

Imherenow (Fri, 04 Jan 2019 17:42:13 GMT):
@MikeT16 https://openblockchain.readthedocs.io/en/latest/Setup/JAVAChaincode/

MikeT16 (Fri, 04 Jan 2019 18:45:07 GMT):
@muralisr I tried and it failed.. I will try with tutorial sent by @Imherenow . Thanks a lot!!!

muralisr (Fri, 04 Jan 2019 22:08:52 GMT):
sure @MikeT16 its outdated but might work, let us know (thanks @Imherenow )

Imherenow (Sat, 05 Jan 2019 14:39:29 GMT):
Welcome

AnkitGajera (Sat, 05 Jan 2019 15:09:15 GMT):
Has joined the channel.

javapriyan (Sun, 06 Jan 2019 07:42:06 GMT):
Anyone has come across this issue ? ```Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response: payload:"\n \313\313\347]\310\3621\217\322\356\0200\3416\262\033\371!W\261^\335\240\006\211\27701\300\225\030g\022\261\003\n\362\001\022\025\n\004lscc\022\r\n\013\n\005tt-cc\022\002\010\003\022\330\001\n\005tt-cc\022\316\001\032\313\001\n#\000ASSET_TYPE~ASSET_ID\000FACILITY\0000001\000\032\243\001{0001 FACILITY 225225 map[] map[name:MyCompany address:map[address_line1:AddressLine001 address_line2:AddressLine002 country:IN state:TN city:CBE zip:641015]]}\032\251\001\010\310\001\032\243\001{0001 FACILITY 225225 map[] map[name:MyCompany address:map[address_line2:AddressLine002 country:IN state:TN city:CBE zip:641015 address_line1:AddressLine001]]}\"\016\022\005tt-cc\032\0051.1.5" endorsement: ```

javapriyan (Sun, 06 Jan 2019 07:43:17 GMT):
I am running two org with two peers. I have no clue why the pay load is different from every other endorser peers ?

DerrickL (Sun, 06 Jan 2019 09:02:37 GMT):
Has joined the channel.

inhyukseo1 (Sun, 06 Jan 2019 09:11:55 GMT):
I need to do calculations on 30+ assets every 5 minutes, so in order for the chaincode to be initiated, I made a transaction

inhyukseo1 (Sun, 06 Jan 2019 09:12:15 GMT):
transaction EnergyTrade { --> Energy energy1 --> Energy energy2 --> Energy energy3 --> Energy energy4 --> Energy energy5 --> Energy energy6 --> Energy energy7 --> Energy energy8 ....................> } It goes like this. Is there some better way ?

pankajcheema (Sun, 06 Jan 2019 13:26:09 GMT):
@javapriyan do you change anything in state dB manually?

muralisr (Sun, 06 Jan 2019 16:18:32 GMT):
@javapriyan you'll see the map entries are inverted - golang maps are not orderered (`Iteration order` under https://blog.golang.org/go-maps-in-action for reference)

muralisr (Sun, 06 Jan 2019 16:18:32 GMT):
@javapriyan you'll see the map entries are inverted - golang maps are not orderered (`Iteration order` under https://blog.golang.org/go-maps-in-action for reference) ... not sure how you have organized your data structures but that would be the place to start I'd guess

rsoeldner (Sun, 06 Jan 2019 18:16:15 GMT):
Has joined the channel.

rsoeldner (Sun, 06 Jan 2019 18:16:36 GMT):
Hi, is it possible to get the enrollment id from a chaincode invoker ?

davidkel (Sun, 06 Jan 2019 18:26:22 GMT):
@inhyukseo1 This is a hyperledger composer specific question, so best to ask on the #composer channel, but this time maybe ``` transaction EnergyTrade { --> Energy[] energy } ``` would be better ?

nhrishi (Mon, 07 Jan 2019 07:46:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LWMKTuuZuxk5qxvAJ) @dave.enyeart Thanks much for sharing.

mattmaru (Mon, 07 Jan 2019 10:15:50 GMT):
Hi everyone. Do you know how can I build a REST SERVICE to use my chainconde written in go?

rthatcher (Mon, 07 Jan 2019 10:17:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ouRZSARcj8SYsRJDn) @javapriyan other users have reported this error when the Chaincode is *not installed* on all the peers.

rthatcher (Mon, 07 Jan 2019 10:36:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=B9WfQQYHRRdKZWJuB) @rsoeldner Have you seen the ClientIdentity class ? https://fabric-shim.github.io/release-1.3/fabric-shim.ClientIdentity.html I think the string returned by the getID() method will have the invoker ID.

rsoeldner (Mon, 07 Jan 2019 11:15:02 GMT):
@rthatcher thanks, but is the invoker id == enrollment id ? - Is there a fast way to develop my chaincode without recreating the docker container each time ?

javapriyan (Mon, 07 Jan 2019 11:24:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=YHY58LFGFa34doYazE) @pankajcheema Nope

javapriyan (Mon, 07 Jan 2019 11:26:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wakFg9sSg5y4oJE5v) @muralisr Okay, I will check. But I had this problem resolved when I try to add an UUID to the payload in the create method. I might be wrong, but is that suppose to be ?

javapriyan (Mon, 07 Jan 2019 11:31:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WqtHebNBTDZGYL7TZ) @rthatcher Thanks a ton. It saved my life for sure

mahoney1 (Mon, 07 Jan 2019 11:42:40 GMT):
@rsoeldner most likely the Common Name part of the identity (of the invoker) maps to the enrollment id. Have you considered chaincode dev mode https://hyperledger-fabric.readthedocs.io/en/release-1.3/peer-chaincode-devmode.html?

rsoeldner (Mon, 07 Jan 2019 11:53:35 GMT):
@mahoney1 thank you

pankajcheema (Mon, 07 Jan 2019 12:15:34 GMT):
@javapriyan any non-deterministic data in chaincode ?

javapriyan (Mon, 07 Jan 2019 12:20:19 GMT):
Yes, I just found it @pankajcheema

javapriyan (Mon, 07 Jan 2019 12:20:44 GMT):
The payload has been deliberately modified ;-)

javapriyan (Mon, 07 Jan 2019 12:21:10 GMT):
DM you the exact issue

Legiit (Mon, 07 Jan 2019 12:57:09 GMT):
How does on restart chaincode once it has been shut down

Legiit (Mon, 07 Jan 2019 12:57:09 GMT):
How does one restart chaincode once it has been shut down

rthatcher (Mon, 07 Jan 2019 13:45:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aMMEZ5WvY5c4tXJ7k) @Legiit If the Fabric has been restarted then the Chaincode container(s) will be automatically restarted the first time that you `invoke` the chaincode (submit a transaction).

Legiit (Mon, 07 Jan 2019 13:48:52 GMT):
Then it returns `Error:no valid endorsements found` @rthatcher

rthatcher (Mon, 07 Jan 2019 13:56:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=E7DJN3zp8pmuGjB67) @Legiit How are you shutting down the Fabric and how are you restarting it? Is the chaincode installed?

mattmaru (Mon, 07 Jan 2019 15:19:21 GMT):
Hello guys. Can anyone help me ? I would to build a REST service to use my chaincode. How can i do? I wrote my chaincode with GO

sstone1 (Mon, 07 Jan 2019 17:12:45 GMT):
@mattmaru you can use the Fabric SDKs (available for Node.js, Java, and Go) to write a REST server that interacts with your deployed chaincode. see https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html for a Node.js example (fabcar)

Taffies (Tue, 08 Jan 2019 03:14:33 GMT):
Hi, is there a direct way in the chaincode to return the number of query results together with the results themselves?

Taffies (Tue, 08 Jan 2019 03:16:25 GMT):
Else, what would be the best way to go around doing so?

param087 (Tue, 08 Jan 2019 05:01:37 GMT):
Has joined the channel.

mahoney1 (Tue, 08 Jan 2019 09:09:02 GMT):
@Taffies so in this example](https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L343) the results array can be found with `resultsArray.length` ?

mahoney1 (Tue, 08 Jan 2019 09:09:02 GMT):
@Taffies so [in this NodeJS chaincode example](https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L343) the results array can be found using `.length` eg with `resultsArray.length` ?

mahoney1 (Tue, 08 Jan 2019 09:09:02 GMT):
@Taffies so [in this NodeJS chaincode example](https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L343) the number of results (array) can be found using `.length` eg with `resultsArray.length` ?

AVetter (Tue, 08 Jan 2019 16:03:18 GMT):
As the type of the transaction-functions in an extended Contract class (node.js with typescript) are of type string, does it make sense to JSON.stringify an object in the client to hand it over?

rthatcher (Tue, 08 Jan 2019 17:19:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=xAzrszMWzRt932YBp) @AVetter yes - all parameters from a Client SDK app must be passed as Strings to SmartContract (chaincode) functions.

rsoeldner (Tue, 08 Jan 2019 19:11:40 GMT):
Just to make sure I understood correct, It is possible to invoke a chaincode fuction with just User credentials WITHOUT instantiating/ ... in the client side, right ?

davidkel (Tue, 08 Jan 2019 19:14:09 GMT):
@rsoeldner Chaincode must be instantiated first before you can invoke any of it's functions

rsoeldner (Tue, 08 Jan 2019 19:14:57 GMT):
@davidkel yes but a Client, just using the peer command, do I need to run it on every node talking to the network ?

davidkel (Tue, 08 Jan 2019 19:20:57 GMT):
@rsoeldner chaincode instantiation is channel wide, not a specific act for each individual peer

rsoeldner (Tue, 08 Jan 2019 19:21:12 GMT):
thanks

davidkel (Tue, 08 Jan 2019 19:22:06 GMT):
But for each endorsing peer you have on that channel, it will need to have the chaincode package installed onto it

asurirk (Tue, 08 Jan 2019 19:22:17 GMT):
Has joined the channel.

rsoeldner (Tue, 08 Jan 2019 19:22:17 GMT):
yes

rsoeldner (Tue, 08 Jan 2019 19:22:53 GMT):
just fighting against the fabric py sdk and was not 100% sure of it

davidkel (Tue, 08 Jan 2019 19:24:34 GMT):
The last time I looked at the python sdk, it was very out of date and not much activity

davidkel (Tue, 08 Jan 2019 19:24:34 GMT):
The last time I looked at the python sdk, it was very out of date and not much activity, has it started to become more active now ?

rsoeldner (Tue, 08 Jan 2019 19:27:04 GMT):
yea thanks, :P

rsoeldner (Tue, 08 Jan 2019 19:27:04 GMT):
no

rsoeldner (Tue, 08 Jan 2019 19:27:34 GMT):
more or less nothing works

dileban (Wed, 09 Jan 2019 04:20:02 GMT):
@muralisr I've reported the following issue on Jira on the correct retrieval of chaincode IDs, particularly during a chaincode-to-chaincode call. Could you kindly review and post any feedback before I start working on it? https://jira.hyperledger.org/browse/FAB-13583

WouterVanHecke (Wed, 09 Jan 2019 07:19:29 GMT):
When creating a composite key with for example version~key, how can I query on this exact combination? Can I achieve this with 'getStateByPartialCompositeKey' ?

AVetter (Wed, 09 Jan 2019 07:35:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=NPpMhoETiFrsDiczh) @rthatcher Great, thanks!

WouterVanHecke (Wed, 09 Jan 2019 12:25:22 GMT):
Composite key question. Trying to create a composite key as follows: v1~ObjectId v2~ObjectId v3~ObjectId With 3 times the same ObjectId. Creating this works I guess, the normal object is saved on the ledger, together with a seperate object with the composite key and an empty buffer. I want to query on the id and get all the versions, but when i tr to do this, I get an empty iterator: ``` export const queryWithCompositeKey = async (stub, id) => { const iterator = await stub.getStateByPartialCompositeKey(`version~id`, [id]); return compositeKeyIterator(stub, iterator); }; ``` Can someone show me what exactly I'm doing wrong and how to fix this?

raviranjan14 (Wed, 09 Jan 2019 12:44:49 GMT):
Has joined the channel.

raviranjan14 (Wed, 09 Jan 2019 12:55:56 GMT):
Hi guys. Can anyone help me with private data collection

raviranjan14 (Wed, 09 Jan 2019 12:56:17 GMT):
I have instantiated chaincode 1 with private collection of 2 organization

raviranjan14 (Wed, 09 Jan 2019 12:56:29 GMT):
now want to add 1 more organization to same collection.

raviranjan14 (Wed, 09 Jan 2019 12:57:17 GMT):
is it the right channel for this question, if not please guide me to which channel is should ask this question

mahoney1 (Wed, 09 Jan 2019 13:13:59 GMT):
@WouterVanHecke check out example in https://github.com/hyperledger/fabric-sdk-rest/blob/master/tests/input/src/marbles02/marbles_chaincode.go#L418 and https://stackoverflow.com/questions/49903780/getstatebypartialcompositekey-not-working (for additional explanation of querying by Partial composite key. This function returns an iterator which can be used to iterate over all composite keys *whose prefix matches the given partial composite key*. This function should be used/called, only for a partial composite key. For a full composite key, an `iter` with an empty response would be returned (by its very nature)

mahoney1 (Wed, 09 Jan 2019 13:13:59 GMT):
@WouterVanHecke check out example in https://github.com/hyperledger/fabric-sdk-rest/blob/master/tests/input/src/marbles02/marbles_chaincode.go#L418 and https://stackoverflow.com/questions/49903780/getstatebypartialcompositekey-not-working (for additional explanation of querying by Partial composite key. This function returns an iterator which can be used to iterate over all composite keys *whose prefix matches the given partial composite key* . This function should be used/called, only for a partial composite key. For a full composite key, an `iter` with an empty response would be returned (by its very nature)

mahoney1 (Wed, 09 Jan 2019 13:13:59 GMT):
@WouterVanHecke check out example in https://github.com/hyperledger/fabric-sdk-rest/blob/master/tests/input/src/marbles02/marbles_chaincode.go#L418 and https://stackoverflow.com/questions/49903780/getstatebypartialcompositekey-not-working (for additional explanation of querying by Partial composite key). This function returns an iterator which can be used to iterate over all composite keys *whose prefix matches the given partial composite key* . This function should be used/called, only for a partial composite key. For a full composite key, an `iter` with an empty response would be returned (by its very nature)

WouterVanHecke (Wed, 09 Jan 2019 13:20:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MD7Erp3WyZ5J5drHt) @mahoney1 I got it almost working. I created 3 composite keys, all with the same objectId, but different versions. When I query them. I get 3 times the same object :(

david-lsq (Wed, 09 Jan 2019 16:12:55 GMT):
Has joined the channel.

david-lsq (Wed, 09 Jan 2019 16:13:46 GMT):
Hi guys,

david-lsq (Wed, 09 Jan 2019 16:15:22 GMT):
I am writing a chaincode with private data and i was wondering if there is an easy way to query one kind of object across many different collections ?

david-lsq (Wed, 09 Jan 2019 16:30:33 GMT):
Or, is there a way to query for the list of collections an organization has access to ?

muralisr (Wed, 09 Jan 2019 17:58:18 GMT):
@david-lsq tagging @dave.enyeart

muralisr (Wed, 09 Jan 2019 17:58:27 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7XsFpLFpi7vBoRk5S

muralisr (Wed, 09 Jan 2019 17:58:36 GMT):
will do @dileban

levinem (Wed, 09 Jan 2019 18:23:34 GMT):
Has joined the channel.

bandreghetti (Wed, 09 Jan 2019 18:31:36 GMT):
hey guys, does anyone know what causes these error messages? https://hastebin.com/uricoyuxuq.css

dave.enyeart (Wed, 09 Jan 2019 18:49:05 GMT):
@raviranjan14 In current releases you would have to upgrade the chaincode to add a new organization to a collection

dave.enyeart (Wed, 09 Jan 2019 18:50:13 GMT):
@david-lsq SDK has API to retrieve deployed chaincodes, and has API to retrieve collection definition per chaincode

dave.enyeart (Wed, 09 Jan 2019 18:51:25 GMT):
Note that there are plans to implement dynamic collection in the future where you don't have to statically define the collections, that will help with both of your questions

muralisr (Wed, 09 Jan 2019 18:57:40 GMT):
@bandreghetti if I were to guess, I think this is due to request having timed out and releasing the request context. You probably woul see those timeout tell tale errors in peer as well ....timeout properties to control timeout - https://github.com/hyperledger/fabric/blob/release-1.4/sampleconfig/core.yaml#L493

bandreghetti (Wed, 09 Jan 2019 19:48:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3egw8F9Drd8dCd7vT) @muralisr Thank you! It was exactly it c:

firewater (Wed, 09 Jan 2019 20:11:07 GMT):
Has joined the channel.

bandreghetti (Wed, 09 Jan 2019 21:21:09 GMT):
is it possible to configure this value with a docker env variable? something like CORE_PEER_CHAINCODE_EXECUTETIMEOUT?

bandreghetti (Wed, 09 Jan 2019 21:21:09 GMT):
is it possible to configure this value with a docker env variable? something like `CORE_PEER_CHAINCODE_EXECUTETIMEOUT`?

bandreghetti (Wed, 09 Jan 2019 21:21:09 GMT):
is it possible to configure this value with a docker env variable? something like `CORE_CHAINCODE_EXECUTETIMEOUT`?

raviranjan14 (Thu, 10 Jan 2019 06:11:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4Q3twfiLS99G9Pisw) @muralisr , @dave.enyeart Please help on this

Rajatsharma (Thu, 10 Jan 2019 06:51:48 GMT):
Could anyone help me, I'm trying to add peer and organization in a running fabric network. I was facing a bit of issues could anyone suggest me any resource to refer.

rthatcher (Thu, 10 Jan 2019 10:06:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wRAQasnHwJoQqwYk9) @Rajatsharma - This is a channel for questions about the development of chaincode (smart contracts) I would suggest asking the question in a different channel - #fabric-questions or #fabric

AnirudhC (Thu, 10 Jan 2019 12:46:56 GMT):
Hi, Is it possible that peer of Organization2 can Listen to the Event raised in Oraganization1?

AnirudhC (Thu, 10 Jan 2019 12:46:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AkKwZTXxnkCWTuZgC) @sstone1 Yes. Whenever peer0 of Org2 invokes a Chaincode , Org1 peer0 should know about this and will put data on ledger. For this purpose I thought of using Chaincode events. But I am not sure how to implement Listener at Peer0.Org1 end which will listen to Chaincode event raised at Peer0.Org2 .

Renu (Thu, 10 Jan 2019 13:29:06 GMT):
Has joined the channel.

sstone1 (Thu, 10 Jan 2019 13:43:57 GMT):
@AnirudhC what kind of events? chaincode events?

muralisr (Thu, 10 Jan 2019 15:41:49 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wRAQasnHwJoQqwYk9

muralisr (Thu, 10 Jan 2019 15:44:25 GMT):
what issues are you running into ? (@rthatcher suggested channels would be appropriate but was trying to see if there are are other resources to point to)

muralisr (Thu, 10 Jan 2019 15:44:25 GMT):
what issues are you running into ? ( @rthatcher suggested channels would be appropriate but was trying to see if there are are other resources to point to)

dev-d (Thu, 10 Jan 2019 16:20:46 GMT):
Has joined the channel.

vsadriano (Thu, 10 Jan 2019 19:23:14 GMT):
Has joined the channel.

vsadriano (Thu, 10 Jan 2019 19:24:18 GMT):
Hi! Where can I get the best pratices to model an Asset for chaincodes?

Rajatsharma (Thu, 10 Jan 2019 19:30:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=G6rHzPSigKovTuGzm) @muralisr I was actually trying to do this dynamically, like building a script to add a peer in a existing Fabric network or add a new organization with peers to the network or update a channel with a new organization but was facing minor issues like older peer goes down while creating a new one. I'm figuring out some stuff but just wanted to know if there's any resource other than `eyfn.sh` that I could refer to. Because for most of the issues and work I'm referring to the documentation like `https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate`, `https://medium.com/@wahabjawed/extending-hyperledger-fabric-network-adding-a-new-peer-4f52f70a7217` So I was just asking if there's any suggestion for a source I could refer too.

Rajatsharma (Thu, 10 Jan 2019 19:41:06 GMT):
Most of the work is being done using `cryptogen extends ` and `configtxlator`. But I could not find a very good resource and even for any problem, it's a bit difficult to resolve them. So that's why was just asking over this. Because it's working fine over my network, but as I wanted to make it purely dynamic then I face some issues.

Rajatsharma (Thu, 10 Jan 2019 19:45:18 GMT):
And moreover, even If I'm able to do it. I was not able to understand that part fully. Like `cryptogen` generates certificates for all the entities in the starting but how is it able to work on a currently spawned network. How is that part really working seems to be a bit unclear.

PradeepJaligama (Thu, 10 Jan 2019 21:07:37 GMT):
Has joined the channel.

pankajcheema (Fri, 11 Jan 2019 07:26:19 GMT):
@Rajatsharma once fabric CA started working . Then is handles the rest things

pankajcheema (Fri, 11 Jan 2019 07:26:19 GMT):
@Rajatsharma once fabric CA started working . Then it handles the rest things

pankajcheema (Fri, 11 Jan 2019 07:26:19 GMT):
@Rajatsharma once fabric CA started working . Then will handle all things related to certificate

AvinashMeda (Fri, 11 Jan 2019 07:30:10 GMT):
Has joined the channel.

ashuu-gupta (Fri, 11 Jan 2019 09:54:43 GMT):
Has joined the channel.

ashuu-gupta (Fri, 11 Jan 2019 09:58:10 GMT):
Hello everyone! I have been trying to executes the passed in query string and result set is built and returned as a byte array containing the JSON result for #Hyperledger #fabric on SAP cloud platform. * Code Snipped * `func (t *Actpay) OrderQuery(stub shim.ChaincodeStubInterface, args []string) peer.Response { // "queryString" if len(args) < 1 { return shim.Error("Incorrect number of arguments. Expecting 1") } queryString := "{\"selector\":{\"Status\":\"PO_REJECTED\"}}" resultsIterator, err := stub.GetQueryResult(queryString) //fmt.Printf("ashu") fmt.Printf("\niterator:%s", resultsIterator) fmt.Printf("\nquerystring:%s",queryString) //resultsIterator, err := stub.GetQueryResult(queryString) if err != nil { return shim.Error("Unable to retrieve value") } defer resultsIterator.Close() var buffer bytes.Buffer buffer.WriteString("[") var bArrayMemberAlreadyWritten = false buffer.WriteString("1") for resultsIterator.HasNext() { buffer.WriteString("2") queryResponse, err := resultsIterator.Next() if err != nil { return shim.Error("failed") } // Add a comma before array members, suppress it for the first array member if bArrayMemberAlreadyWritten == true { buffer.WriteString(",") } buffer.WriteString("{\"Key\":") buffer.WriteString("\"") buffer.WriteString(queryResponse.Key) fmt.Printf(queryResponse.Key) buffer.WriteString("\"") buffer.WriteString(", \"Record\":") // Record is a JSON object, so we write as-is buffer.WriteString(string(queryResponse.Value)) buffer.WriteString("}") bArrayMemberAlreadyWritten = true } buffer.WriteString("]") fmt.Printf("- OrderQuery queryResult:\n%s\n", buffer.String()) return shim.Success(buffer.Bytes()) } ` After writing this code snippet from marble example, I'm still getting an empty array. Please help me out. #fabric-chaincode-dev #hyperledger #golang

p1212 (Fri, 11 Jan 2019 10:09:15 GMT):
Has joined the channel.

mahoney1 (Fri, 11 Jan 2019 10:32:04 GMT):
@ashuu-gupta couple of things come to mind: is your field defined as `Status` or .. `status` ? You refer to the marbles GO example: you should easily be able to paste in these functions (lines 541-580) from https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/go/marbles_chaincode.go#L541 and test your querystring (as these functions work :-) ) : if you still get no results, you need to check the data match (view in CouchDB?) vs what your query is trying to find. HTH.

ashuu-gupta (Fri, 11 Jan 2019 11:01:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tg96o6J3JJgei5ZxX) @mahoney1 Thank you for replying :). After using the code, i got error message as: "message": "GET_QUERY_RESULT failed: transaction ID: 35b55f6d4d96dfe45a441cd9093fb6a11d5b3bf8404d0d39f0b51751e5419e2a: json: cannot unmarshal array into Go value of type map[string]interface {}", Please help me out.

millengustavo (Fri, 11 Jan 2019 11:23:48 GMT):
Has joined the channel.

k.ramankishore (Fri, 11 Jan 2019 11:27:03 GMT):
Has joined the channel.

mahoney1 (Fri, 11 Jan 2019 11:38:30 GMT):
@ashuu-gupta not really sure (you're trying to replicate something that works in marbles sample etc), but possibly how you're escaping (from reading other threads) - have you tried `queryString := fmt.Sprintf("{\"selector\":{\"Status\":\"PO_REJECTED\"}}")` - you should look at the CouchDB and chaincode / peer container logs in docker for more information on the issue

mahoney1 (Fri, 11 Jan 2019 11:38:30 GMT):
@ashuu-gupta not really sure (you're trying to replicate something that works in marbles sample etc), but possibly how you're escaping (from reading other threads, that can cause the unmarshal issue) - have you tried `queryString := fmt.Sprintf("{\"selector\":{\"Status\":\"PO_REJECTED\"}}")` - you should look at the CouchDB and chaincode / peer container logs in docker for more information on the issue

p1212 (Fri, 11 Jan 2019 11:47:57 GMT):
HI everyone.. I am using fabcar example. I am getting(get operation) all the result using nodejs Chaincode and nodejs SDK from couchDB. But at the time of changing ownership I am facing some errors. Can anyone please help me out.. gtpl@gtpl-ThinkPad-T430s:~/Music/fabcar/fabcar$ node server.js running on port8000 Chnaging the car owner { Key: 'CAR0', owner: 'Pampa' } Store path:/home/gtpl/Music/fabcar/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 07fb8c531615c4c5bd4668ecf5cb99c3135679eabf98a1d9c97d9ed0e8e56470 Transaction proposal was good Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK" Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 12 UNIMPLEMENTED: unknown service protos.Deliver gtpl@gtpl-ThinkPad-T430s:~/Music/fabcar/fabcar$ node server.js running on port8000 Chnaging the car owner { Key: 'CAR0', owner: 'Pampa' } Store path:/home/gtpl/Music/fabcar/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 07fb8c531615c4c5bd4668ecf5cb99c3135679eabf98a1d9c97d9ed0e8e56470 Transaction proposal was good Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK" Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 12 UNIMPLEMENTED: unknown service protos.Deliver

p1212 (Fri, 11 Jan 2019 11:47:57 GMT):
HI everyone.. I am using fabcar example. I am getting(get operation) all the result using nodejs Chaincode and nodejs SDK from couchDB. But at the time of changing ownership I am facing some errors. Can anyone please help me out.. gtpl@gtpl-ThinkPad-T430s:~/Music/fabcar/fabcar$ node server.js running on port8000 Chnaging the car owner { Key: 'CAR0', owner: 'Pampa' } Store path:/home/gtpl/Music/fabcar/fabcar/hfc-key-store Successfully loaded user1 from persistence Assigning transaction_id: 07fb8c531615c4c5bd4668ecf5cb99c3135679eabf98a1d9c97d9ed0e8e56470 Transaction proposal was good Successfully sent Proposal and received ProposalResponse: Status - 200, message - "OK" Failed to invoke successfully :: Error: There was a problem with the eventhub ::Error: 12 UNIMPLEMENTED: unknown service protos.Deliver

mlohr (Fri, 11 Jan 2019 11:56:34 GMT):
Has joined the channel.

millengustavo (Fri, 11 Jan 2019 13:18:55 GMT):
when using the chaincode-docker-devmode folder from fabric-samples, do you guys have to keep go getting the shim and protos package from golang everytime you kill docker and summon docker compose up again? should i be just keeping my docker images up all the time and can I install multiple chaincode versions on machines that are already running?

millengustavo (Fri, 11 Jan 2019 13:27:15 GMT):
I guess I should be using the "peer chaincode upgrade" command, right?

mahoney1 (Fri, 11 Jan 2019 14:26:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FdyhywdZCWxsCuB2J) @millengustavo yes, keep containers running - probably best to look at the docs https://hyperledger-fabric.readthedocs.io/en/latest/peer-chaincode-devmode.html for an example of what you want to achieve in dev mode.

millengustavo (Fri, 11 Jan 2019 14:29:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jLZfqfG6pkofAiHgj) @mahoney1 the Docs don't say much about what to do when making changes to the code, by reading it you is lead to believe that you should start from scratch at each step since peer chaincode upgrade is not covered there

abhi201191 (Sun, 13 Jan 2019 17:02:17 GMT):
Has joined the channel.

AVetter (Mon, 14 Jan 2019 07:59:56 GMT):
encrypt

AVetter (Mon, 14 Jan 2019 09:16:30 GMT):
Is there a way to encrypt data via chaincode, but let only endorse the transaction by organisations who have access to the key? (As not every organisation should be able to read and therefore endorse the transaction)

AVetter (Mon, 14 Jan 2019 14:37:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9nArTZ5QFCFuqXgPX) If I understand it right it is possible to do this with the discovery service. By creating a collection with all peers that should have access and stating it in the "endorsement_hint" in the request for the transaction proposal (https://fabric-sdk-node.github.io/release-1.4/tutorial-discovery.html) Can anyone confirm this assumption?

millengustavo (Mon, 14 Jan 2019 16:34:17 GMT):
Hi guys, I'm using chaincode-docker-devmode folder for testing my chaincode quickly. I tried to implement the stub.GetHistoryForKey() function to get the timestamp and other history info about my assets, but the program is returning only the current state for the asset (like a query for getting the asset does). After researching about it I find that According the documentation, I should set core.ledger.history.enableHistoryDatabase to true. But now I don't have core.yaml file, where I should set core.ledger.history.enableHistoryDatabase?

dave.enyeart (Mon, 14 Jan 2019 16:36:58 GMT):
@millengustavo It is true by default. In fact if your call to GetHistoryForKey() returned successfully, it means it is set to true in your environment

millengustavo (Mon, 14 Jan 2019 16:41:11 GMT):
I implemented my function exactly like the marbles example, but the response I get from calling the function does not contain any timestamp info or other stuff, how can I get that?

millengustavo (Mon, 14 Jan 2019 17:28:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8LifDXMbPFaqPrjEh) my bad, I forgot to add the getHistoryForX function on my select case statement on the Invoke function. Problem solved =)

millengustavo (Mon, 14 Jan 2019 17:57:27 GMT):
Another question guys, is it possible to add attributes to identities from chaincode-docker-devmode? how can I add identities via fabric-ca-client on devmode?

AnirudhC (Mon, 14 Jan 2019 17:58:34 GMT):
Hi, Is it possibble - Whenever peer0 of Org2 invokes a Chaincode , Org1 peer0 should automatically know about this? For this purpose I thought of using Chaincode events. But I am not sure how to implement Listener at Peer0.Org1 which will listen to the Chaincode events raised at Peer0.Org2. I am using hyperledger fabric v1.2 Can anyone please help me.

AnirudhC (Mon, 14 Jan 2019 17:58:34 GMT):
Hi, Is it possible - Whenever peer0 of Org2 invokes a Chaincode , Org1 peer0 should automatically know about this? For this purpose I thought of using Chaincode events. But I am not sure how to implement Listener at Peer0.Org1 which will listen to the Chaincode events raised at Peer0.Org2. I am using hyperledger fabric v1.2 Can anyone please help me.

viktoriya (Mon, 14 Jan 2019 22:14:29 GMT):
Has joined the channel.

AvinashVazratkar (Tue, 15 Jan 2019 09:06:56 GMT):
Has joined the channel.

AvinashVazratkar (Tue, 15 Jan 2019 09:08:04 GMT):
I am implementing **Attribute based Access Control. While registering user, I have specified attributes like `fabric_ca_client.register({ enrollmentID: username, affiliation: 'org1.department1', role:'client' , attrs: [{ name: 'firstName', value: 'Mathan_sir', ecert: true }]}, admin_user);` Also specified same attribute while enrolling user like `fabric_ca_client.enroll({ enrollmentID: username, enrollmentSecret: secret, attr_reqs: [{ name: "firstName", optional: false } });` So when I tries to call chaincode function, I am not able to use these attrs which i set during user registration. Before calling chaincode function, we are verifying user first and then calling *getUserContext * function which validated user. In above scenario, I will set different attributes for different level of user and whenever they want to interact with chaincode, using their set attributes, I will restrict their access. Currently I am not able to get these attributes. How could I get these attributes user wise? Could anybody help me on this line? Any help would be appreciated.

AvinashVazratkar (Tue, 15 Jan 2019 09:08:04 GMT):
I am using node sdk

rthatcher (Tue, 15 Jan 2019 09:56:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EnDaYTQMZxXFWJvNi) @AvinashVazratkar Within the Smart Contract you should be able to use the Client Identity Class to check the ID and Attributes: https://fabric-shim.github.io/release-1.3/fabric-shim.ClientIdentity.html

jlcs (Tue, 15 Jan 2019 10:40:41 GMT):
Has joined the channel.

AvinashVazratkar (Tue, 15 Jan 2019 10:48:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=o8g7aTeTfoSQ87x5B) @rthatcher Thanks. Should I use attrs as attrs: [{ hf.name: 'firstName', hf.value: 'Mathan_sir', ecert: true }]} instead of attrs: [{ name: 'firstName', value: 'Mathan_sir', ecert: true }]}

millengustavo (Tue, 15 Jan 2019 12:55:14 GMT):
hi guys, I'm trying to cover getHistoryForKey function on my chaincode tests, but it is returning a "not implemented" error despite working properly. Isn't it implemented? https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub.GetHistoryForKey

Daka (Tue, 15 Jan 2019 13:24:35 GMT):
Has joined the channel.

jrosmith (Tue, 15 Jan 2019 13:24:48 GMT):
@millengustavo looking at the [source code](https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/mockstub.go#L291), it is not implemented in the mock shim

kevinkbc (Tue, 15 Jan 2019 13:24:48 GMT):
Has joined the channel.

millengustavo (Tue, 15 Jan 2019 13:35:30 GMT):
yeah, after asking the question I saw that at the source code. thx!

mahoney1 (Tue, 15 Jan 2019 14:02:24 GMT):
@AvinashVazratkar yes - something like ```//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 );```

dan13 (Tue, 15 Jan 2019 15:25:56 GMT):
Has joined the channel.

deenario (Wed, 16 Jan 2019 07:24:48 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/

AndresMartinezMelgar.itcl (Wed, 16 Jan 2019 08:18:22 GMT):
if i want instantiated a chaincode with the follow police and Kafka ->-P 'AND ('\'' Org1MSP.peer'\'','\''Org2MSP.peer'\'')' I need pass all orderers and theirs cafile?

mlohr (Wed, 16 Jan 2019 14:24:46 GMT):
Do I have to provide the chaincode source code to Hyperledger Fabric or can I also install and instantiate chaincode from already compiled go binaries?

akshay.lawange (Wed, 16 Jan 2019 14:57:03 GMT):
Hi, while modifying key endorsement policy for a chaincode is it compulsory to have only one key endorsement policy?

tylerwince (Wed, 16 Jan 2019 15:08:36 GMT):
Has joined the channel.

Bentipe (Wed, 16 Jan 2019 15:16:11 GMT):
hey @mlohr you have to provide the source code

mlohr (Wed, 16 Jan 2019 15:16:45 GMT):
@Bentipe, thanks for your answer! But.. why? What's the technical reason behind that?

Bentipe (Wed, 16 Jan 2019 15:18:54 GMT):
good, question, just guessing here, but it might be because of transpaency, it is supposed to be transparent the code for everibody so if you install the binaries or the jar right away this can not be audited by other peers

Bentipe (Wed, 16 Jan 2019 15:19:39 GMT):
but, I'm not part of the core team and havent asked that to them

mlohr (Wed, 16 Jan 2019 15:20:16 GMT):
So that would be more a political reason instead of technical...

Bentipe (Wed, 16 Jan 2019 15:21:03 GMT):
guess so, from my perspective there is no technical reason to do it like that

mlohr (Wed, 16 Jan 2019 15:21:57 GMT):
Any recommendations for the language to start with for chaincode development?

Bentipe (Wed, 16 Jan 2019 15:22:21 GMT):
go with go, start small and build from there

Bentipe (Wed, 16 Jan 2019 15:22:37 GMT):
the chaincodes are the "easy" part

mlohr (Wed, 16 Jan 2019 15:23:16 GMT):
Then, what's the complicated part? :D

Bentipe (Wed, 16 Jan 2019 15:23:30 GMT):
the infra and administration, at least for me

mlohr (Wed, 16 Jan 2019 15:24:44 GMT):
I started with setting up the network and understanding the components. For now I have a (hope so) pretty setup for a two company test network (with channel configured and joined). Cannot say I understood really everything, but I might have a "first insight" how things are going.

mlohr (Wed, 16 Jan 2019 15:24:53 GMT):
Now I need "action" in the ledger ;)

Daka (Wed, 16 Jan 2019 15:26:06 GMT):
A stupid question, but is no ledger to have the transactions from all channels, right ? There are only ledgers to respective channels.

Daka (Wed, 16 Jan 2019 15:26:16 GMT):
there is no *

naqvijafar91 (Wed, 16 Jan 2019 15:37:10 GMT):
Has joined the channel.

naqvijafar91 (Wed, 16 Jan 2019 15:37:41 GMT):
Hi, i have a serious issue with Identity management at the chain code level, i am building an app where people can upload their education and work exeperience documents and the educational institutes and previous companies can approve it, i have this issue in doing so: Person is a universal participant, he is not dependent on any organization, i want to give him a universal identity irrespective of organizations and msps, because he can use any organization just to connect to the network as he does not maintain any peer. Now since i am not relying on the MSP credentials inside the chaincode, how can i validate that it is the same person who has invoked a function. For example in Etherum, we can just use msg.sender as this is the user's Ethereum address and this is a universal identity. There is no import private key function in fabric-ca-client node sdk, how can a Person import his old private key when he switches organizations or uses a peer from a different organization? Please help me in understanding how to implement universal identity for participants and authentication at the chaincode level I am an experienced developer with Ethereum, this is my first project on Hyperledger Fabric, if somebody can help with this, it would be awesome i can teach Ethereum in return

rizwan92 (Wed, 16 Jan 2019 15:56:04 GMT):
while instantiating my chaincode i am getting this error ```Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "stat github.com/example_cc.go: no such file or directory```

rizwan92 (Wed, 16 Jan 2019 15:56:04 GMT):
building image: Failed to generate platform-specific docker build: Error returned from build:

muralisr (Wed, 16 Jan 2019 15:58:31 GMT):
@Daka channel <->ledger is 1 to one and chaincode queries are always with respect to a channel and hence to a ledger

muralisr (Wed, 16 Jan 2019 15:58:57 GMT):
@rizwan92 I think you are running into GOPATH issues

Daka (Wed, 16 Jan 2019 16:00:06 GMT):
@muralisr Thank you

rizwan92 (Wed, 16 Jan 2019 16:00:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DbTPoYjQawaTWHuHM) i added this line to my peer docker environment ``` - GOPATH=/opt/gopath ```

rizwan92 (Wed, 16 Jan 2019 16:05:14 GMT):
my code in gist file for more information ``` https://gist.github.com/rizwan92/b3a83e23a728d8163f2f6040fd1a98af``` and my practice repo link for more understanding ```https://github.com/rizwan92/hyperledger-fabric-practice-in-cloud```

rizwan92 (Wed, 16 Jan 2019 16:05:14 GMT):
my code in gist file for more information ```https://gist.github.com/rizwan92/b3a83e23a728d8163f2f6040fd1a98af``` and my practice repo link for more understanding ```https://github.com/rizwan92/hyperledger-fabric-practice-in-cloud```

rizwan92 (Wed, 16 Jan 2019 16:05:14 GMT):
my code in gist file for more information ```https://gist.github.com/rizwan92/b3a83e23a728d8163f2f6040fd1a98af``` and my practice repo link for more understanding ```https://github.com/rizwan92/hyperledger-fabric-practice-in-cloud```

rizwan92 (Wed, 16 Jan 2019 16:05:14 GMT):
my code in gist file for more information ```https://gist.github.com/rizwan92/b3a83e23a728d8163f2f6040fd1a98af and my practice repo link for more understanding https://github.com/rizwan92/hyperledger-fabric-practice-in-cloud```

muralisr (Wed, 16 Jan 2019 16:22:07 GMT):
@rizwan92 how are you installing the chaincode ? Given the above, I'm guessing you havd the chaincode under /opt/gopath/src/github.com

muralisr (Wed, 16 Jan 2019 16:23:18 GMT):
I'd verify the container that's initiating install has the chaincode in that location (just guessing a bit give the above information)

Daka (Wed, 16 Jan 2019 16:48:29 GMT):
@muralisr is there a paper or something about how to query the blockchain for failed transactions ?

muralisr (Wed, 16 Jan 2019 16:54:00 GMT):
@Daka the standard answer is start an event listener and look athe blocks

muralisr (Wed, 16 Jan 2019 16:54:29 GMT):
SDKs have support for event based block delivery

muralisr (Wed, 16 Jan 2019 16:57:04 GMT):
but there's a standalone eventclient sample (not sure how well it works but you can look to get an idea)

muralisr (Wed, 16 Jan 2019 16:57:07 GMT):
https://github.com/hyperledger/fabric/tree/release-1.4/examples/events/eventsclient

muralisr (Wed, 16 Jan 2019 16:59:56 GMT):
and https://github.com/hyperledger/fabric/blob/release-1.4/examples/events/eventsclient/eventsclient.go#L122 shows you how to parse blocks (doesn't give you all the details but give the hint that you can look at the protobuf and parse transactions)

muralisr (Wed, 16 Jan 2019 17:05:09 GMT):
and https://fabric-sdk-node.github.io/tutorial-channel-events.html for channel events in node SDK

rizwan92 (Wed, 16 Jan 2019 17:22:41 GMT):
building image: Failed to generate platform-specific docker build: Error returned from build:

jrosmith (Wed, 16 Jan 2019 18:45:52 GMT):
@naqvijafar91 replying with the same answer and a bit more detail here as well in case someone else has more input. Using [GetBinding](https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L319) you can bind a fabric transaction context to an external transaction context. if the users are irrespective of org, perhaps you could have an application layer in front of fabric that handles user authentication and binds this context to whichever fabric organization is processing the transaction. with this setup all of the fabric organization would need access to a global end user store

Daka (Wed, 16 Jan 2019 19:14:03 GMT):
@muralisr Thank yuo

Daka (Wed, 16 Jan 2019 19:14:03 GMT):
@muralisr Thank you

tommyjay (Wed, 16 Jan 2019 20:30:14 GMT):
Has joined the channel.

tommyjay (Wed, 16 Jan 2019 20:30:50 GMT):
how can i install 2 chaincodes on one channel wherer chaincode A passes data to B

Daka (Wed, 16 Jan 2019 20:37:32 GMT):
I am pretty sure you can install only 1 chaincode on 1 channel, however you can have a Peer being part of multiple channels and therefore multiple chaincodes

yacovm (Wed, 16 Jan 2019 20:41:30 GMT):
no, you can have as many chaincodes as you want

yacovm (Wed, 16 Jan 2019 20:41:36 GMT):
on the same channel

tommyjay (Wed, 16 Jan 2019 20:58:52 GMT):
@yacovm have you had a situation where one chaincode is duplicated? So the couchdb and functions for chaincode A are exactly the same for chaincode B when chaincode B should have a different db collection and different functions

yacovm (Wed, 16 Jan 2019 21:22:53 GMT):
just give it a different name

yacovm (Wed, 16 Jan 2019 21:23:02 GMT):
install it twice under different names

yacovm (Wed, 16 Jan 2019 21:23:04 GMT):
and instantiate it again

yacovm (Wed, 16 Jan 2019 21:23:23 GMT):
you'll have the same chaincode code, but in 2 different namespaces

tommyjay (Wed, 16 Jan 2019 21:30:09 GMT):
so `peer chaincode install ...` twice and `peer chaincode instantiate...` once? @yacovm

yacovm (Wed, 16 Jan 2019 21:33:46 GMT):
instantiate twice

yacovm (Wed, 16 Jan 2019 21:34:02 GMT):
you need to install twice to make 2 chaincodes with the same content, but different name

yacovm (Wed, 16 Jan 2019 21:34:10 GMT):
then, you instantiate each on the *same* channel

yacovm (Wed, 16 Jan 2019 21:34:27 GMT):
the result would be that you have 2 chaincodes that are of the same logic

yacovm (Wed, 16 Jan 2019 21:34:32 GMT):
i.e - same business rules

yacovm (Wed, 16 Jan 2019 21:34:38 GMT):
*but* they write to different namespace

yacovm (Wed, 16 Jan 2019 21:34:38 GMT):
*but* they write to different namespaces

tommyjay (Wed, 16 Jan 2019 21:35:21 GMT):
but in my case, the two chaincodes are different business logic. for example, chaincode A handles token transfer and chaincode B stores meta data about the transaction

yacovm (Wed, 16 Jan 2019 21:36:34 GMT):
you said one chaincode is duplicated

yacovm (Wed, 16 Jan 2019 21:36:38 GMT):
doesn't seem like it's the case

yacovm (Wed, 16 Jan 2019 21:36:48 GMT):
please clearly explain what you're trying to do...

tommyjay (Wed, 16 Jan 2019 21:40:51 GMT):
yeah i have two CCs with different biz logic. for some reason one chaincode is installed twice under different names. so even though the chaincodeId is different, the functions and couchdb collection are exactly the same

yacovm (Wed, 16 Jan 2019 21:42:22 GMT):
all right, and...?

tommyjay (Wed, 16 Jan 2019 21:46:47 GMT):
i'm trying to fix that. they are meant to be separate chaincodes. imagine two ethereum smart contracts. A does something and passes the data to B. i want to do the same thing but the functions in the installed contract B are the ones in contract A. even the couchdb collection for contract B has the data that's meant to be in contract A.

yacovm (Wed, 16 Jan 2019 21:48:33 GMT):
how are you trying to fix? what is the desired layout?

AkhilKura (Thu, 17 Jan 2019 03:56:59 GMT):
Has joined the channel.

AkhilKura (Thu, 17 Jan 2019 03:57:36 GMT):
tried creating the channel for connecting 2 peers but i am getting an error while creating channel this is the error Error on outputChannelCreateTx: 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") followed this link:::::: https://medium.com/hyperlegendary/setting-up-a-blockchain-business-network-with-hyperledger-fabric-composer-running-in-multiple-bfbe4e38b6c6

AkhilKura (Thu, 17 Jan 2019 03:57:57 GMT):

channel.png

gaijinviki (Thu, 17 Jan 2019 04:45:45 GMT):
Has joined the channel.

pterdchanakul (Thu, 17 Jan 2019 05:46:56 GMT):
Has joined the channel.

naqvijafar91 (Thu, 17 Jan 2019 06:30:30 GMT):
@jrosmith thanks again for the info, i already thought of the solution as putting all the Persons behind a single Organization, and the user authentication can be implemented within an application for that organization, but what will happen if that organization shuts down after lets say 10 years, in that case the data of all the persons would be on fabric, but since authentication for individual persons was inside a centralized database, it is gone.

naqvijafar91 (Thu, 17 Jan 2019 06:35:53 GMT):
@jrosmith in short, to summarize this problem, i want to implement a user authentication at the chaincode level irrespective of organizations, a user can obtain a certificate from any organization on the network but still has a unique id which could be confirmed by the user's private key, similar to what happens in Etherum: the user would have to keep his private key with him securely, whenever he imports the key into any organization's application, his public key is generated and he gets a certificate from the organization's CA then inside the chaincode , i derive the user's public key from the certificate and use it as the user id Would that be the correct implementation?

Rajatsharma (Thu, 17 Jan 2019 11:14:54 GMT):
Has anyone gone through the new `The Operations Service` section, I'm trying to connect to `The metrics endpoint` but even after maping the port on my machine I'm unable to access that. Could anyone help me with this ?

WouterVanHecke (Thu, 17 Jan 2019 13:05:31 GMT):
The fabric network is running correctly, but when I try to restart to peer, the chaincode doesn't work anymore. I know that the dev containers gets put down and then restarted together with the peer container. But it doesn't work anymore. When I try to invoke a function. That function is not found anymore, so I'm getting a time-out every time. Can someone help me with this problem?

lesleyannj (Thu, 17 Jan 2019 13:21:01 GMT):
Has joined the channel.

Ebrahim 5 (Thu, 17 Jan 2019 13:33:02 GMT):
Has joined the channel.

Ebrahim 5 (Thu, 17 Jan 2019 13:37:53 GMT):
fabcar

jrosmith (Thu, 17 Jan 2019 14:00:37 GMT):
@naqvijafar91 thats a good question. you can absolutely retrieve the public key from the cert in the chaincode, you can also do offline signing (end user is in control of the private key) with #fabric-sdk-node , but i don't think you can have a end user freely register with any organization and have the same private key as a signing identity. based on my understanding of the problem now, i think this is more about user management than it is about chaincode. #fabric-ca will be able to help you determine if your usecase is feasible with fabric.

jrosmith (Thu, 17 Jan 2019 14:01:57 GMT):
@WouterVanHecke please post the logs of the peer during restart and the description of your problem to #fabric-peer-endorser-committer , the issue is most likely with the peer container and not with the chaincode

jrosmith (Thu, 17 Jan 2019 14:03:50 GMT):
@AkhilKura please do not spam multiple channels with the same question. your question is not relevant to chaincode development and does not belong here.

PMoura (Thu, 17 Jan 2019 16:46:20 GMT):
Has joined the channel.

PMoura (Thu, 17 Jan 2019 16:57:07 GMT):
Hello guys. Is there any way to register a new user with the CA (issue certificate and private key) using the SDK? What I'm thinking is a way to create all the mechanisms to enroll a new user with the fabric, using my application withou the need to "someone" generate and send the certificate and private key to user manualy. Maybe I'm missing something in the documentation, but I didn't figured out how I can do this. Thanks in advance.

dan13 (Thu, 17 Jan 2019 17:33:08 GMT):
@PMoura I think you are talking about the enrollment process -- enroll using username + secret and that gets you the Enrollment object back with the certs and keys. If java, I found this useful for some direction: https://github.com/vishal3152/HyperledgerFabric-Java-Client. Probably also better Q for #fabric-sdk-java or #fabric-sdk-node depending on what you are using

TharinduSandaruwan1 (Fri, 18 Jan 2019 01:35:45 GMT):
Has joined the channel.

tahaf10 (Fri, 18 Jan 2019 03:07:34 GMT):
Can anyone please tell me what's the difference between context & contract in the latest chaincode example papernet?

KartikChauhan (Fri, 18 Jan 2019 07:56:49 GMT):
How does a user chaincode written in node.js gets installed inside a peer container even when there's node.js not installed inside it?

rthatcher (Fri, 18 Jan 2019 09:16:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sRrGsgiSGWdXwQmDw) @KartikChauhan The chaincode (smart contract) gets installed onto the peer, but when it is instantiated, a new "chaincode container" is built and started with a name like dev-mypeer1.abc.com-myexamplecontract-0.2.1-... It is this container that has Node installed in it (assuming you wrote your smart contract in Node and specified `-l node` on the install and instantiate commands.)

rthatcher (Fri, 18 Jan 2019 09:16:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sRrGsgiSGWdXwQmDw) @KartikChauhan The chaincode (smart contract) gets `installed` onto the peer, but it doesn't run there. When it is instantiated, a new "chaincode container" is built and started with a name like dev-mypeer1.abc.com-myexamplecontract-0.2.1-... It is this container that has Node installed in it (assuming you wrote your smart contract in Node and specified `-l node` on the install and instantiate commands.)

mahoney1 (Fri, 18 Jan 2019 10:20:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pqSfuCcgTrXA2dWk5) @tahaf10 The Contract interface / Class is a high level contract API (rather than having to make do with the lower level chaincode interface) for application developers to implement Smart Contracts using business logic, including methods for greater control, eg what gets executed before / after a given transaction. See https://fabric-shim.github.io/release-1.4/fabric-contract-api.Contract.html The Context class provides a high level transactional context, per transaction (execution) in your contract - this permits contracts to use their own subclass of context to add additional processing. Eg. An example would be prepping/mapping application object fields/ids to become world state composite keys

mlohr (Fri, 18 Jan 2019 10:33:03 GMT):
On "peer chaincode install" I have to provide a directory with the chaincode. Is this chaincode somehow copied to a different place using peer chaincode install?

Yair (Fri, 18 Jan 2019 11:03:07 GMT):
Has joined the channel.

Kevin-Kinyua (Fri, 18 Jan 2019 11:39:10 GMT):
Has joined the channel.

Jayakrishna.V (Fri, 18 Jan 2019 12:10:27 GMT):
Has joined the channel.

mlohr (Fri, 18 Jan 2019 13:29:39 GMT):
And, next question: I have a java gradle project with chaincode and I'm trying to instantiate it... Error: "error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "Maven build"... but actually it's a gradle project... so... what's happening here?

KartikChauhan (Fri, 18 Jan 2019 14:53:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=D6mErAcgdANHyJxLB) @rthatcher Thanks a lot for answering my question. Can you also tell what happens when instantiated chaincode is written in go? I looked inside chaincode's docker container but go wasn't installed there.

rthatcher (Fri, 18 Jan 2019 15:15:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jLzrD2gNE5qGdEEyr) @KartikChauhan I would _think_ that the chaincode container has a compiled binary version of the chaincode and so does not need the go development environment. (don't know for sure)

silliman (Fri, 18 Jan 2019 15:32:47 GMT):
yes, the core.chaincode.go.builder setting in the peer's core.yaml indicates which Docker image the chaincode images are built from and that image would have the go compiler on it @KartikChauhan @rthatcher (going by memory on that setting but eyeball the file and you should be able to find it)

Bayeed (Fri, 18 Jan 2019 16:29:07 GMT):
Hi! I have a simple node.js app which uses fabcar network. My intention is to test it with Caliper but having problems with lack of resources/documentations/tutorials on this. Can anyone help me out with some directions or suggestions? Thank you in advance.

tommyjay (Fri, 18 Jan 2019 19:41:44 GMT):
how can i call a function in chaincode B from a function in chaincode A using the nodesdk?

jrosmith (Fri, 18 Jan 2019 21:43:34 GMT):
@tommyjay the nodesdk would just call `funcA` in chaincodeA, the logic to call `funcB` in chaincodeB will exist within chaincodeA inside of `funcA` since you are attempting to do a chaincode to chaincode call. see the [documentation in the source code](https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L62)

rizwan92 (Sat, 19 Jan 2019 06:13:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7pP8ytiZWKQHmwGtm) @muralisr I am installing the chain code using node js application using fabric client library. After installation my chaincode reached to orderer node at var/hyperledger/production lication like this '''var/hyperledger/production/example_cc.go '''. When i am instantiating the chaincode i usually getting above error

rizwan92 (Sat, 19 Jan 2019 06:13:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7pP8ytiZWKQHmwGtm) @muralisr I am installing the chain code using node js application using fabric client library. After installation my chaincode reached to orderer node at var/hyperledger/production lication like this '''var/hyperledger/production/example_cc.go '''. When i am instantiating the chaincode i usually getting above error

Rajatsharma (Sat, 19 Jan 2019 06:27:52 GMT):
@muralisr @sstone1 @dave.enyeart Can anyone please help to use the `The Operations Service` section of the documentation. I wanted to use `/metrics` endpoint allows operators to utilize Prometheus. I had exposed the port in the docker-compose. And then when it was not running I made the changes and restarted the peer. Prometheus is running on the peer. But I can't access that on my machine.

Rajatsharma (Sat, 19 Jan 2019 06:27:52 GMT):
@muralisr @sstone1 @dave.enyeart Can anyone please help to use the `The Operations Service` section of the documentation. I wanted to use `/metrics` endpoint to utilize Prometheus. I had exposed the port in the docker-compose. And then when it was not running I made the changes and restarted the peer. Prometheus is running on the peer. But I can't access that on my machine.

Rajatsharma (Sat, 19 Jan 2019 06:28:03 GMT):
Can anybody please help in this.

Rajatsharma (Sat, 19 Jan 2019 06:54:15 GMT):
If I curl inside the docker container as `curl 0.0.0.0:9443/healthz` or `curl 0.0.0.0:9443/metrics`. I get an output but when I'm outside it even when port are exposed as `9443:9443` in docker container, I'm not able to get the same output. Can anybody help me with this.

Rajatsharma (Sat, 19 Jan 2019 07:01:44 GMT):
From my machine when I send a curl request `curl 0.0.0.0:9443/healthz`, I get curl: (56) Recv failure: Connection reset by peer.

Rajatsharma (Sat, 19 Jan 2019 07:01:44 GMT):
From my machine when I send a curl request `curl 0.0.0.0:9443/healthz`, I get ```curl: (56) Recv failure: Connection reset by peer```.

Rajatsharma (Sat, 19 Jan 2019 07:01:44 GMT):
From my machine when I send a curl request `curl 0.0.0.0:9443/healthz`, I get ```curl: (56) Recv failure: Connection reset by peer```

muralisr (Sat, 19 Jan 2019 12:50:36 GMT):
@Rajatsharma answered on #fabric-questions (suggest posting in one place in future)

muralisr (Sat, 19 Jan 2019 13:00:02 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=1c30322f-28b8-4594-9863-4a8f46fd69bb

muralisr (Sat, 19 Jan 2019 13:02:17 GMT):
`After installation my chaincode reached to orderer node at var/hyperledger/production` - the chaincode install process should not have anything to do with orderer. I'd go through the details of the samples in the node js SDK to make sure you are following the practices there.

Rajatsharma (Sun, 20 Jan 2019 08:59:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Tf77Eq7GAFRRoeBsX) @muralisr Thanks and I'll keep this in mind from next time.

tahaf10 (Mon, 21 Jan 2019 00:56:56 GMT):
Can someone please explain a little what the function of the ledger-apis folder and its containing code is in the papernet example of fabric 1.4?

AbhishekDudhrejia (Mon, 21 Jan 2019 05:35:43 GMT):
Has joined the channel.

AbhishekDudhrejia (Mon, 21 Jan 2019 05:44:38 GMT):
Hello everyone. I've setup a basic network using the first-network script byfn for version 1.3. After issuing a regular invoke for any peer, it takes a few seconds to reflect the change. Is it normal or is there something wrong with my configuration? Thanks.

s201003018 (Mon, 21 Jan 2019 06:24:27 GMT):
Has joined the channel.

rizwan92 (Mon, 21 Jan 2019 06:30:13 GMT):
Hm

rizwan92 (Mon, 21 Jan 2019 06:33:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=n3Q39zD2ZCJdwjSvj) @muralisr Sorry my chaincode has reached to my peers at that location. I might typed orderer by mistake . I ssh to my peer docker and looked at that location my example_cc.go file us available there of all different different version

HoneyShah (Mon, 21 Jan 2019 09:49:53 GMT):
Hello, How can we use chaincode dev mode with node js and couchdb? Is there any example for it?

HoneyShah (Mon, 21 Jan 2019 09:55:41 GMT):
Hello, While using pagination, suppose we are retrieving 10 data per page. I retrieved first 10 data and now I want directly 30-40 data (page 4) directly without retrieving 11-30 records. How can I achieve this?

bjornoj (Mon, 21 Jan 2019 12:08:33 GMT):
Has joined the channel.

joe93 (Tue, 22 Jan 2019 02:35:15 GMT):
Has joined the channel.

naqvijafar91 (Tue, 22 Jan 2019 06:53:13 GMT):
@jrosmith MspId + CertId gives you a unique id at the chaincode level: 1. What would happen if the certificate is revoked? 2. Can a user use a certificate issued from msp of org1 via org2 pair?

naqvijafar91 (Tue, 22 Jan 2019 06:53:13 GMT):
@jrosmith MspId + CertId gives you a unique id at the chaincode level: 1. What would happen if the certificate is revoked? 2. Can a user use a certificate issued from msp of org1 via org2 peer?

naqvijafar91 (Tue, 22 Jan 2019 07:10:30 GMT):
I have also asked a question on stackoverflow https://stackoverflow.com/questions/54302945/unique-id-for-a-user-across-multiple-organizations-for-acl-at-the-chaincode-leve

AvinashMeda (Tue, 22 Jan 2019 07:50:45 GMT):
hi i have an endoresement policy that needs endoresement from Org1 peer and Org2 peer I have version one of the chaincode installed on all the peers and have a state say the key is CAR0 I have a lastest version of the chaincode ( 2.0 ) installed on the peer of both the orgs peer0org1 and peer0org2 and upgraded it on the channel I created a new state CAR10 Now i updated a field of CAR0 , This transaction fails because of endoresement policy mistmatch I tried to look into the installed chaincodes on the peers and the instantiated chaincodes on the channel. This is the ouput. Get instantiated chaincodes on channel mychannel: Name: fabcar, Version: 2.0, Path: github.com/chaincode/fabcar/go/updated/, Escc: escc, Vscc: vscc Name: mycc, Version: 1.0, Path: github.com/chaincode/chaincode_example02/go/, Escc: escc, Vscc: vscc Get installed chaincodes on peer0 of org1: Name: fabcar, Version: 1.0, Path: github.com/chaincode/fabcar/go/, Id: e10b6cac04d88a1550e796c10c7fd37198426759f7e724806144dd7a22e2c4f6 Name: fabcar, Version: 2.0, Path: github.com/chaincode/fabcar/go/updated/, Id: dac6920fd86a5d144d90032c245703f580b07f0f8b8a7b757e2ff2dd943700a0 Name: mycc, Version: 1.0, Path: github.com/chaincode/chaincode_example02/go/, Id: 333a19b11063d0ade7be691f9f22c04ad369baba15660f7ae9511fd1a6488209 Get installed chaincodes on peer0 of org2: Name: fabcar, Version: 1.0, Path: github.com/chaincode/fabcar/go/, Id: e10b6cac04d88a1550e796c10c7fd37198426759f7e724806144dd7a22e2c4f6 Name: fabcar, Version: 2.0, Path: github.com/chaincode/fabcar/go/updated/, Id: dac6920fd86a5d144d90032c245703f580b07f0f8b8a7b757e2ff2dd943700a0 Name: mycc, Version: 1.0, Path: github.com/chaincode/chaincode_example02/go/, Id: 333a19b11063d0ade7be691f9f22c04ad369baba15660f7ae9511fd1a6488209

rizwan92 (Tue, 22 Jan 2019 08:18:13 GMT):
I am developing chain code using go lang. i have my doubts on writing chain code in go lang . Lets suppose if i am using some dependent go library for my chain code. For that i have to download that library in my local machine. What about in peer nodes how my go chain code file look for my dependency in peer docker

HoneyShah (Tue, 22 Jan 2019 08:20:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=JZsN4R9v2bgYsHJXp) Help please.

ycarmel (Tue, 22 Jan 2019 08:38:37 GMT):
Has joined the channel.

mlohr (Tue, 22 Jan 2019 10:44:45 GMT):
Has anybody experience with peer dev mode and Java Chaincode? For Go chaincode it works for me, but when using Java Chaincode, the peer tries to start a new container.. why?

SahithiDyavarashetti (Tue, 22 Jan 2019 11:16:50 GMT):
Has joined the channel.

SahithiDyavarashetti (Tue, 22 Jan 2019 11:16:53 GMT):
can anyone help me with this? Starting business network definition. This may take a minute... Error: Error trying to start business network. Error: Peer localhost:7051 has rejected transaction '8d53f47f01efa13c5124a019ca7bfaa83622f0ba7e043bafdded1bf388c8ffe6' with code ENDORSEMENT_POLICY_FAILURE Command failed

mlohr (Tue, 22 Jan 2019 14:20:00 GMT):
Why does hlf needs the source code for chaincode install?

Jamie (Tue, 22 Jan 2019 16:28:38 GMT):
Has joined the channel.

alokkv (Tue, 22 Jan 2019 17:10:08 GMT):
Has joined the channel.

kevinkbc (Tue, 22 Jan 2019 19:27:45 GMT):
does anyone have any tips on how to debug chaincode in go?

kevinkbc (Tue, 22 Jan 2019 19:35:35 GMT):
@rthatcher the VSCode Extension works only wth node?

trturino (Tue, 22 Jan 2019 20:23:28 GMT):
Has joined the channel.

muralisr (Tue, 22 Jan 2019 21:26:43 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cc7NJZr7KZD27o5aP

muralisr (Tue, 22 Jan 2019 21:27:08 GMT):
@mlohr the peer builds the chaincode using the install package and deploys it

muralisr (Tue, 22 Jan 2019 21:27:21 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wyynRnvdqk4s8SP6c

muralisr (Tue, 22 Jan 2019 21:31:26 GMT):
@kevinkbc ...assuming you are on 1.3 and above set the following envs on the peer (1) FABRIC_LOGGING_SPEC=DEBUG (2) CORE_VM_DOCKER_ATTACHSTDOUT=true (3) CORE_CHAINCODE_LOGGING_LEVEL=debug and (4) CORE_CHAINCODE_LOGGING_SHIM=debug

muralisr (Tue, 22 Jan 2019 21:32:02 GMT):
all chaincode logs will be sent to the peer logs in one place (you could add your own printfs in the chaincode too)

muralisr (Tue, 22 Jan 2019 21:32:53 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4kgPcoKkNeoXQLhPA

muralisr (Tue, 22 Jan 2019 21:33:24 GMT):
@mlohr perhaps check in #fabric-java-chaincode if you haven't already...

muralisr (Tue, 22 Jan 2019 21:33:59 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=m9wk2TjSKv59fNa8z

muralisr (Tue, 22 Jan 2019 21:35:52 GMT):
@HoneyShah If you don;'t using docker-compose to accomplish this you should be able to modify https://github.com/hyperledger/fabric-samples/tree/release-1.4/chaincode-docker-devmode to use couchdb

muralisr (Tue, 22 Jan 2019 21:35:52 GMT):
@HoneyShah If you don;'t mind using docker-compose to accomplish this you should be able to modify https://github.com/hyperledger/fabric-samples/tree/release-1.4/chaincode-docker-devmode to use couchdb

incarose (Wed, 23 Jan 2019 00:20:13 GMT):
Has joined the channel.

ShefaliMittal (Wed, 23 Jan 2019 06:54:34 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

SahithiDyavarashetti (Wed, 23 Jan 2019 06:56:21 GMT):
@ShefaliMittal Can u help with this error??

SahithiDyavarashetti (Wed, 23 Jan 2019 06:56:23 GMT):
Error trying to start business network. Error: Peer localhost:8051 has rejected transaction '75d176c4e6b7ee8b29c518c4ff57548a48d8492b277d5c815b848518ebd7ac63' with code ENDORSEMENT_POLICY_FAILURE

ShefaliMittal (Wed, 23 Jan 2019 06:58:40 GMT):
I am facing same endorsement policy failure error with my code

SahithiDyavarashetti (Wed, 23 Jan 2019 06:59:47 GMT):
I got the above error when i am starting the composer with the following command:``` composer network start --networkName procurement-phase --networkVersion 0.0.87 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card ```

ShefaliMittal (Wed, 23 Jan 2019 07:00:54 GMT):
I don't have idea about composer. I am running fabric locally

SahithiDyavarashetti (Wed, 23 Jan 2019 07:01:48 GMT):
When did u get the error?what is the command u have used?

ShefaliMittal (Wed, 23 Jan 2019 07:02:03 GMT):
getting error while invoking chaincode

ShefaliMittal (Wed, 23 Jan 2019 07:02:20 GMT):
used - peer chaincode invoke command

ShefaliMittal (Wed, 23 Jan 2019 07:02:47 GMT):
and my endorsement policy is set to "AND(Org1MSP.member, Org2MSP.member)

SahithiDyavarashetti (Wed, 23 Jan 2019 07:03:28 GMT):
Where can we set ENDORSEMENT policies ?Can u suggest me ?

SahithiDyavarashetti (Wed, 23 Jan 2019 07:04:36 GMT):
@ShefaliMittal

ShefaliMittal (Wed, 23 Jan 2019 07:12:16 GMT):
we do it while instantiating chaincode like this _ peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n project2 -l "golang" -v 1.0 -c '{"Args":[""]}' -P "And ('Org1MSP.member','Org2MSP.member')"

SahithiDyavarashetti (Wed, 23 Jan 2019 07:14:27 GMT):
How did u create chain code ?

SahithiDyavarashetti (Wed, 23 Jan 2019 07:17:18 GMT):
@ShefaliMittal

kevinkbc (Wed, 23 Jan 2019 13:15:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EynQ3gfgDzrdWrqqM) @muralisr I am using fabric 1.2 because I want to use the same version as the ibm cloud. Can it be done in 1.2? all these env variables are only in peer right? So I canccheck docker logs peer?

muralisr (Wed, 23 Jan 2019 14:26:11 GMT):
@kevinkbc yes, just replace FABRIC_LOGGING_SPEC=DEBUG with CORE_LOGGING_LEVEL=debug

muralisr (Wed, 23 Jan 2019 14:26:32 GMT):
(i don't think `debug` case matters...)

AvinashMeda (Wed, 23 Jan 2019 14:29:44 GMT):
I get an error like this while trying to execute a transaction on a upgraded chaincode . Any idea

AvinashMeda (Wed, 23 Jan 2019 14:29:45 GMT):
?

AvinashMeda (Wed, 23 Jan 2019 14:29:59 GMT):
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response: payload:"\n \300\200\337\016\221\024\362\203\225\021\257\"V\271\223S\016\3433M\337Q\237\372H!\222\"G\331\027,\022\224\001\n~\022d\n\006fabcar\022Z\n\n\n\004CAR0\022\002\010\004\032L\n\004CAR0\032D{\"make\":\"Toyota\",\"model\":\"Prius\",\"colour\":\"blue\",\"owner\":\"NewOwner\"}\022\026\n\004lscc\022\016\n\014\n\006fabcar\022\002\010\005\032\003\010\310\001\"\r\022\006fabcar\032\0032.0" endorsement:

muralisr (Wed, 23 Jan 2019 14:34:25 GMT):
@AvinashMeda guessing you sent proposal to two or more peers. The responses from them do not match

AvinashMeda (Wed, 23 Jan 2019 14:52:11 GMT):
@muralisr : I am sending the proposals to 2 peers. The response dumps only the first peer's response

AvinashMeda (Wed, 23 Jan 2019 14:52:27 GMT):
How do i see the resposne from both the peers

muralisr (Wed, 23 Jan 2019 15:16:40 GMT):
I don't know if turning on debugging will help (a quick glance in CLI doesn't make it seem likely). you could try turning on debug on the peer to see if there's any tell tale logs

muralisr (Wed, 23 Jan 2019 15:17:45 GMT):
on the other hand if you have downloaded fabric and built CLI yourself, its not too hard to add a debug statement to the cli to print all proposals

muralisr (Wed, 23 Jan 2019 15:18:11 GMT):
(I'm assuming you are using CLI though... going by the above output)

AvinashMeda (Wed, 23 Jan 2019 15:22:55 GMT):
@muralisr : Yes i enabled debug logs on the peer as well but it does not output the proposal .

AvinashMeda (Wed, 23 Jan 2019 15:23:22 GMT):

Clipboard - January 23, 2019 8:53 PM

AvinashMeda (Wed, 23 Jan 2019 15:23:56 GMT):
I set the logging this way``` ``` *docker exec cli peer logging setlevel endorser debug*

unlimited (Wed, 23 Jan 2019 18:08:07 GMT):
Has joined the channel.

unlimited (Wed, 23 Jan 2019 18:08:31 GMT):
Hey Gurus! I understand that the Kafka mechanism ensures transactions are stored in logical order. However is there a way to reference the transactions in chronological order, since transactions may not arrive in order submitted due to network latency?

yinkokpheng (Thu, 24 Jan 2019 08:35:54 GMT):
Has joined the channel.

HoneyShah (Thu, 24 Jan 2019 08:43:47 GMT):
I want to retrieve some data from two type of documents, based on that I will do some calculation and then I want so sort that result according to the result of that calculation. Is there any way to achieve this in fabric? Like, in sql we can have combination of required fields from multiple tables in one temp table which will be used for query.

HoneyShah (Thu, 24 Jan 2019 08:43:47 GMT):
I want to retrieve some data from two type of documents, based on that I will do some calculation and then I want so sort that result according to the result of that calculation. Is there any way to achieve this in fabric? Like, in sql we can have combination of required fields from multiple tables in one temp table which can be used for further queries.

Rajatsharma (Thu, 24 Jan 2019 09:17:43 GMT):
You could try using composite key or do that by logic. You could give this a try

Rajatsharma (Thu, 24 Jan 2019 09:17:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=XDgm6NLXiHTyWNorM) You could try using composite key or do that by logic.

Rajatsharma (Thu, 24 Jan 2019 09:19:39 GMT):
https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/node/marbles_chaincode.js

HoneyShah (Thu, 24 Jan 2019 09:26:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zx9RmoNiCGgWmawDn) @muralisr I have changed docker-compose and now I can successfully use the couchdb and it is running fine with go chaincode but I don't know about how to make it work with node js chaincode?

HoneyShah (Thu, 24 Jan 2019 09:26:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zx9RmoNiCGgWmawDn) @muralisr I have changed docker-compose and now I can successfully use the couchdb and it is running fine with go chaincode but I don't know about how to make it work with node js chaincode? Can you please help?

HoneyShah (Thu, 24 Jan 2019 09:26:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zx9RmoNiCGgWmawDn) @muralisr I have changed docker-compose and couchdb is working fine. But while instantiating node 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" ```

NitheshS (Thu, 24 Jan 2019 11:38:32 GMT):
Has joined the channel.

dave.enyeart (Thu, 24 Jan 2019 12:55:54 GMT):
@HoneyShah I suggest post to #fabric-sdk-node where the node.js experts hang out (for both sdk and chaincode)

pikvik (Thu, 24 Jan 2019 14:17:11 GMT):
Hi All . I have fabric on Kubernetes and trying to start new bna. Its getting installed but not able to start . Giving following error : ✖ Starting business network definition. This may take a minute... Error: Error trying to start business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: failed to execute transaction f2eda68137d8cd9e606f040bb28ba6689826068394aa22c8593b4ac52ed306c4: error starting container: error starting container: cannot connect to Docker endpoint Command failed

adamhardie (Thu, 24 Jan 2019 14:59:02 GMT):
hey! have been installing chaincode happily for a while now,. but have just setup a new network... When i try to instantiate a chaincode from the cli container, with the command: peer chaincode instantiate -o orderer0.company:7050 -C messagebus -n nodecode -l "golang" -v 4.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" i get this error: API error (500): Could not attach to network company-new_net: rpc error: code = NotFound desc = network company-new_net not found My question is where is company-new_net coming from? The peer is connected to a network called node_node. I have run a network called company_new_net previously; but have since changed all instances within the configuration files. So i am wondering how the chaincode script is picking that name up. Hope you can help!

jrosmith (Thu, 24 Jan 2019 15:25:49 GMT):
@adamhardie are you using binaries or docker images? run `docker images` and make sure all the old chaincode images from your previous network are cleaned

adamhardie (Thu, 24 Jan 2019 15:27:31 GMT):
images - will do

adamhardie (Thu, 24 Jan 2019 15:31:58 GMT):
hmm, cleared them down, retried using chaincode install / instantiate

adamhardie (Thu, 24 Jan 2019 15:32:00 GMT):
and same issue..

adamhardie (Thu, 24 Jan 2019 15:44:06 GMT):
going to tear down all the containers and clear images

adamhardie (Thu, 24 Jan 2019 15:44:16 GMT):
seems there may be an old configuration lurking

adamhardie (Thu, 24 Jan 2019 15:58:03 GMT):
i cleared services, images, volumes, networks,

adamhardie (Thu, 24 Jan 2019 15:58:19 GMT):
brought all back up and API error (500): Could not attach to network company_new_net: rpc error: code = NotFound desc = network company_new_net not found

Rajatsharma (Thu, 24 Jan 2019 16:03:59 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 ??

allanlee2019 (Thu, 24 Jan 2019 17:13:09 GMT):
Has joined the channel.

jrosmith (Thu, 24 Jan 2019 18:16:53 GMT):
@adamhardie hmm. strange issue. try checking with #fabric-peer-endorser-committer , they may have better info for you

Moolkothari (Thu, 24 Jan 2019 18:59:46 GMT):
Has joined the channel.

bajwa (Thu, 24 Jan 2019 19:00:27 GMT):
Has joined the channel.

tommyjay (Fri, 25 Jan 2019 14:54:16 GMT):
my network times out every 12 minutes or so and i'm not able to query or make proposals after that unless i restart my backend. is this common?

adamhardie (Fri, 25 Jan 2019 16:57:33 GMT):
i fixed my network name issue .. my mistake

adamhardie (Fri, 25 Jan 2019 16:57:44 GMT):
when i try to instanitate cc now. i get Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode gmex:1.0 for transaction

adamhardie (Fri, 25 Jan 2019 17:00:48 GMT):
seems some error when creating the peer container . in peer logs i can see the container being created, then 2b8425631183040c660149a87f0445fd567d4760a1f5910298e26469ac63e1b1 : Exiting

adamhardie (Fri, 25 Jan 2019 17:00:48 GMT):
seems some error when creating the peer container . in peer logs i can see the container being created, then the same log "stopping due to error while launching: timeout expired while starting chaincode gmex:1.0 for transaction"

Moolkothari (Sat, 26 Jan 2019 12:29:03 GMT):
Hello guy I have install chiancode written in Go , I can instantiate , invoke the chaincode using CLI, it is working fine, How I can create REST APIs for all the operations I am doing in chiancode, can anybody assist me?

Moolkothari (Sat, 26 Jan 2019 12:29:03 GMT):
Hello guy I have installed chiancode written in Go , I can instantiate , invoke the chaincode using CLI, it is working fine, How I can create REST APIs for all the operations I am doing in chiancode, can anybody assist me?

bh4rtp (Sun, 27 Jan 2019 03:22:17 GMT):
hi, how to build docker image `fabric-nodeevn`?

bh4rtp (Sun, 27 Jan 2019 03:22:17 GMT):
hi, how to build docker image `fabric-nodeenv`?

khudeja (Sun, 27 Jan 2019 07:25:14 GMT):
Has joined the channel.

lip-inagora (Mon, 28 Jan 2019 00:21:33 GMT):
Has joined the channel.

satyarth1 (Mon, 28 Jan 2019 11:33:42 GMT):
Has joined the channel.

satyarth1 (Mon, 28 Jan 2019 11:34:38 GMT):

i am getting this error when i run this command "$ ./byfn.sh -m up" on my terminal for Creating first network can anyone help me for get remove this type of errorScreenshot from 2019-01-28 16-40-04.png

SahithiDyavarashetti (Mon, 28 Jan 2019 11:35:20 GMT):
check your docker .yaml file @satyarth1

satyarth1 (Mon, 28 Jan 2019 11:36:36 GMT):
ok i,ll check @SahithiDyavarashetti

SahithiDyavarashetti (Mon, 28 Jan 2019 11:37:46 GMT):
docker-compose-cli.yaml @satyarth1

SahithiDyavarashetti (Mon, 28 Jan 2019 11:38:20 GMT):
Can u tell me what are you trying to do?

satyarth1 (Mon, 28 Jan 2019 11:55:29 GMT):
i just try to check my chaincode with the help of this fabric-sample project

satyarth1 (Mon, 28 Jan 2019 11:57:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pyxRFB95eoKMiJtxR) @SahithiDyavarashetti

satyarth1 (Mon, 28 Jan 2019 11:58:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qnQjCmayHWYg4CLsj) can you plz tell me what shuld i check in my docker-compose-cli.yaml

KartikChauhan (Mon, 28 Jan 2019 12:26:17 GMT):
Which grafana dashboard is being used in hyperledger fabric v1.4 for analyzing metrics (https://jira.hyperledger.org/browse/FAB-12872?attachmentSortBy=dateTime)

jd232 (Mon, 28 Jan 2019 12:29:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iofYhPtwta3vS27ne) @Moolkothari Use one of the SDKS (Node, Java or GoLang). An example is available here - https://github.com/hyperledger/fabric-samples/blob/release/balance-transfer/app.js ( The balance transfer sample)

khudeja (Mon, 28 Jan 2019 13:07:44 GMT):
Hi all. I am facing an issue while working with balance-transfer fabric sample. When I try to invoke the chaincode via a rest api call using curl, it works just fine. But when I try the same using UI, my chaincode containers are exited. These are the containers which I specified for the endorsement. Can someone please help me out with this?

khudeja (Mon, 28 Jan 2019 13:09:05 GMT):

Clipboard - January 28, 2019 6:38 PM

muralisr (Mon, 28 Jan 2019 13:43:45 GMT):
@khudeja (1) what release level of code are you using ? I'd suggest cleaning up and trying with release 1.4 (2) did you change the chaincode or are you using the out of the box

muralisr (Mon, 28 Jan 2019 13:44:09 GMT):
if you still get the error need more than that stack trace : can you get the logs from both the peer and chaincode containers

p1212 (Tue, 29 Jan 2019 03:56:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WaTMdTSrwepEoc93W) @satyarth1 Kill all the docker images and containers in your system. I also got same error and issue got resolved.

p1212 (Tue, 29 Jan 2019 03:57:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EJw25RhKNYbzX2Bsn) @bh4rtp docker image will automatically build when u run docker-compose.yml file

satyarth1 (Tue, 29 Jan 2019 04:21:19 GMT):
thnx @p1212 for your advice i'll definitely try this

p1212 (Tue, 29 Jan 2019 04:23:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CBxop3L93LCkCePmv) @satyarth1 okay

satyarth1 (Tue, 29 Jan 2019 04:33:46 GMT):
@p1212 its resolve

khudeja (Tue, 29 Jan 2019 06:19:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=B58Nh5spnGJocCFia) @muralisr I was using release level 1.3. And I've written my custom chaincode. I will now try with the release 1.4. Thanks

satyarth1 (Tue, 29 Jan 2019 06:19:38 GMT):

Screenshot from 2019-01-29 10-41-55.png

khudeja (Tue, 29 Jan 2019 06:49:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6edCwXXtSZ4R5sYf9) I just tested with 1.4 , still not working with ajax API call but working with CURL.

khudeja (Tue, 29 Jan 2019 06:49:51 GMT):

Clipboard - January 29, 2019 12:19 PM

khudeja (Tue, 29 Jan 2019 06:51:01 GMT):

Clipboard - January 29, 2019 12:20 PM

khudeja (Tue, 29 Jan 2019 06:54:37 GMT):
and this error on chaincode container chaincode_custom Invoke Add product... panic: runtime error: index out of range panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x94e086] goroutine 52 [running]: github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).triggerNextState(0xc00034e840, 0x0, 0xc00034cba0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:35 +0x26 github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1.1(0xc00034e840, 0xc000187eb0, 0xc00034cba0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:247 +0x42 panic(0xadf180, 0x12fbc80) /opt/go/src/runtime/panic.go:513 +0x1b9 main.(*SimpleChaincode).addProduct(0x136d380, 0xc5cd80, 0xc0003a6000, 0xc0004e4190, 0x7, 0x7, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/example_cc/go/rolex.go:131 +0x707 main.(*SimpleChaincode).Invoke(0x136d380, 0xc5cd80, 0xc0003a6000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/example_cc/go/rolex.go:84 +0x5fe github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc00034e840, 0xc00034cba0, 0xc0004e4080) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:273 +0x4eb created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:242 +0x53

khudeja (Tue, 29 Jan 2019 06:59:58 GMT):
@muralisr It seems strange as the same chaincode is working well using CURL but not through UI. However, the issue is only with the POST call. GET requests works good.

SahithiDyavarashetti (Tue, 29 Jan 2019 08:58:47 GMT):
Can anyone help me with this error ?``` Error: Error trying to ping. Error: 2 UNKNOWN: access denied: channel [composerchannel] creator org [Org1MSP] Command failed ```

samirbalabantaray (Tue, 29 Jan 2019 09:23:12 GMT):
Has joined the channel.

mahoney1 (Tue, 29 Jan 2019 11:14:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5AQZhmdpWb69M2m2J) @SahithiDyavarashetti check your peer logs - usually down to the peer not joining the channel (check output msgs from the start up script). Might also want to check the release notes, eg. using right version of fabric images for your Composer env..

khudeja (Tue, 29 Jan 2019 11:28:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=A2oSawCz4zJmM4KkR) Please see logs https://pastebin.com/n8Zjig5q

khudeja (Tue, 29 Jan 2019 11:29:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=nPaj2TsozgoE5FJub) @muralisr

RyanGriffiths (Tue, 29 Jan 2019 15:12:31 GMT):
Has joined the channel.

RyanGriffiths (Tue, 29 Jan 2019 15:13:08 GMT):
Hi all, sorry to bother you. I've read the documentation on read-write sets but still had a couple of questions I was hoping someone could help me with? Thanks in advance! 1) Double Read - Is there protection built into Fabric against a world-state key being updated during a chaincode endorsement? As I understand it, if you were to perform a GetState on the same key twice within a single transaction, the peer could potentially have received a block and committed an update to that key in the interim. In this scenario would the peer return the latest known value each time, and what would be stored within the read-set? The documentation indicates the read-set is a unique set of keys, so would the latest version take precedent? Or would both versions be stored (resulting in it failing at commit stage). 2) Confirmation that empty reads included in the ReadSet I understand (nil, nil) is returned if you GetState on a key that doesn't exist, I'm just checking that it is also added to the ReadSet in this case. In other-words if two separate transactions read and write to a previously non-existent key, is there a versioning conflict at commit stage, or would both transactions be committed.

muralisr (Tue, 29 Jan 2019 18:01:20 GMT):
@khudeja this seems to be the most relevant part of the crash ... I'd look at `rolex.go:131` ``` 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1563 panic(0xadf0c0, 0x12fbc80) 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1564 /opt/go/src/runtime/panic.go:513 +0x1b9 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1565 main.(*SimpleChaincode).addProduct(0x136d380, 0xc5ccc0, 0xc0000f76b0, 0xc00046c390, 0x7, 0x7, 0x0, 0x0, 0x0, 0x0, ...) 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1566 /chaincode/input/src/github.com/example_cc/go/rolex.go:131 +0x64d 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1567 main.(*SimpleChaincode).Invoke(0x136d380, 0xc5ccc0, 0xc0000f76b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) 2019-01-29 11:20:57.575 UTC [peer.chaincode.dev-peer0.org1.rolex.com-mycc-v0] func2 -> INFO 1568 /chaincode/input/src/github.com/example_cc/go/rolex.go:84 +0x5fe ```

muralisr (Tue, 29 Jan 2019 18:05:34 GMT):
@RyanGriffiths turning to @manish-sethi for help with your question/

manish-sethi (Tue, 29 Jan 2019 18:05:34 GMT):
Has joined the channel.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could other problems. So, In a subsequence read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could cause other problems. So, In a subsequence read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could cause other problems. So, In a subsequent read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could cause other problems. So, In a subsequent read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could cause other problems. So, In a subsequent read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between. BTW, fabric-ledger channel is more suitable if you nay more questions similar to this.

manish-sethi (Tue, 29 Jan 2019 18:13:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eRaHjxFnwL2NH2RBt) @RyanGriffiths 1) A particular endorsement always get to see a consistant state. Else, application may get inconsistent view that could cause other problems. So, In a subsequent read in a chaincode function, you are guaranteed to recieve the previous version. In the current implementation, this is ensured by rwlock, however much efficient lock-free impl is possible. 2) Yes, a fact about the absense of a key is recorded... to prevent phantom key issue during commit. So, if a transaction observed a in GetState for a key, the transaction will be marked invalid if the key is committed by some other transaction in between. BTW, fabric-ledger channel is more suitable if you have more questions similar to this.

nordnes (Tue, 29 Jan 2019 18:57:29 GMT):
Has joined the channel.

albert.lacambra (Tue, 29 Jan 2019 20:19:49 GMT):
Hi

albert.lacambra (Tue, 29 Jan 2019 20:19:59 GMT):
I am not able to use the dev-mode any more

albert.lacambra (Tue, 29 Jan 2019 20:20:06 GMT):
since version 1.3 (1.2 not tested)

albert.lacambra (Tue, 29 Jan 2019 20:20:19 GMT):
have sent a mail to the list, but no answers :(

albert.lacambra (Tue, 29 Jan 2019 20:20:20 GMT):
https://lists.hyperledger.org/g/fabric/topic/fabric_dev_mode/29529217?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,29529217

albert.lacambra (Tue, 29 Jan 2019 20:20:33 GMT):
does anyone knows if dev mode has been changed or diabled?

albert.lacambra (Tue, 29 Jan 2019 20:20:41 GMT):
do not se any information in the documentation

albert.lacambra (Tue, 29 Jan 2019 20:20:46 GMT):
everything lookjs normal

albert.lacambra (Tue, 29 Jan 2019 20:21:31 GMT):
when deploying a new chaincode, a new container raises, but the chaincode of the developpment environment is just ignored

muralisr (Tue, 29 Jan 2019 23:33:52 GMT):
@albert.lacambra I say the emai to the mailing list .. wanted to check last weekend but couldn't

muralisr (Tue, 29 Jan 2019 23:33:52 GMT):
@albert.lacambra I saw the emai to the mailing list .. wanted to check last weekend but couldn't

muralisr (Tue, 29 Jan 2019 23:35:13 GMT):
was planning to debug as soon as I can (doesn't help much I know, just that the mail wasn't completely ignored :-) )

khudeja (Wed, 30 Jan 2019 06:30:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oyZpfeGsjrdmuEFxq) @muralisr Yes, this was the indeed the issue. I looked into the line you mentioned and thus I was able to rectify it. Thanks a lot.

albert.lacambra (Wed, 30 Jan 2019 07:08:12 GMT):
thanks @muralisr do you have a hint on which go file / interface is the chaincode mode managed? WHat I wonder is, I am the oly developer using dev mode....?

KartikChauhan (Wed, 30 Jan 2019 07:21:31 GMT):
I'm running fabric-sample/basic-network. I checked into fabric-ca-client docker container and looked for admin certificates in certificates table of fabric-ca-server.db file. The admin certificate that I found didn't match with any of the certificates present in the peer docker container. If these two certificates belong to different entities then two questions come to my mind. Why there're two admins? and if I register a new admin/user through fabric-ca-client then how will I get his certificates in peer docker container?

allenyang (Wed, 30 Jan 2019 08:18:26 GMT):
Has joined the channel.

allenyang (Wed, 30 Jan 2019 08:20:28 GMT):
Have someone use this function " getHistoryForKey(key)" to devlop nodejs chaincode?

SahithiDyavarashetti (Wed, 30 Jan 2019 09:35:06 GMT):
@allenyang it is function that represents asynchronous nature and key represents that transaction instance or reference

SahithiDyavarashetti (Wed, 30 Jan 2019 09:35:38 GMT):
Refer asynchromous functions ,promises in node js tutorial

KartikChauhan (Wed, 30 Jan 2019 10:06:12 GMT):
How can I invoke chaincode with a new user that didn't get create by command `cryptogen generate --config=./crypto-config.yml`? Do I need to send user certificates I created inside fabric-ca docker container to peer container in order to invoke chaincode with the new user?

rthatcher (Wed, 30 Jan 2019 10:20:00 GMT):
@albert.lacambra @muralisr - I used dev-mode this week with Fabric 1.4. I used the Fabcar javascript sample on the basic-network. (have not tested with go)

rthatcher (Wed, 30 Jan 2019 10:31:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=s9FLWYkxjzqPxceFK) @KartikChauhan You can use the *Fabric CA Client* to `register` new IDs, then `enrol` the new ID to get the Certificate and Key. This is the reference for the Fabric CA client - https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#fabric-ca-client and there is a #fabric-ca channel for questions about CA. Your workflow might be like this: 1. Enrol the admin user to retrieve the admin credentials (certificate/keys) in the right format 2. Using the admin credentials - register the new ID 3. Enrol the new ID to retrieve the credentials

KartikChauhan (Wed, 30 Jan 2019 10:43:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vSHmcFcnDN7kvdoRL) @rthatcher Okay I did that. But I want to invoke the chaincode with this new user in cli container. How can I do that?

adamhardie (Wed, 30 Jan 2019 10:45:43 GMT):
hi, what could be the root cause of this stacktrace when instantiating chaincode through cli please 2019-01-30 10:41:42.916 UTC [chaincode] Launch -> DEBU 1a3c39 stopping due to error while launching: timeout expired while starting chaincode company: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

RyanGriffiths (Wed, 30 Jan 2019 10:54:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BQcfBtqdKnuyNgHhR) @manish-sethi That's great. I wasn't aware of the rwlock but will look into it, that very much simplifies dealing with edge-cases in chaincode. Thank you!

Legiit (Wed, 30 Jan 2019 10:58:52 GMT):
Where do you set the chaincodeId in the chaincode? How do I know what ID is used with the new programming model?

Legiit (Wed, 30 Jan 2019 10:59:21 GMT):
I can't seem to find a reference, for ex: in commercial papers the contract is retrieved using "papercontract" but it's nowhere defined/exported as that exact name

rthatcher (Wed, 30 Jan 2019 11:09:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=yCKw5Lb6kTg2ipqdN) @KartikChauhan you could install the fabric-ca-client in the cli container and repeat the process, or you could use a mapped volume in the docker-compose.yml file so that the credentials are available in the cli container.

rthatcher (Wed, 30 Jan 2019 11:17:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pRGDuSH8Kuh2yzvgJ) @Legiit I believe it is on the Install and Instantiate command lines: docker exec cliMagnetoCorp peer chaincode install -n *papercontract* -v 0 -p /opt/gopath/src/github.com/contract -l node docker exec cliMagnetoCorp peer chaincode instantiate -n *papercontract* -v 0 -l node -c '{"Args":["org.papernet.commercialpaper:instantiate"]}' -C mychannel -P "AND ('Org1MSP.member')"

KartikChauhan (Wed, 30 Jan 2019 11:28:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pzfGSGeE73J97LubX) @rthatcher Yes, but how will I set the context of the newly created user? I mean how will I make this user invoke the chaincode? I know how to do that using fabric node.js sdk but don't know how to do this manually

Legiit (Wed, 30 Jan 2019 11:49:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ke5u9HEcEZXSYBDco) The question was where you define this name in the chaincode itself

Legiit (Wed, 30 Jan 2019 11:49:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ke5u9HEcEZXSYBDco) I am sorry, maybe my question wasn't very clear - I meant to ask where you define this name `papercontract` in the chaincode itself

Legiit (Wed, 30 Jan 2019 11:49:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ke5u9HEcEZXSYBDco) I am sorry, maybe my question wasn't very clear - I meant to ask where you define this name `papercontract` in the chaincode itself. I don't see any references inside the smart contract examples

rthatcher (Wed, 30 Jan 2019 12:03:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=JwpfFTuWZLir9ish4) @Legiit `papercontract` is not defined in the chaincode files (package.json or index.js etc) . It is defined at install/instantiate so you can start more than 1 "copy" of the exact same chaincode with a different ID. (e.g. peer chaincode install -n paperthatcher -v 0 -p /opt/gopath/src/github.com/contract -l node )

Legiit (Wed, 30 Jan 2019 12:14:23 GMT):
Okey thanks @rthatcher Because I had the following error since moving to the 1.4 programming model using TS and I didn't really knew where to look ``` 2019-01-30 12:10:43.772 UTC [endorser] SimulateProposal -> ERRO 041 [mychannel][34c30da2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode MyContract:0.5446964920099742 for transaction ```

Legiit (Wed, 30 Jan 2019 12:14:23 GMT):
Okey thanks @rthatcher Because I had the following error since moving to the 1.4 programming model using TS and I didn't really knew where to look ``` 2019-01-30 12:05:43.739 UTC [sccapi] deploySysCC -> INFO 035 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2019-01-30 12:05:43.739 UTC [endorser] callChaincode -> INFO 036 [][5a98b8ac] Exit chaincode: name:"cscc" (187ms) 2019-01-30 12:05:43.739 UTC [comm.grpc.server] 1 -> INFO 037 unary call completed {"grpc.start_time": "2019-01-30T12:05:43.551Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.30.0.1:54364", "grpc.code": "OK", "grpc.call_duration": "188.253285ms"} 2019-01-30 12:05:43.915 UTC [endorser] callChaincode -> INFO 038 [][0d6f37f4] Entry chaincode: name:"lscc" 2019-01-30 12:05:43.946 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 039 Created state database mychannel_lscc 2019-01-30 12:05:43.948 UTC [lscc] executeInstall -> INFO 03a Installed Chaincode [LBLODContract] Version [0.5446964920099742] to peer 2019-01-30 12:05:43.949 UTC [endorser] callChaincode -> INFO 03b [][0d6f37f4] Exit chaincode: name:"lscc" (34ms) 2019-01-30 12:05:43.949 UTC [comm.grpc.server] 1 -> INFO 03c unary call completed {"grpc.start_time": "2019-01-30T12:05:43.914Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.30.0.1:54366", "grpc.code": "OK", "grpc.call_duration": "34.978664ms"} 2019-01-30 12:05:43.974 UTC [endorser] callChaincode -> INFO 03d [mychannel][34c30da2] Entry chaincode: name:"lscc" 2019-01-30 12:05:49.740 UTC [gossip.election] beLeader -> INFO 03e 1167a7b6bc828266c621369df563bb607a2357c5b98c11526176e7919600c88b : Becoming a leader 2019-01-30 12:05:49.740 UTC [gossip.service] func1 -> INFO 03f Elected as a leader, starting delivery service for channel mychannel 2019-01-30 12:10:43.771 UTC [endorser] callChaincode -> INFO 040 [mychannel][34c30da2] Exit chaincode: name:"lscc" (300014ms) 2019-01-30 12:10:43.772 UTC [endorser] SimulateProposal -> ERRO 041 [mychannel][34c30da2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode MyContract:0.5446964920099742 for transaction ```

Legiit (Wed, 30 Jan 2019 12:20:22 GMT):
https://jira.hyperledger.org/browse/FAB-13471?workflowName=FAB%3A+Bug+Workflow&stepId=3

Legiit (Wed, 30 Jan 2019 12:20:26 GMT):
I seem to have this issue :P

rthatcher (Wed, 30 Jan 2019 13:14:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7JDHun92tFC2GXLqg) @KartikChauhan Answered here: https://stackoverflow.com/questions/54438328/unable-to-see-the-user-in-peer-docker-container-that-got-created-in-fabric-ca-co

diegofontgalland (Wed, 30 Jan 2019 13:27:23 GMT):
Has joined the channel.

edo3 (Wed, 30 Jan 2019 17:17:54 GMT):
Has joined the channel.

KartikChauhan (Wed, 30 Jan 2019 18:48:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=idMzJspa7JPEz9qFt) @rthatcher thank you for taking out time to answer my question

albert.lacambra (Wed, 30 Jan 2019 18:58:59 GMT):
@rthatcher that is interesting... I am using java. Is there a difference between languages?

albert.lacambra (Wed, 30 Jan 2019 18:58:59 GMT):
@rthatcher that is interesting... I am using java. Is there a difference between languages @C0rWin ?

krabradosty (Wed, 30 Jan 2019 19:31:23 GMT):
Hello. After I updated shim library and others to version 1.4, I can't instantiate Golang chaincodes, always get error. See here: https://gist.github.com/krabradosty/f1fb54698b2f240f306fe2bf764698e7 Fabric version is 1.4. Any thoughts?

muralisr (Wed, 30 Jan 2019 19:41:07 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ss2oTwTc2fWesg6m5

muralisr (Wed, 30 Jan 2019 19:46:37 GMT):
@Legiit I doubt you are running into that scenario (superficially may look the same). ... going by the stack trace I'd say the chaincode launch failed, assume during invoke ? The timeout is just a side effect of that by the peer waiting for the launch sequence to complete. You might see a chaincode container exited and retrieve logs from it to debug...

muralisr (Wed, 30 Jan 2019 19:55:06 GMT):
@krabradosty not sure what you are running into without the chaincode packaing workflow (vendoiring etc)..going by `Error returned from build: 2 "# github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/go18.go:40:6: cloneTLSConfig redeclared in this block previous declaration at chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/credentials.go:` seems there are type/namespace issues with packages.

muralisr (Wed, 30 Jan 2019 19:55:06 GMT):
@krabradosty not sure what you are running into without the chaincode packaing workflow (vendoiring etc)..going by `Error returned from build: 2 "# github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/go18.go:40:6: cloneTLSConfig redeclared in this block previous declaration at chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/credentials.go:` seems there are type/namespace issues with packages.

muralisr (Wed, 30 Jan 2019 19:55:06 GMT):
@krabradosty not sure what you are running into without the chaincode packaing workflow (vendoiring etc)..going by ```Error returned from build: 2 "# github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/go18.go:40:6: cloneTLSConfig redeclared in this block previous declaration at chaincode/input/src/github.com/coin-chaincode/vendor/google.golang.org/grpc/credentials/credentials.go:``` seems there are type/namespace issues with packages.

krabradosty (Wed, 30 Jan 2019 20:02:12 GMT):
@muralisr Yes, by I don't understand what I did wrong. I've just delete old vendor directory, executed: ``` govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid@=release-1.4 govendor fetch github.com/hyperledger/fabric/protos/peer@=release-1.4 ```

krabradosty (Wed, 30 Jan 2019 20:02:12 GMT):
@muralisr Yes, by I don't understand what I did wrong. I've just delete old vendor directory, executed: ``` govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid@=release-1.4 govendor fetch github.com/hyperledger/fabric/protos/peer@=release-1.4 govendor fetch github.com/hyperledger/fabric/core/chaincode/shim@=release-1.4 ```

krabradosty (Wed, 30 Jan 2019 20:02:12 GMT):
@muralisr Yes, but I don't understand what I did wrong. I've just delete old vendor directory, executed: ``` govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid@=release-1.4 govendor fetch github.com/hyperledger/fabric/protos/peer@=release-1.4 govendor fetch github.com/hyperledger/fabric/core/chaincode/shim@=release-1.4 ```

krabradosty (Wed, 30 Jan 2019 20:02:12 GMT):
@muralisr Yes, but I don't understand what I did wrong. I've just deleted old vendor directory, executed: ``` govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid@=release-1.4 govendor fetch github.com/hyperledger/fabric/protos/peer@=release-1.4 govendor fetch github.com/hyperledger/fabric/core/chaincode/shim@=release-1.4 ```

krabradosty (Wed, 30 Jan 2019 20:02:12 GMT):
@muralisr Yes, but I don't understand what I did wrong. I've just deleted old vendor directory and executed: ``` govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid@=release-1.4 govendor fetch github.com/hyperledger/fabric/protos/peer@=release-1.4 govendor fetch github.com/hyperledger/fabric/core/chaincode/shim@=release-1.4 ```

muralisr (Wed, 30 Jan 2019 20:09:39 GMT):
what happens (just as an experiment) when you do `govendor add +` instead ?

krabradosty (Wed, 30 Jan 2019 20:23:50 GMT):
@muralisr Nothing. I don't have this libraries in my $GOPATH

krabradosty (Wed, 30 Jan 2019 20:23:50 GMT):
@muralisr Nothing. I don't have this libraries in my $GOPATH Is it correct, that I installed chaincode libs with @=release-1.4? I also tried without any suffix.

muralisr (Wed, 30 Jan 2019 22:46:13 GMT):
@krabradosty you are probabky getting partial dependencies and getting into collision issues due to that. A quick way out ``` mkdir -p ~/fab1.4/src/github.com/hyperledger git clone https://github.com/hyperledger/fabric.git -b release-1.4 ~/fab1.4/src/github.com/hyperledger export GOPATH=:~/fab1.4 cd rm -rf vendor govendor init govendor add + ```

muralisr (Wed, 30 Jan 2019 22:46:50 GMT):
use that vendored chaincode

krabradosty (Thu, 31 Jan 2019 07:30:49 GMT):
@muralisr Not have another error: https://gist.github.com/krabradosty/f1fb54698b2f240f306fe2bf764698e7#file-chaincode_error_2-txt

krabradosty (Thu, 31 Jan 2019 07:30:49 GMT):
@muralisr Now have another error: https://gist.github.com/krabradosty/f1fb54698b2f240f306fe2bf764698e7#file-chaincode_error_2-txt

krabradosty (Thu, 31 Jan 2019 07:30:49 GMT):
@muralisr Now have another error: https://gist.github.com/krabradosty/f1fb54698b2f240f306fe2bf764698e7#file-chaincode_error_2-txt Update: If use `dep`, everything works fine. Very strange.

krabradosty (Thu, 31 Jan 2019 07:30:49 GMT):
@muralisr Now have another error: https://gist.github.com/krabradosty/f1fb54698b2f240f306fe2bf764698e7#file-chaincode_error_2-txt Update: If I use `dep`, everything works fine. Very strange.

Luxii (Thu, 31 Jan 2019 07:37:08 GMT):
Can we use protocol-buffers instead of json marshal/unmarshal ?

DavorKljajic (Thu, 31 Jan 2019 08:06:28 GMT):
I have question can we use features private data and encryption in the same NodeJs chaincode ?

dave.enyeart (Thu, 31 Jan 2019 12:27:19 GMT):
@Luxii @DavorKljajic Yes you can... the data contract is entirely up to your chaincode

dave.enyeart (Thu, 31 Jan 2019 12:27:19 GMT):
@Luxii @DavorKljajic Yes you can... the data contract is entirely up to your chaincode. You'd of course have to import your own libraries for proto and encryption.

gravity (Thu, 31 Jan 2019 12:28:47 GMT):
Hi @dave.enyeart I have a question regarding the ComposityKeys in a chaincode. How their behavior differs for CouchDB and LevelDB? are there any performance penalties in using CompositeKeys in a chaincode?

dave.enyeart (Thu, 31 Jan 2019 12:33:01 GMT):
No difference in composite key function across CouchDB and LevelDB. Composite key queries use range queries under the covers (in both CouchDB and LevelDB) and they are very performant in both since the keys are automatically organized in an index on both.

gravity (Thu, 31 Jan 2019 12:36:53 GMT):
@dave.enyeart got it, thanks

Luxii (Thu, 31 Jan 2019 12:39:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=N6aD6SAwNPBtg28Ei) @dave.enyeart Thanks, any library that you would suggest for node js sdk and golang as well ?

dave.enyeart (Thu, 31 Jan 2019 12:50:52 GMT):
See the official docs for go: https://developers.google.com/protocol-buffers/. Looks like there are third party libraries for node.js

muralisr (Thu, 31 Jan 2019 22:43:19 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=J2Y8sWRHrmzX8N8Hf

muralisr (Thu, 31 Jan 2019 22:44:49 GMT):
@krabradosty I just tried with an example that uses the `cid` and `ext` libraries using the vendoring steps I outlined and it worked using CLI commands (`peer chaincode install` and `peer chaincode instantiate` ...). So not sure what you are running into

muralisr (Thu, 31 Jan 2019 22:44:49 GMT):
@krabradosty I just tried with an example that uses the `cid` and `ext` libraries using the vendoring steps I outlined with release-1.4 and it worked using CLI commands (`peer chaincode install` and `peer chaincode instantiate` ...). So not sure what you are running into

AkhilKura (Fri, 01 Feb 2019 08:39:46 GMT):
can we define the block size in hyperledger fabric ?

knagware9 (Fri, 01 Feb 2019 09:11:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Zmi4rDtXLQkPC3t95) @AkhilKura Always ask the question in only one channel , not in all

Daniel (Fri, 01 Feb 2019 10:33:29 GMT):
Has joined the channel.

deenario (Fri, 01 Feb 2019 13:07:34 GMT):
I need some help with the chaincode. Might be very simple .

deenario (Fri, 01 Feb 2019 13:07:44 GMT):
func (t *SmartContract) queryUser(stub shim.ChaincodeStubInterface, args []string) peer.Response { // 0 // "1" if len(args) < 1 { return shim.Error("Incorrect number of arguments. Expecting 1") } username := args[0] queryString := fmt.Sprintf("{\"selector\":{\"Type\":\"user\",\"username\":\"%s\"}}", username) queryResults, err := getQueryResultForQueryString(stub, queryString) if err != nil { return shim.Error(err.Error()) } return shim.Success(queryResults) }

deenario (Fri, 01 Feb 2019 13:08:35 GMT):
This is a simple query to find a user by its username . I want to find by passing 2 arguments. username and password. Need this for a demo login please.

DavidP (Fri, 01 Feb 2019 14:54:25 GMT):
Has joined the channel.

mahoney1 (Fri, 01 Feb 2019 16:45:52 GMT):
@deenario probably something like ```username := args[0] password := args[1] queryString := fmt.Sprintf("{\"selector\":{\"Type\":\"user\",\"username\":\"%s\",\"password\":\"%s\"}}", username, password)```

Doug-K1 (Fri, 01 Feb 2019 19:08:22 GMT):
Has joined the channel.

shrek95 (Sat, 02 Feb 2019 09:01:51 GMT):
how a chain code engages with the ledger and the getstate() function in stub chain code api happens to access the ledger ??can plz someone help me on this ...

Basil-3 (Sat, 02 Feb 2019 19:13:41 GMT):
Has joined the channel.

Basil-3 (Sat, 02 Feb 2019 19:15:21 GMT):
Is there any way through which I can declare participants inside fabric chaincode while making a business network (for eg, I need to include manufacturers, shippers, wholesaleperson, etc inside chaincode alongwith few enumeration).

muralisr (Sat, 02 Feb 2019 19:18:44 GMT):
@shrek95 the ledger is not directly accessed by the chaincode. The stub APIs such as GetState are translated to a chaincode<->peer protocol over gRPC and the peer access the ledger on behalf of the chaincode.

muralisr (Sat, 02 Feb 2019 19:30:02 GMT):
@Basil-3 the chaincode is at an application layer whle the proposal is a layer below. "Participant" can mean different thibgs depending on which layer we refer to. The Proposal is sent by a "participant" who needs to be identified with an MSP which participates in the channel. This "participant" or better "member" can be accessed in the chaincode. The "participants" you refer to could be modeled using MSP id of particioating in the network. Another approach would be to have applicatuion level identities one level higher than the fabric MSP Id (ie, member of a channel will send proposal on behalf of other entities aware to the application). for example, this could be based on x509 cert of the client.For golang chaincodes https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/lib/cid is a library that provides convenient access to both the proposal and the x509 properties.

muralisr (Sat, 02 Feb 2019 19:30:02 GMT):
@Basil-3 the chaincode is at an application layer whle the proposal is a layer below. "Participant" can mean different thibgs depending on which layer we refer to. The Proposal is sent by a "participant" who needs to be identified with an MSP which participates in the channel. This "participant" (typically refer to as "member") can be accessed in the chaincode. The "participants" you refer to could be modeled using MSP id of particioating in the network. Another approach would be to have applicatuion level identities one level higher than the fabric MSP Id (ie, member of a channel will send proposal on behalf of other entities aware to the application). for example, this could be based on x509 cert of the client.For golang chaincodes https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/lib/cid is a library that provides convenient access to both the proposal and the x509 properties.

muralisr (Sat, 02 Feb 2019 19:30:02 GMT):
@Basil-3 the chaincode is at an application layer whle the proposal is a layer below. "Participant" can mean different thibgs depending on which layer we refer to. The Proposal is sent by a "participant" who needs to be identified with an MSP which participates in the channel. This "participant" (typically refer to as "member") can be accessed in the chaincode. The "participants" you refer to could be modeled using MSP id of particioating in the network. Another approach would be to have applicatuion level identities one level higher than the fabric MSP Id (ie, member of a channel will send proposal on behalf of other entities aware to the application). for example, this could be based on x509 cert of the client.For golang chaincodes https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/lib/cid is a library that provides convenient access to both the proposal and the x509 properties. The README in the cid library elaborates on the apis

Basil-3 (Sun, 03 Feb 2019 08:20:47 GMT):
@muralisr I can explain my issue by example. Like in supply chain business network, we have manufacturers, shippers, wholesaleperson, etc. So I am considering these personnels as participants in my business network with admin being the MSP. Also, I have to secure the authentication of each of these participants. So using fabric chaincode I want to solve these issues.

deenario (Sun, 03 Feb 2019 10:38:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=hZGw2txLkJWoLLZ4k) @mahoney1 No, Luck man

Mozuffer (Sun, 03 Feb 2019 10:41:53 GMT):
Has joined the channel.

Daka 1 (Sun, 03 Feb 2019 16:41:09 GMT):
Has joined the channel.

shrek95 (Sun, 03 Feb 2019 16:57:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Qv5WT6AZHe2aakQ3x) @muralisr @muralisr so which file handles the linking of stub APIs with the peer protocols over RPC ?

pikvik (Mon, 04 Feb 2019 10:09:45 GMT):
Hi All I am deploying Hyperledger fabric on Kubernetes and encountered this error : cat: /var/hyperledger/fabric-ca/msp/signcerts/cert.pem: No such file or directory command terminated with exit code 1 when is executed following command : kubectl exec -n cas $CA_POD -- cat /var/hyperledger/fabric-ca/msp/signcerts/cert.pem . I need someone to help me out how to generate msp and certs

wael (Mon, 04 Feb 2019 10:19:31 GMT):
What's the best practice to implement unit tests for fabric chaincode nodeJs 1.4 ?

dan13 (Mon, 04 Feb 2019 14:47:03 GMT):
Is there a comparison published for developing chaincode in Go, NodeJS, and Java? For the same HLF version, are the capabilities equal for all three? Basically, what reasons are there, if any, to choose one over another, other than developer choice?

mahoney1 (Mon, 04 Feb 2019 15:23:52 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

Antimttr (Mon, 04 Feb 2019 19:11:30 GMT):
Has joined the channel.

Antimttr (Mon, 04 Feb 2019 19:12:24 GMT):
I have questions regarding the difference between the smart contracts as seen in the comercial-paper demo and the channel state that houses the "balances" in the balance-transfer demo

Antimttr (Mon, 04 Feb 2019 19:12:39 GMT):
specifically why wouldnt the balance transfer demo also use smart contracts?

Antimttr (Mon, 04 Feb 2019 19:13:13 GMT):
when is it appropriate to use smart contracts as opposed to simply setting state in the channel directly like balance-transfer does?

Antimttr (Mon, 04 Feb 2019 19:18:39 GMT):
it seems like balance-transfer only uses world state in the ledger, since i cant find any instances of the Contract class being implemented in that example

Antimttr (Mon, 04 Feb 2019 19:19:58 GMT):
ahh i think i found a clue

Antimttr (Mon, 04 Feb 2019 19:20:00 GMT):
https://fabric-shim.github.io/release-1.4/index.html

Antimttr (Mon, 04 Feb 2019 19:20:22 GMT):
so balance-trasnfer uses the fabric-shim sdk to do the smart contracting

Antimttr (Mon, 04 Feb 2019 19:25:10 GMT):
hmm but theres no reference to actualy create the smart contract in balance-transfer,

Antimttr (Mon, 04 Feb 2019 19:26:03 GMT):
like there's a reference to handle the contract since thats the bit you use the shim for. but theres no reference to fabric-contract-api that actualy lets you define the smart contract

Antimttr (Mon, 04 Feb 2019 20:30:08 GMT):
ok i think i understand

Antimttr (Mon, 04 Feb 2019 20:30:32 GMT):
so balance-transfer doesnt use smart contracts per se. it only sets state in the ledger and overwrites it

rthatcher (Tue, 05 Feb 2019 10:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AuY9Bm7GTQsw2QJ3n) @Antimttr The "Commercial Paper" sample uses the "New Programming Model" from Fabric 1.4, using the `fabric-contract-api` in the Smart Contract, and using the `Gateway` class in the Client SDK program. This new programming model is sometimes called the high level programming model. The "Balance Transfer" sample does not use the New Programming Model, it uses the "traditional" model. The new model refers to Smart Contracts and the traditional model refers to chaincode - they are essentially the same thing, but the Smart Contracts have some additional constructs that make it a little easier. The New Programming Model is intended to be easier to use to allow developers to focus on business logic, but the low-level traditional api allows additional flexibility. If you wish to compare the 2 different models, the Fabcar sample has a 2 examples - "javascript" for the new model, and "javascript-low-level" for the traditional model.

Antimttr (Tue, 05 Feb 2019 15:46:17 GMT):
@rthatcher thanks for the in depth response! i was looking at the marble example and it was great, I suppose that's using the old model.

Antimttr (Tue, 05 Feb 2019 16:00:07 GMT):
it seems like the gateway interface doesnt allow direct writing and reading of state, everything has to be a contract

Basil-3 (Tue, 05 Feb 2019 20:39:34 GMT):
I have done business networks more on composer than fabric. I want to take up my whole network on fabric now. Is there a way through which I can just do that (like just knowing syntax for defining concepts, enum, participants in fabric chaincode)?

Antimttr (Tue, 05 Feb 2019 20:40:27 GMT):
I have installed a new version of my chaincode, went from v1 to v2, yet somehow im still getting error messages from v1 when i perform an invocation, what could cause this?

mahoney1 (Wed, 06 Feb 2019 09:24:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZmcCgdhnTKFNdw9Aa) @Basil-3 Probably best to look at the 'Modeling language' section of [this guide](https://davidkel.github.io/docs/Porting/TOC.html) . You could look at Typescript as opposed to Javascript for developing both your client and chaincode applications. Typescript allows you to model your data and provide compile time validation of your code. Also I'd recommend looking at the documentation, where a full [scenario is described](https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/scenario.html) and also a detailed explanation of the [sample Commercial Paper smart contract](https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/smartcontract.html) which you can download from the Github [Fabric Samples repo](https://github.com/hyperledger/fabric-samples/tree/master/commercial-paper/organization/magnetocorp/contract)

mahoney1 (Wed, 06 Feb 2019 09:30:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2kcqgqtNLWqpxyN3X) @Antimttr probably need to do a chaincode upgrade? See https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchaincode.html#peer-chaincode-upgrade-example for Fabric 1.4 - or (if looking to use for dev purposes) you could alternatively download this [free VScode extension](https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform) and use with Fabric 1.4 contracts to upgrade your smart contract more easily (see 'upgrade smart contract' in the doc link).

KartikChauhan (Wed, 06 Feb 2019 10:21:50 GMT):
Can `peer channel fetch oldest` and `peer channel fetch config` result in different content?

KartikChauhan (Wed, 06 Feb 2019 10:21:50 GMT):
Can `peer channel fetch oldest` and `peer channel fetch config` ever result in different content?

Antimttr (Wed, 06 Feb 2019 15:56:42 GMT):
@mahoney1 yeah i attempted to do upgrades but it keeps telling me that it is not properly signed

Antimttr (Wed, 06 Feb 2019 16:42:33 GMT):
Question: I am using the fabric-stub sdk, and I'm attempting to get the response into my API that was returned by my chaincode invocation. however the result that i pull out of it doesnt have that data. or either that or its encoded into the json response. How would I access that data?

Antimttr (Wed, 06 Feb 2019 16:44:07 GMT):
the results im talking about are the results from `channel.sendTransactionProposal(request);`

Antimttr (Wed, 06 Feb 2019 17:06:11 GMT):
got it, i had to utf8 decode the proposal response

HLFPOC (Wed, 06 Feb 2019 18:31:49 GMT):
Has joined the channel.

HLFPOC (Wed, 06 Feb 2019 18:32:03 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 ?

alek (Thu, 07 Feb 2019 10:32:04 GMT):
Hi guys, i have a question relating chaincode in java. It's supported since 1.3 (for gradle project only and since 1.4 also for maven) and i am wondering if there are any restrictions/ features that are not yet implemented for Java chaincode but are supported in node js and go lang. So basically the question is if would you recommend using java chaincode when going on production orrather stick with go or node js ?

mahoney1 (Thu, 07 Feb 2019 12:41:15 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)

DeepakDahiya (Thu, 07 Feb 2019 13:08:08 GMT):
Has joined the channel.

DeepakDahiya (Thu, 07 Feb 2019 13:11:59 GMT):
anyone online > I need some help

jrosmith (Thu, 07 Feb 2019 13:58:43 GMT):
@DeepakDahiya ask your question and when someone qualified to answers comes online they will answer it

Jonra1993 (Thu, 07 Feb 2019 14:32:11 GMT):
Has joined the channel.

Valansch (Thu, 07 Feb 2019 14:45:40 GMT):
Has joined the channel.

Valansch (Thu, 07 Feb 2019 14:51:48 GMT):
Hello everyone. I'm sorry to bother, but i'm stuck. I'm relatively new to fabric and I am trying to invoke a chaincode function via "peer chaincode invoke". I followed this guide: https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html?highlight=sacc#terminal-3-use-the-chaincode I have the "sacc" chaincode from the fabric-samples repo instantiated and am trying to invoke a function: namely "set" So as per the tutorial I am calling ``peer chaincode invoke -n mycc -c '{"Args":["set", "a", "20"]}' -C myc`` but i get the response "Error: endorsement failure during invoke. response: status:500 message:"Invalid invoke function name. Expecting \"invoke\" \"delete\" \"query\"" "

muralisr (Thu, 07 Feb 2019 15:59:41 GMT):
turning to @manish-sethi for help with the question @HLFPOC

muralisr (Thu, 07 Feb 2019 16:01:48 GMT):
for this one

muralisr (Thu, 07 Feb 2019 16:01:54 GMT):

Clipboard - February 7, 2019 11:01 AM

muralisr (Thu, 07 Feb 2019 16:05:37 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DeaQmeFATsQMmy4wD

muralisr (Thu, 07 Feb 2019 16:07:59 GMT):
@Valansch I assume you modifed a sample (example02 ?) and tried to deploy..... if you used the same name ("mycc" ?) you would need to delete the docker image associated with the original chaincode (or deply with a new name resulting in a new image).

Valansch (Thu, 07 Feb 2019 16:14:13 GMT):
I loaded the wrong chaincode... Yes i loaded example02, but was looking at sacc. My bad. Thanks for the help.

manish-sethi (Thu, 07 Feb 2019 16:14:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TLACYry3xXaaHd9T6) @HLFPOC If I understand your situation correctly, you care about the changes in the items that you read during the query but you don't care about the phantom reads. In other words, you want read committed isolation level as opposed to the serializable isolation level (hlf's model). Ideally, we could allow a transaction submitter to specify the isolation level per transaction and evaluate the validity/invalidity of the transaction per that option. However, this option is not there yet... In the absense of this you can do following... instead of "I am reading some value from query result", you can pass the info in the chaincode parameter about what exactly you want to read and perform a pointed reads for those instead of performing a range query. I don't know you app well but hope that this is possible.

manish-sethi (Thu, 07 Feb 2019 16:15:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=7s7hW6AhtW8EYcGe2) @muralisr Thanks Murali - replied to this

SethiSaab (Thu, 07 Feb 2019 17:22:03 GMT):
Hi Team ... getting error while executing chain code

SethiSaab (Thu, 07 Feb 2019 17:22:15 GMT):

Screenshot from 2019-02-07 22-48-08.png

SethiSaab (Thu, 07 Feb 2019 17:22:32 GMT):
i have 2 orgs ADMIN1 and USER1 for org1 and ADMIN2 USER2 for ORG2

SethiSaab (Thu, 07 Feb 2019 17:23:03 GMT):
i deployed chaincode using admin1 and admin2 .... but when i am trying to publish something i am getting this error

SethiSaab (Thu, 07 Feb 2019 17:23:16 GMT):
I have tried using both (ADMIN and USER)

mahoney1 (Thu, 07 Feb 2019 17:26:36 GMT):

Fabric Developer - Feb 7th 2019.pdf

mahoney1 (Thu, 07 Feb 2019 17:26:38 GMT):
Sharing the set of slides from today's Fabric Developer call (with links to tutorials etc)

mahoney1 (Thu, 07 Feb 2019 17:28:55 GMT):

Fabric Developer - Feb 7th 2019.pdf

MHBauer (Thu, 07 Feb 2019 17:55:10 GMT):
Has joined the channel.

plato (Thu, 07 Feb 2019 17:55:56 GMT):
Has joined the channel.

greg2git (Thu, 07 Feb 2019 17:59:01 GMT):
@mahoney1 can you share any links that go to IBM's site?

mahoney1 (Thu, 07 Feb 2019 18:00:06 GMT):
Its in the PDF (3 links) - slide 3

mahoney1 (Thu, 07 Feb 2019 18:00:06 GMT):
Its in the PDF (3 links) - slide 3 (with a description of what tutorial does what)

greg2git (Thu, 07 Feb 2019 18:01:21 GMT):
got them, thx

dan13 (Thu, 07 Feb 2019 18:19:59 GMT):
@mahoney1 thank you for that developer web conference and slide link above! very excited to see the developer productivity from the new programming model, although our plans to focus on Go chaincode seem to be obsolete for the near future :)

mahoney1 (Thu, 07 Feb 2019 18:24:30 GMT):
:thumbsup: you're welcome - thank you for joining Dan :-)

mahoney1 (Thu, 07 Feb 2019 18:24:30 GMT):
:thumbsup: you're welcome - thank you for joining @dan13 :-)

greg2git (Thu, 07 Feb 2019 19:34:49 GMT):
go is no go, for now, so to speak

zimabry (Thu, 07 Feb 2019 20:12:17 GMT):
Hi from my peer cli I did a peer chaincode invoke and it was successful with no errors in peer logs or chaincode logs. BUT I do not see it when I am on couchdb or when I query my ledger..

dave.enyeart (Thu, 07 Feb 2019 20:48:00 GMT):
@zimabry You'll have to enable debug and look at where peer commits the block:

dave.enyeart (Thu, 07 Feb 2019 20:48:03 GMT):
v1.0 to v1.3: `CORE_LOGGING_LEVEL=info:kvledger,statecouchdb,couchdb=debug peer node start` v1.4: `FABRIC_LOGGING_SPEC=info:kvledger,statecouchdb,couchdb=debug peer node start`

plato (Thu, 07 Feb 2019 21:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4rixyQojxkhoSRcvx) @dave.enyeart thanks @dave.enyeart it helps , atleast right now I figured out one of all peers can not hand shake with one org which I check and sk was the issue , I hope this resolve the other issue as well

plato (Thu, 07 Feb 2019 21:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4rixyQojxkhoSRcvx) @dave.enyeart thanks,! it helps , atleast right now I figured out one of all peers can not hand shake with one org which I check and sk was the issue , I hope this resolve the other issue as well

plato (Thu, 07 Feb 2019 21:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4rixyQojxkhoSRcvx) @dave.enyeart thanks,! it helps , atleast right now I figured out one of all peers can not hand shake with one org which I check and sk was the issue , I hope this resolve the other issue as well , this was the address TLS handshake failed with error remote error: tls: bad certificate {"server": "PeerServer", "remote address":

Valansch (Thu, 07 Feb 2019 22:47:46 GMT):
Is there a way to see what chaincode is running on what chaincode is running on a peer? I have installed my chaincode on my channel? I change my chaincode and install it, but it doesnt seem to hold, it still executes as if i never changed it. I'm using "first-network" with sacc chaincode.

waxer (Fri, 08 Feb 2019 00:04:05 GMT):
What would happen if two peers install different code as the same chaincode?

Valansch (Fri, 08 Feb 2019 00:04:49 GMT):
You get different results^^

waxer (Fri, 08 Feb 2019 00:04:56 GMT):
Does the network somehow check that the write set was generated by the same code?

waxer (Fri, 08 Feb 2019 00:08:03 GMT):
@Valansch so basically if the two codes are different but produce thr same output, then it would never be noticed?

Valansch (Fri, 08 Feb 2019 00:09:03 GMT):
I'm new to this aswell, so dont take my word for it. But how i understand it you install the chaincode on a peer, not on a channel. The "peer chaincode install" command lacks any Channel flag: https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchaincode.html#peer-chaincode-install

Valansch (Fri, 08 Feb 2019 00:09:51 GMT):
So from my understanding, yes you would not notice the chaincode being different versions if the result is the same. Please anyone correct me if im wrong.

waxer (Fri, 08 Feb 2019 00:11:03 GMT):
Umm, let's wait for an expert to check this then 😀

dan13 (Fri, 08 Feb 2019 00:52:33 GMT):
@Valansch @waxer Just a guy, but this may help? Upgrade is separate action than Install, and Upgrade does apply to a channel. https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html#upgrade

waxer (Fri, 08 Feb 2019 01:20:21 GMT):
Yes, but doesn't mention anything about checking that the new version in each peer are the same. The only thing I can imagine is that the proposal response of the peer that is signed, contains a hash of the chaincode. That way the client could see that different peers have different code of the chaincode.

satyarth1 (Fri, 08 Feb 2019 05:28:26 GMT):
hello members my query is, which fabric sdk i preferred for developing api's in golang

p1212 (Fri, 08 Feb 2019 06:38:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZGaucRE23FDb6T4S5) @satyarth1 Two types of SDKs are there in hyperledger fabric. NodeJS and JAVA

satyarth1 (Fri, 08 Feb 2019 07:12:42 GMT):
how i can make golang basic signup api with the help of hyperledger fabric ??

ShefaliMittal (Fri, 08 Feb 2019 08:26:19 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();

shiftby (Fri, 08 Feb 2019 10:38:25 GMT):
Has joined the channel.

mahoney1 (Fri, 08 Feb 2019 10:54:28 GMT):
@ShefaliMittal something like (replace with your own fcn names etc) ``` let network = await gateway.getNetwork('mychannel'); // blah blah // wait until event is received... let eventReceived, eventError; let eventPromise = new Promise((resolve, reject) => { eventReceived = resolve; eventError = reject; }) const chaincodeEventEmitter = new ChaincodeEventEmitter(network); // chaincode emitter 'included' : register an event listener with the NodeSDK await chaincodeEventEmitter.initialize(); chaincodeEventEmitter.on('ChaincodeEvent', async (event) => { console.log(event); const result = await this.contract.evaluateTransaction('queryOwner', commodity.ID); // eg event.commodity.owner = JSON.parse(result.toString('utf8')); // eg // blah blah console.log(event.commodity); eventReceived(); }); chaincodeEventEmitter.on('error', (err) => { eventError(err); }); // send transaction try { await this.contract.submitTransaction('tradeCommodity', JSON.stringify(trade)); // setEvent done in yr contract function eg ctx.stub.setEvent('tradeEvent', Buffer.from(JSON.stringify(commodity))); let event = await eventPromise; } catch(err) { console.log(err); } finally { chaincodeEventEmitter.disconnect(); } } ``` - also see also the 'Chaincode event listener' section of the docs -> https://fabric-sdk-node.github.io/tutorial-channel-events.html and you can get the client

ShefaliMittal (Fri, 08 Feb 2019 11:08:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=nbMb5TBJXCq6c6h6N) @mahoney1 thanks honey. will try and get back to you

davidkel (Fri, 08 Feb 2019 11:15:00 GMT):
@ShefaliMittal The example is taken from https://github.com/davidkel/bnaport/tree/master/trade-network/native/client-js where you will find the implementation of `ChaincodeEventEmitter` and a contrived use of it can be found in `txactions.js`. I say contrived because it is a single shot type invocation to demonstrate how it works rather than best practice of how a client application should handle chaincode events. For example the sample sets up a promise to wait for a single chaincode event and disconnects the emitter before terminating. You would only disconnect the emitter for example when you application terminates not when you have received the event.

davidkel (Fri, 08 Feb 2019 11:15:00 GMT):
@ShefaliMittal The example is taken from https://github.com/davidkel/bnaport/tree/master/trade-network/native/client-js where you will find the implementation of `ChaincodeEventEmitter` and a contrived use of it can be found in `txactions.js`. I say contrived because it is a single shot type invocation to demonstrate how it works rather than best practice of how a client application should handle chaincode events. For example the sample sets up a promise to wait for a single chaincode event and disconnects the emitter before terminating. You would only disconnect the emitter for example when your application terminates not when you have received the event.

Daka 1 (Fri, 08 Feb 2019 12:10:10 GMT):
Hello, is there any video with explanation of the gossip protocol in Fabric ?

NeelKantht (Fri, 08 Feb 2019 13:04:29 GMT):
hello all

NeelKantht (Fri, 08 Feb 2019 13:04:32 GMT):
is their any way to send json array to chaincode invoke operation?

dan13 (Fri, 08 Feb 2019 14:45:57 GMT):
@NeelKantht send it as a single arg as json?

dan13 (Fri, 08 Feb 2019 14:47:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=78Nicne64vrBPiyyk) @davidkel is there a non-contrived example you are aware of?

rthatcher (Fri, 08 Feb 2019 15:11:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=K4iGuhAwjryy4BTS4) @NeelKantht Does this help? (using the New 1.4 Programming Model: peer chaincode invoke -o localhost:7050 -C mychannel -n pmc -c '{"Args":["initLedger","{\"property1\":\"one\",\"property2\":\"two\"}"]}'

alek (Fri, 08 Feb 2019 16:24:14 GMT):
Hi Guys, is there any out of the box functionality of so called transactions in chaincode ? Let's say that there are 3 values that i wan't to put on ledger: `key1` -> `value1`, `key2` -> `value2`, `key3` -> `value3`. To add them i have to execute `chaincodeStub.put(key1, value1)`, `chaincodeStub.put(key2, value2)` , `chaincodeStub.put(key3, value3)` and business requirement is that all these values should be saved with rule "all or nothing". I mean if `key1` and `key2` will be saved successfully but issue will occur with `key3` then none of them should be saved on ledger.

silliman (Fri, 08 Feb 2019 16:44:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=r7wTKnf8bB8C5yrhA) @alek If you expect to add or update those three keys in three separate transactions, then no, but if you add or update the three keys in a single transaction, then yes, this is "out of the box", and unavoidable, that either all three will be added or none of them will be added.

alek (Fri, 08 Feb 2019 17:02:02 GMT):
@silliman thanks for the answer, but looking into shim interface, i can't find possibility to wrap all of these 3 operations in on transaction, `void putStringState(String key, String value)` just give you possibility of adding only one key

alek (Fri, 08 Feb 2019 17:02:02 GMT):
@silliman thanks for the answer, but looking into shim interface, i can't find possibility to wrap all of these 2 operations in on transaction, `void putStringState(String key, String value)` just give you possibility of adding only one key

silliman (Fri, 08 Feb 2019 17:07:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=F75D5ZDMY3gDsxctL) @alek what if you put three calls to `putStringState()` in a single transaction invocation?

alek (Fri, 08 Feb 2019 17:14:21 GMT):
@silliman , because i coudn't find anything like transaction in shim. Once line `stub.putStringState(key1, value1)` will execute successfuly, data will be saved on blockchain. If in next line `stub.putStringState(key2, value2)` will fail, `key1` will be saved anyway. That's the issue that i am trying to overcome and can't just wrap it in transaction like with database operations

alek (Fri, 08 Feb 2019 17:14:21 GMT):
because i coudn't find anything like transaction in shim. Once line `stub.putStringState(key1, value1)` will execute successfuly, data will be saved on blockchain. If in next line `stub.putStringState(key2, value2)` will fail, `key1` will be saved anyway. That's the issue that i am trying to overcome and can't just wrap it in transaction like with database operations

dave.enyeart (Fri, 08 Feb 2019 18:19:27 GMT):
@alek When you PutState() in chaincode it doesn't write to the ledger at that time. The chaincode execution produces a set of proposed writes in a single transaction, which is then submitted for ordering, validation, and commit. The commit is atomic such that all writes from a valid transaction are made at the same time. See the transaction flow doc: https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html and for more details: https://hyperledger-fabric.readthedocs.io/en/latest/peers/peers.html#phase-1-proposal

circlespainter (Sat, 09 Feb 2019 10:27:50 GMT):
Has joined the channel.

muralisr (Sat, 09 Feb 2019 13:20:54 GMT):
@alek to add to what @silliman and @dave.enyeart said above, part of the confustion I think is the use of the word `transaction`... you'll send a proposal to the chaincode, execute three PutStates. The result of that operation (ie, response to the proposal or "ProposalResponse") will be part of a _single_ transaction sent to the ledger for commit (and here's the actual meaning of "transaction" in fabric context).Can you read back the comments with that definition transaction and see if that helps please ?

HLFPOC (Sat, 09 Feb 2019 15:22:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aSuuDM2XmWRThce3P) @manish-sethi I am doing a range query for calculating the aggregate of all the deltas (have created composite key) and after getting the final value, comparing it with transaction value and after comparing, again creating a new composite key and putting in ledger. Now in case of concurrent transactions, I am facing phantom read issue as the result set in range query can be different during the execution and validation phase. I am not able to relate this statement in my scenario: `pass the info in the chaincode parameter about what exactly you want to read and perform a pointed reads for those instead of performing a range query`. Even for storing the value in chaincode param, I will have do perform range query to get the value from ledger. So can you please guide me how to handle such scenarios ?

HLFPOC (Sat, 09 Feb 2019 15:22:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=aSuuDM2XmWRThce3P) @manish-sethi I am doing a range query for calculating the aggregate of all the deltas (have created composite key) and after getting the final value, comparing it with transaction value and after comparing, again creating a new composite key and putting in ledger. Now in case of concurrent transactions, I am facing phantom read issue as the result set in range query can be different during the execution and validation phase. I am not able to relate this statement in my scenario: `pass the info in the chaincode parameter about what exactly you want to read and perform a pointed reads for those instead of performing a range query`. Even for storing the value in chaincode param, I will have to perform range query to get the value from ledger. So can you please guide me how to handle such scenarios ?

levanto (Sat, 09 Feb 2019 21:03:31 GMT):
Has joined the channel.

haardikkk (Sun, 10 Feb 2019 05:12:12 GMT):
Has joined the channel.

Rosan (Mon, 11 Feb 2019 06:20:37 GMT):
Hi all, Is it possible to promote an application user's role to be able to do the chaincode operations (install and instantiate) like as admin user do? Thank you very much!

alek (Mon, 11 Feb 2019 09:56:12 GMT):
@silliman @dave.enyeart @muralisr thank you guys for your responses. I am quite familiar with transaction flow and if i understood you correctly, all three `putState` operations will create on transaction. But the question is what factor determines that all of these operations will be part of exact ONE transactions proposal send to endorsing peers ? Please look into diagram that i created, looking into these operations i am wondering about some edge cases: 1. How many operations will be part of one transaction proposal send to endorsers assuming that N is rather a large number 2. How many operations will be part of one transaction proposal send to endorsers assuming that values that were added to ledger will be a large file and it will take some time to add them 3. How many operations will be part of one transaction proposal when we execute "putState" N- times, then we execute some business logic and then again start updating ledger, will that be part of one transaction ?

alek (Mon, 11 Feb 2019 09:56:34 GMT):

transactions.jpg

mahoney1 (Mon, 11 Feb 2019 11:43:49 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

dave.enyeart (Mon, 11 Feb 2019 12:55:16 GMT):
@alek It doesn't matter how many PutStates() your chaincode executes... each chaincode invocation will result in one transaction. The chaincode logic determines how many PutStates() will occur in this transaction.

dave.enyeart (Mon, 11 Feb 2019 12:55:16 GMT):
@alek It doesn't matter how many PutStates() your chaincode executes... each chaincode invocation will result in exactly one transaction. The chaincode logic determines how many PutStates() will occur in this transaction. It doesn't matter if the PutStates() are before, in the middle, or after other business logic.

alek (Mon, 11 Feb 2019 13:02:12 GMT):
@dave.enyeart so each `invoke` method execution construct one transaction. is that correct ?

dave.enyeart (Mon, 11 Feb 2019 13:06:37 GMT):
right

alek (Mon, 11 Feb 2019 13:18:26 GMT):
got it, Thanks @dave.enyeart !

r_vishal95 (Mon, 11 Feb 2019 17:31:29 GMT):
Has joined the channel.

SatoshiNishishita (Tue, 12 Feb 2019 04:59:10 GMT):
Has joined the channel.

JonathanC (Tue, 12 Feb 2019 10:09:34 GMT):
Want to write your first Hyperledger Fabric Chaincode (v1.4) using Node, Babel, Model/Controller and Testing it using Mocha ? I just wrote an article detailing the process from the beginning based on a project we are currently working at my company. https://medium.com/@jojoooo/write-your-first-hyperledger-fabric-1-4-chaincode-bab3c484c35a

oborovyk (Tue, 12 Feb 2019 12:24:43 GMT):
Has joined the channel.

saketkmr (Tue, 12 Feb 2019 17:43:27 GMT):
Want to write Hyperledger Fabric Chaincode using java and have multiple files in package then how could we deploy it in network??

muralisr (Tue, 12 Feb 2019 18:41:21 GMT):
@saketkmr suggest posting that in #fabric-java-chaincode

AlbertCL (Wed, 13 Feb 2019 09:12:55 GMT):
Has joined the channel.

AlbertCL (Wed, 13 Feb 2019 09:17:41 GMT):
Hi! Why is needed a couchDB node to run chaincodes? Because I'm running successful chaincodes with no couchDB's docker container and I can see the data in the ledger through Hyperledger-Explorer

AlbertCL (Wed, 13 Feb 2019 09:21:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=RTRqtgv2F3jmxWf9Y) oh okey LevelDB is the default used, how cna I check the status or data from it?

rthatcher (Wed, 13 Feb 2019 09:22:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=RTRqtgv2F3jmxWf9Y) @AlbertCL You don't need to run CouchDB. LevelDB is the default which runs in the peer container. The difference is mainly down to ability to query JSON structured data with CouchDB - https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html?highlight=couchdb

AlbertCL (Wed, 13 Feb 2019 09:24:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fLuSnrn3NauQ2rxKC) @rthatcher Thanks! Do you know if there is something similar with LevelDB? Like a command line client?

rthatcher (Wed, 13 Feb 2019 09:31:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kJqr4WRpNSy7ziTLu) @AlbertCL I'm sure there are command line tools available, but you should be accessing via a Smart Contract (chaincode)

vtech (Wed, 13 Feb 2019 15:42:20 GMT):
Has joined the channel.

vtech (Wed, 13 Feb 2019 16:00:49 GMT):
Hello Experts , I am trying to run private data with idemix credentials.I have set up the idemix credentials and using the private data chaincode (https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/gocc/samplePrivateData/src/github.com/private_data_cc/private_data_cc.go ). Now in this private data chaincode while retrieving the ou attributes `ou, found, err := cid.GetAttributeValue(stub, "ou");` throws the below error. What can be wrong/missing in this process ? Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` Retrieve the idemix credential in private_data _chaincode ``` // Invoke makes payment of X units from A to B func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { logger.Info("########### private_data_cc Invoke ###########") function, args := stub.GetFunctionAndParameters() // Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) }

vtech (Wed, 13 Feb 2019 16:02:30 GMT):
Hello Experts , I am trying to run private data with idemix credentials.I have set up the idemix credentials and using the private data chaincode (https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/gocc/samplePrivateData/src/github.com/private_data_cc/private_data_cc.go ). Now in this private data chaincode while retrieving the ou attributes `ou, found, err := cid.GetAttributeValue(stub, "ou");` throws the below error. What can be wrong/missing in this process ? ``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` Retrieve the idemix credential in private_data _chaincode ``` // Invoke makes payment of X units from A to B func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { logger.Info("########### private_data_cc Invoke ###########") function, args := stub.GetFunctionAndParameters() // Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) }```

dave.enyeart (Wed, 13 Feb 2019 16:39:14 GMT):
@vtech I still assert that the Identity Mixer attributes have nothing to do with private data chaincode, they are independent concepts. @skarim any ideas on how to set and retrieve Identity Mixer attributes when using CID?

skarim (Wed, 13 Feb 2019 21:05:00 GMT):
@vtech I would look at the bit of code here: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/gocc/sampleIdemix/src/github.com/example_cc/example_cc.go#L87 Also, currently only attributes can be retrieved from an idemix credential. They are 'ou' and 'role', currently there is not support for custom attributes in idemix credentials.

skarim (Wed, 13 Feb 2019 21:09:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=89qo64nhkbHPFepL8) @vtech Are you using the java SDK, and can you confirm that you are transacting using an idemix credential? Perhaps something in the log that refers your idemixMSP id. If you are indeed using an idemix credential, you should have been able to get the 'ou' attribute using the chaincode library.

miloradtrninic (Wed, 13 Feb 2019 21:29:43 GMT):
Has joined the channel.

ashuu-gupta (Thu, 14 Feb 2019 09:46:19 GMT):
Hello Experts, I want to query on the basis of months in Hyperledger fabric. for example I need data about all the records whose date of purchase comes under last 6 months. i.e. I want to fetch record on the basis of date of purchase for last six moths. Can anyone help me out? I'm stuck on this from couple of weeks.

mahoney1 (Thu, 14 Feb 2019 10:42:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3zf8zA9yfA5jXLgT3) @ashuu-gupta firstly, suggest to read the answers (and blog post) in this [Stack Overflow](https://stackoverflow.com/questions/53388100/couch-db-query-to-fetch-the-records-greater-than-a-particular-date) and in particular on dates and storage of same. Then (as suggested there) you build the selector (with equivalent index for performance) to get the data for the date range you require - obviously assumes you're using CouchDB (rich query is supported if CouchDB is used as the state database ) - lastly, might suggest to exec your query with pagination of results, if result dataset is expected to be large - see example shown in https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#cdb-pagination and sample code here -> https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L456 (supplying the selector querystring etc etc)

mahoney1 (Thu, 14 Feb 2019 10:42:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3zf8zA9yfA5jXLgT3) @ashuu-gupta firstly, suggest to read the answers (and blog post) in this [Stack Overflow](https://stackoverflow.com/questions/53388100/couch-db-query-to-fetch-the-records-greater-than-a-particular-date) and in particular on dates and storage of same. Then (as suggested there) you build the selector (with equivalent index for performance) to get the data for the date range you require - obviously assumes you're using CouchDB (rich query is supported if CouchDB is used as the state database ) - lastly, might suggest to exec your query with pagination of results, if result dataset is expected to be large - see example shown in https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#cdb-pagination and sample code here -> https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L456 (supplying the selector querystring etc etc) . Selector syntax is [here](https://docs.couchdb.org/en/2.2.0/api/database/find.html)

mahoney1 (Thu, 14 Feb 2019 10:42:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3zf8zA9yfA5jXLgT3) @ashuu-gupta firstly, suggest to read the answers (and blog post) in this [Stack Overflow](https://stackoverflow.com/questions/53388100/couch-db-query-to-fetch-the-records-greater-than-a-particular-date) and in particular on dates and storage of same. Then (as suggested there) you build the selector (with equivalent index for performance) to get the data for the date range you require - obviously assumes you're using CouchDB (rich query is supported if CouchDB is used as the state database ) - lastly, might suggest to exec your query with pagination of results, if the result dataset is expected to be large - see example shown in https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#cdb-pagination and sample (query function) code here -> https://github.com/hyperledger/fabric-samples/blob/master/chaincode/marbles02/node/marbles_chaincode.js#L456 (supplying the selector querystring etc etc) . Selector syntax is [here](https://docs.couchdb.org/en/2.2.0/api/database/find.html)

vtech (Thu, 14 Feb 2019 12:49:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qZzSKhpthMN9GWLwA) @skarim I am using java SDK(due to Idemix support is only available with this sdk ), below is the logs from fabric-ca ``` ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/cainfo ca_peerOrg2 | 2019/02/14 12:38:47 [INFO] 172.19.0.1:52526 POST /api/v1/cainfo 200 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/cainfo ca_peerOrg2 | 2019/02/14 12:38:47 [INFO] 172.19.0.1:52530 POST /api/v1/cainfo 200 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/idemix/credential ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Caller is using a x509 certificate ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Checking for revocation/expiration of certificate owned by 'user1' ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] DB: Get certificate by serial (40ee2062502e43c91ed4fda69bccf0ed2c14c2f2) and aki (7b2b7653c4512d6ce9535e38140635f539bd8a130be54ac94f7e131b75a0f23e) ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] DB: Getting identity user1 ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Successful token authentication of 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [INFO] 172.19.0.1:52534 POST /api/v1/idemix/credential 201 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Received request for /api/v1/idemix/credential ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Caller is using a x509 certificate ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Checking for revocation/expiration of certificate owned by 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Get certificate by serial (40ee2062502e43c91ed4fda69bccf0ed2c14c2f2) and aki (7b2b7653c4512d6ce9535e38140635f539bd8a130be54ac94f7e131b75a0f23e) ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Getting identity user1 ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Successful token authentication of 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Retrieved nonce from DB: {Val:MqbWtj6K9i9iGn2HpcV/hzQTEJlY4/YnK7tm7peto7c= Expiry:2019-02-14 12:39:02.998798137 +0000 UTC Level:1}, MqbWtj6K9i9iGn2HpcV/hzQTEJlY4/YnK7tm7peto7c= ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Insert Credential ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] RA '' is getting revoked revocation handles for epoch 1 ca_peerOrg2 | 2019/02/14 12:38:48 [INFO] 172.19.0.1:52538 POST /api/v1/idemix/credential 201 0 "OK" ``` Only error I can see is from endorser as below: ``` peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] callChaincode -> INFO 078 [bar][65fbe28f] Entry chaincode: path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] callChaincode -> INFO 079 [bar][65fbe28f] Exit chaincode: path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" (1ms) peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] ProcessProposal -> ERRO 07a [bar][65fbe28f] simulateProposal() resulted in chaincode path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" response status 500 for txid: 65fbe28fcf7f3eff2a0b7c7b5cc2ac7df846106f277905ec96467916852d6856 ```

vtech (Thu, 14 Feb 2019 12:50:39 GMT):
@skarim I am using java SDK(due to Idemix support is only available with this sdk ), below is the logs from fabric-ca ``` ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/cainfo ca_peerOrg2 | 2019/02/14 12:38:47 [INFO] 172.19.0.1:52526 POST /api/v1/cainfo 200 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/cainfo ca_peerOrg2 | 2019/02/14 12:38:47 [INFO] 172.19.0.1:52530 POST /api/v1/cainfo 200 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Received request for /api/v1/idemix/credential ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Caller is using a x509 certificate ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Checking for revocation/expiration of certificate owned by 'user1' ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] DB: Get certificate by serial (40ee2062502e43c91ed4fda69bccf0ed2c14c2f2) and aki (7b2b7653c4512d6ce9535e38140635f539bd8a130be54ac94f7e131b75a0f23e) ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] DB: Getting identity user1 ca_peerOrg2 | 2019/02/14 12:38:47 [DEBUG] Successful token authentication of 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [INFO] 172.19.0.1:52534 POST /api/v1/idemix/credential 201 0 "OK" ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Received request for /api/v1/idemix/credential ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Caller is using a x509 certificate ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Checking for revocation/expiration of certificate owned by 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Get certificate by serial (40ee2062502e43c91ed4fda69bccf0ed2c14c2f2) and aki (7b2b7653c4512d6ce9535e38140635f539bd8a130be54ac94f7e131b75a0f23e) ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Getting identity user1 ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Successful token authentication of 'user1' ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] Retrieved nonce from DB: {Val:MqbWtj6K9i9iGn2HpcV/hzQTEJlY4/YnK7tm7peto7c= Expiry:2019-02-14 12:39:02.998798137 +0000 UTC Level:1}, MqbWtj6K9i9iGn2HpcV/hzQTEJlY4/YnK7tm7peto7c= ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] DB: Insert Credential ca_peerOrg2 | 2019/02/14 12:38:48 [DEBUG] RA '' is getting revoked revocation handles for epoch 1 ca_peerOrg2 | 2019/02/14 12:38:48 [INFO] 172.19.0.1:52538 POST /api/v1/idemix/credential 201 0 "OK" ``` Only error I can see is from endorser as below: ``` peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] callChaincode -> INFO 078 [bar][65fbe28f] Entry chaincode: path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] callChaincode -> INFO 079 [bar][65fbe28f] Exit chaincode: path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" (1ms) peer1.org2.example.com | 2019-02-14 12:40:39.142 UTC [endorser] ProcessProposal -> ERRO 07a [bar][65fbe28f] simulateProposal() resulted in chaincode path:"github.com/private_data_cc" name:"private_data_cc7_go" version:"1" response status 500 for txid: 65fbe28fcf7f3eff2a0b7c7b5cc2ac7df846106f277905ec96467916852d6856 ```

bandreghetti (Thu, 14 Feb 2019 15:31:15 GMT):
hey guys, does anyone know if all keywords are supported when calling `stub.GetQueryResult`? I'm passing `limit` as 3 but query is returning all documents...

bandreghetti (Thu, 14 Feb 2019 15:42:20 GMT):
tried same query string in `localhost:5984/_utils` and it worked fine

bandreghetti (Thu, 14 Feb 2019 16:30:22 GMT):
@muralisr some of the lines in the core code related to this method are credited to you... could you help me out?

muralisr (Thu, 14 Feb 2019 16:38:21 GMT):
you mean GetQueryResultWithPagination @bandreghetti ?

muralisr (Thu, 14 Feb 2019 16:42:15 GMT):
or do you mean GetQueryResult with `totalQueryLimit` (the `limit` you refer to.. )

muralisr (Thu, 14 Feb 2019 16:42:15 GMT):
or do you mean GetQueryResult with `totalQueryLimit` set to 3 (the `limit` you refer to.. )

bandreghetti (Thu, 14 Feb 2019 16:54:00 GMT):
no, I mean the `limit` keyword specified here https://docs.couchdb.org/en/2.2.0/api/database/find.html

bandreghetti (Thu, 14 Feb 2019 16:54:00 GMT):
@muralisr no, I mean the `limit` keyword specified here https://docs.couchdb.org/en/2.2.0/api/database/find.html

bandreghetti (Thu, 14 Feb 2019 16:54:19 GMT):
sorry, I should've been more specific

bandreghetti (Thu, 14 Feb 2019 16:56:09 GMT):
I thought GetQueryResult gave me full access to CouchDB query strings so I was trying to paginate using `limit` and `size` instead of GetQueryResultWithPagination, since the latter enforces sequential access which is not appropriate for my use case

bandreghetti (Thu, 14 Feb 2019 16:56:09 GMT):
I thought GetQueryResult gave me full access to CouchDB query syntax so I was trying to paginate using `limit` and `size` instead of GetQueryResultWithPagination, since the latter enforces sequential access which is not appropriate for my use case

muralisr (Thu, 14 Feb 2019 17:15:34 GMT):
np, let us seek @dave.enyeart or @manish-sethi help

muralisr (Thu, 14 Feb 2019 17:17:04 GMT):
but my 2c would be to resort to the control that chaincode API gives rather than low level changes (which may have unintended side effects...)

bandreghetti (Thu, 14 Feb 2019 17:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=NWBhNJNWpfeGQiq6x) @muralisr I would hardly call using CouchDB Query Syntax a "low level change" but I see your point I just wanted to have random page access :c

bandreghetti (Thu, 14 Feb 2019 17:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=NWBhNJNWpfeGQiq6x) @muralisr I would hardly call using CouchDB Query Syntax "low level" but I see your point I just wanted to have random page access :c

muralisr (Thu, 14 Feb 2019 18:13:38 GMT):
I take your point too... you were doing `limit` through the `GetQueryResult`. My worry was now there are two "limits" in consideration (one at the CC level and the other at tge DB level)

muralisr (Thu, 14 Feb 2019 18:13:38 GMT):
I take your point too... you were doing `limit` through the `GetQueryResult`, so in that sense quite legitimate. My worry was now there are two "limits" in consideration (one at the CC level and the other at tge DB level)

bandreghetti (Thu, 14 Feb 2019 18:53:10 GMT):
I believe GetQueryResult should expose the whole CouchDB interface (including execution stats, warnings and the bookmark), I don't see the reason why GetQueryResultWithPagination should be a separate function

bandreghetti (Thu, 14 Feb 2019 18:53:10 GMT):
I believe GetQueryResult should expose the whole CouchDB query interface (including execution stats, warnings and the bookmark), I don't see the reason why GetQueryResultWithPagination should be a separate function

bandreghetti (Thu, 14 Feb 2019 18:53:10 GMT):
@muralisr I believe GetQueryResult should expose the whole CouchDB query interface (including execution stats, warnings and the bookmark), I don't see the reason why GetQueryResultWithPagination should be a separate function

dave.enyeart (Thu, 14 Feb 2019 19:27:55 GMT):
@bandreghetti @muralisr I've made a few clarifications in Fabric CouchDB docs to clarify:

dave.enyeart (Thu, 14 Feb 2019 19:27:59 GMT):
https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-docs-build-x86_64/1334/html/couchdb_as_state_database.html#couchdb-pagination

dave.enyeart (Thu, 14 Feb 2019 19:29:06 GMT):
Since Fabric uses `limit` internally to manage paging between chaincode container, peer, and CouchDB, it is not supported to be set by callers, you must use the pagination APIs

dave.enyeart (Thu, 14 Feb 2019 19:29:58 GMT):
@bandreghetti What use case are you trying to achieve?

dave.enyeart (Thu, 14 Feb 2019 19:33:49 GMT):
If you only want to iterate through the top N records within chaincode, you can do that without using the pagination queries. The results will implicitly be paged between chaincode, peer, and couchdb as you iterate through them, so you need not be concerned about large result sets.

bandreghetti (Thu, 14 Feb 2019 19:38:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Bzwrb3WegQTPuoWRo) @dave.enyeart I wanted to use pagination with random page access, something such as "give me page 7 with 10 elements per page", which would mean elements 61~70 With bookmarks I would have to call `GetQueryResultWithPagination` 6 times just to get the correct bookmark for the 7th page, which doesn't seem to be very efficient

dave.enyeart (Thu, 14 Feb 2019 19:39:02 GMT):
You can `GetQueryResultWithPagination` with pageSize 70 and iterate down to the 61st record.

dave.enyeart (Thu, 14 Feb 2019 19:39:45 GMT):
random page access is not efficient, and therefore not encouraged in the APIs

dave.enyeart (Thu, 14 Feb 2019 19:39:45 GMT):
random page access is not efficient (even when going directly to CouchDB), and therefore not encouraged in the APIs

bandreghetti (Thu, 14 Feb 2019 19:46:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=W8fW8DvWJgA3n4JkH) @dave.enyeart You mean iterate from 1st to 60th ignoring the results just to get to the 61st? Is it better than iterating using bookmarks? Does it work if instead of 61st to 70th I want 60001st to 60010th?

dave.enyeart (Thu, 14 Feb 2019 19:49:20 GMT):
Yes. Agreed it is not efficient. Even if you did this directly in CouchDB with skip/limit it does the same iterating through all the records and is not efficient. That is why random page access as a pattern is discouraged. But if you can restrict it in chaincode to say random access to the first 1000 records only, then it wouldn't be too bad.

dave.enyeart (Thu, 14 Feb 2019 19:49:20 GMT):
Yes. Agreed it is not efficient. Even if you did this directly in CouchDB with skip/limit it does the same iterating through all the records and is not efficient. That is why random page access as a pattern is discouraged, and why CouchDB has shifted to the bookmark pattern. But if you can restrict it in chaincode to say random access to the first 1000 records only, then it wouldn't be too bad.

bandreghetti (Thu, 14 Feb 2019 19:54:19 GMT):
@dave.enyeart By the way, is there a SQL-like `COUNT` method in this interface?

bandreghetti (Thu, 14 Feb 2019 19:54:19 GMT):
@dave.enyeart By the way, is there a SQL-like `COUNT` method in the CouchDB interface?

dave.enyeart (Thu, 14 Feb 2019 19:59:03 GMT):
Sorry no, for aggregates including COUNT, we suggest the pattern of a side database built by listening to block events.

dave.enyeart (Thu, 14 Feb 2019 20:00:07 GMT):
To the original question...there are many posts on the internet about why random page access is not a good idea... here's one quote:

dave.enyeart (Thu, 14 Feb 2019 20:00:12 GMT):
```I never ever ever want to jump to page 317 right from the beginning. There’s absolutely no use case out there, where I search for something, and then I say, hey, I believe my search result will be item #3175 in the current sort order. Exactly. Instead, I will do any of these: Refine the search Sort the result In both cases, I will get a result where the record that I’m looking for is much more likely to appear on page #1 or perhaps #2.```

vieiramanoel (Thu, 14 Feb 2019 20:00:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8WXP9Xown6iwH7c2r) @dave.enyeart Are you out of your mind?

bandreghetti (Thu, 14 Feb 2019 20:03:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4r4cdnyHTcZYLoMpP) @dave.enyeart Fair enough. Thanks for helping!

Rajatsharma (Thu, 14 Feb 2019 20:10:58 GMT):
Hey, could anyone help me out understanding if I make a putState() and just after that try to get that element, there's no result. I get that the block takes time to commit but still I miss some points. Could someone help me figuring out the whole commit process of a transaction and when does it take effect in the ledger.

Rajatsharma (Thu, 14 Feb 2019 20:12:12 GMT):
In my use-case there are chances that someone might hit the chaincode just after sending the transaction(putState()) to fetch the result.

Rajatsharma (Thu, 14 Feb 2019 20:15:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8WXP9Xown6iwH7c2r) @dave.enyeart Other that this, is there any way we could make indexes from inside the chaincode. Don't you think one would require this too. Because to make indexed on the fly we're left with only one way to hit a curl request to our CouchDB database. But due to our infrastructure I wanted to avoid keeping any credentials at the end SDK is called.

dave.enyeart (Thu, 14 Feb 2019 20:17:15 GMT):
For transaction flow see https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html or for more detailed https://hyperledger-fabric.readthedocs.io/en/latest/peers/peers.html#peers-and-orderers

dave.enyeart (Thu, 14 Feb 2019 20:17:41 GMT):
Allowing different participants to have differents indexes is in the plans

Rajatsharma (Thu, 14 Feb 2019 20:18:26 GMT):
Thanks glad to know this.

bandreghetti (Thu, 14 Feb 2019 20:18:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=WEnxGXDWHCAuCNTP8) @Rajatsharma GetState always gets the ledger's current state, so if you call PutState and then GetState in the same transaction with the same key GetState will return the value stored in that key before the transaction began

Rajatsharma (Thu, 14 Feb 2019 20:19:11 GMT):
No I meant like in a different transaction but just after that transaction.

Rajatsharma (Thu, 14 Feb 2019 20:19:33 GMT):
Like hitting from a script without any time delay.

Rajatsharma (Thu, 14 Feb 2019 20:20:16 GMT):
I was expecting the getState() should show the immediate effect of the last putState().

Rajatsharma (Thu, 14 Feb 2019 20:20:41 GMT):
It's taking time to commit. But it leads to inconsistency in my case.

Rajatsharma (Thu, 14 Feb 2019 20:25:51 GMT):
Very specifically suppose I have these functions in my chaincode ``` async singleEntry(stub, args) { let ind = parseInt(args[0]) let obj = { make: 'Holden', model: 'Barina', color: 'brown', owner: 'Shotaro' }; await stub.putState('DCAR' + ind , Buffer.from(JSON.stringify(obj))); } async checkEntry(stub, args){ let ind = parseInt(args[0]) let key = 'DCAR' + ind; let carAsBytes = await stub.getState(""); console.log(carAsBytes.toString()); } ```

bandreghetti (Thu, 14 Feb 2019 20:27:02 GMT):
Oh then you should definitely study the transaction flow using the links dave posted The solution me and my team found was to wait for the transaction to be commited before responding the HTTP request, so any sequential script work just fine without any delay between API calls

bandreghetti (Thu, 14 Feb 2019 20:27:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eHCsNX3jkTw8Tqvso) @Rajatsharma Oh then you should definitely study the transaction flow using the links dave posted The solution me and my team found was to wait for the transaction to be commited before responding the HTTP request, so any sequential script work just fine without any delay between API calls

Rajatsharma (Thu, 14 Feb 2019 20:28:02 GMT):
How do you check if it's commited ?

bandreghetti (Thu, 14 Feb 2019 20:32:47 GMT):
Check how to listen to peer events in the SDK you're using

Rajatsharma (Thu, 14 Feb 2019 20:36:22 GMT):
Ohh got that. I wanted to manage this through chaincode only, that's why I asked. Thanks anyways.

bandreghetti (Thu, 14 Feb 2019 20:44:12 GMT):
It is not possible to manage this through chaincode only

Rajatsharma (Thu, 14 Feb 2019 20:44:44 GMT):
Yes got that now.

Rajatsharma (Thu, 14 Feb 2019 20:47:15 GMT):
@dave.enyeart the documentation to run system chaincode is also old. As with https://jira.hyperledger.org/browse/FAB-7710 now the process has changed a bit. Could you please help updating that too. I tried creating a Issue on JIRA but there's no response yet.

dave.enyeart (Thu, 14 Feb 2019 20:51:12 GMT):
@Rajatsharma You can mention me in that Jira to get my attention and I'll figure out who is most knowledgable in that space...

Rajatsharma (Thu, 14 Feb 2019 20:51:30 GMT):
Okay

Rajatsharma (Thu, 14 Feb 2019 20:51:30 GMT):
Okay, Done.

lucasrol (Thu, 14 Feb 2019 21:52:34 GMT):
Has joined the channel.

Rajatsharma (Fri, 15 Feb 2019 07:05:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FzH5BArteF8P4bwNR) @dave.enyeart What if I'm catering to cases where I might want to update more than 100000 records. Firstly If I have to work on more than 10000 records in a single transaction it will overflow and I'm likely to get a timeout error. So currently I have 2 ways of approaching this: 1. I take out entries in batches using skip and perform the update on those records.

Rajatsharma (Fri, 15 Feb 2019 07:05:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=FzH5BArteF8P4bwNR) @dave.enyeart What if I'm catering to cases where I might want to update more than 100000 records. Firstly If I have to work on more than 10000 records in a single transaction it will overflow and I'm likely to get a timeout error. So currently I have 2 ways of approaching this: 1. I take out entries in batches using skip and perform the update on those records. 2. Or I might return all the record Id's from one function and fire independent update request for each record. But here also It's difficult to cater cases where we will have more than 100000 records. Could you help me in approaching scenarios like these. What would you suggest doing ?

vtech (Fri, 15 Feb 2019 11:45:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sBTTjEhW6ydqCmRx9) @skarim can you please provide your view on this ?

ShefaliMittal (Fri, 15 Feb 2019 12:33:30 GMT):
Hi, I am having issue with the endorsement policies. I have set my chancode endorsement policy as OR( ORG1Msp.admin, Org2Msp.admin) But it fails even when I am invoking chaincode via admin Please tell what I am missing here

dave.enyeart (Fri, 15 Feb 2019 12:51:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KQ9K4HqQyHgP762vi) @Rajatsharma Let's say you decide to batch into transactions of 1000 each for efficiency. You can do a regular range query, then iterate through the top 1000 records and update each. Submit the transaction, and once you get commit event for it, do the next request to query and iterate through the next top 1000.

dave.enyeart (Fri, 15 Feb 2019 12:51:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KQ9K4HqQyHgP762vi) @Rajatsharma Let's say you decide to batch into transactions of 1000 each for efficiency. You can do a regular range query, then iterate through the top 1000 records and update each. Submit the transaction, and once you get commit event for it, do the next request to query and iterate through the next top 1000. Do this until you reach the end of the result set.

varunagarwal (Fri, 15 Feb 2019 12:55:02 GMT):
Has joined the channel.

Rajatsharma (Fri, 15 Feb 2019 12:56:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=gX4Rddu3Q4wTRonYp) @dave.enyeart Okay Thanks !! I'll proceed like this.

varunagarwal (Fri, 15 Feb 2019 12:58:05 GMT):
Hi I have followed this https://hyperledger-fabric.readthedocs.io/en/release-1.4/write_first_app.html . It works, and now I try and create a car called `CAR10`. If I call this https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/fabcar/javascript/lib/fabcar.js#L84 I am able to get the data, but https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/fabcar/javascript/lib/fabcar.js#L108 only calls till `CAR9`. It is my understanding the iterator is expected to go from CAR0 to CAR999. Am I missing something?

varunagarwal (Fri, 15 Feb 2019 12:58:39 GMT):
interestingly, if I add a `CAR0` then it gets included in the iterator

14gracel (Fri, 15 Feb 2019 13:17:46 GMT):
Has joined the channel.

JonasM (Fri, 15 Feb 2019 14:00:19 GMT):
Has joined the channel.

Hezaveh (Fri, 15 Feb 2019 22:22:30 GMT):
Has joined the channel.

Shyam_Pratap_Singh (Sat, 16 Feb 2019 13:59:49 GMT):
Hi Team, I have one query regarding private Data, As per Block to Live in a collection, private data will get purge after that many block got created. But i can see still the trace of log in file 000001.log in /var/hyperledger/production/ledgersData/pvtdataStore folder inside Peer container. Kindly help me understand why there is trace of log of purged private data in this log file.

dave.enyeart (Sat, 16 Feb 2019 14:05:21 GMT):
@shyam 40 blockToLive purge removes the data from private state and private data storage so that user chaincode and peer process have no access to it. The file you reference is a historical log file for the underlying database that user chaincode and peer do not have access to. The data in the historical log file will eventually be overwritten.

Shyam_Pratap_Singh (Sat, 16 Feb 2019 14:34:52 GMT):
thanks dave for quick response!

Shyam_Pratap_Singh (Sat, 16 Feb 2019 14:35:57 GMT):
Is it possible to upgrade BlockToLive in a collection? @dave.enyeart

dave.enyeart (Sat, 16 Feb 2019 14:40:05 GMT):
Not possible, since peers may be at different heights and they require a deterministic blockToLive when processing blocks

Shyam_Pratap_Singh (Sat, 16 Feb 2019 16:49:12 GMT):
what about upgradation of policy from one to another for eg. in marbles Policy { Org1.MSP} later upgrade the same collection with {Org2.MSP, Org3.MSP} . is this possible in private data?

dave.enyeart (Sat, 16 Feb 2019 19:57:46 GMT):
Yes, collections can be defined at chaincode instantiation time and updated at chaincode upgrade time. See https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#upgrading-a-collection-definition

Amjadnz (Sun, 17 Feb 2019 13:02:04 GMT):
Can somebody put some light on the below test case I am working with: I have 3 orgs Org1, Org2 and Org3 - At various process flows I need some private data to be shared with ORG1 and ORG2 and in some cases between ORG1 and ORG3 and in some other cases between Org2 and Org3. Private data seems to be the way for Release 1.4 but that enforces me to predefine the parties in the policy (config policy). Is there a way to make this dynamic at the time of saving to the ORG1 that I specify that this private data is visible/accessible to Only ORG2 and not ORG3. Right now all my test cases have be declaratively defined in a config file (not dynamic).

Amjadnz (Sun, 17 Feb 2019 13:06:24 GMT):
Write now If I define the policy as Org1 or Org2 or Org3 - all orgs can see the private data (not private anymore). Else I have to define the properties as follows: ```[ { "name": "collection1", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true },{ "name": "collection2", "policy": "OR('Org1MSP.member', 'Org3MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true }, { "name": "collection3", "policy": "OR('Org3MSP.member','Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":3, "memberOnlyRead": true } ]```

dave.enyeart (Sun, 17 Feb 2019 13:38:52 GMT):
@Amjadnz You have the current behavior correct, collections must be defined statically. The ability to send private data to parties dynamically is on the roadmap for 2019.

Amjadnz (Sun, 17 Feb 2019 14:25:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iEY7qd8JLZAQoX3Bu) @dave.enyeart Thanks @dave.enyeart

Amjadnz (Sun, 17 Feb 2019 14:25:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iEY7qd8JLZAQoX3Bu) @dave.enyeart Thanks

Shyam_Pratap_Singh (Mon, 18 Feb 2019 02:55:39 GMT):
Hi everyone, I have written article on private data. Kindly provide your feedback to make it more informative. “Deep Dive into Private Data in Hyperledger Fabric” by Shyam Pratap Singh https://link.medium.com/pQ4dTKsdoU

dave.enyeart (Mon, 18 Feb 2019 04:39:16 GMT):
@shyam 40 Looks pretty good... Note that the sequence diagram is not quite correct... Anchor Peers should not be there. Anchor peers are only used to bootstrap the gossip network. At transaction time, private data flows directly from endorsing peers to (authorized) committing peers, and blocks flow directly from ordering service to (all) committing peers.

Shyam_Pratap_Singh (Mon, 18 Feb 2019 06:10:40 GMT):
@dave.enyeart i will modify the flow. Thanks for your input.

vtech (Mon, 18 Feb 2019 07:23:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sBTTjEhW6ydqCmRx9) Hi @dave.enyeart , can I please get any help /view on this ?

vtech (Mon, 18 Feb 2019 07:23:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6qn7LRmPMkAvtAgML) @dave.enyeart I have resolved the issue. Issue was with calling user context and passing the idemix user set up solved it. Thanks !

vtech (Mon, 18 Feb 2019 07:23:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sBTTjEhW6ydqCmRx9) Hi , can I please get any help /view on this ?

vtech (Mon, 18 Feb 2019 07:23:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sBTTjEhW6ydqCmRx9) Hi , can I please get any help /view on this ?

vtech (Mon, 18 Feb 2019 07:23:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sBTTjEhW6ydqCmRx9) can I please get any help /view on this ?

malak (Mon, 18 Feb 2019 07:35:26 GMT):
Has joined the channel.

malak (Mon, 18 Feb 2019 07:36:28 GMT):
hi guyz i'm getting timeout error while instantiating chaincode the chaincode image is build but container isn't launching here is the compose log for org a services ``` peer0.a.example.com | 2019-02-18 06:58:12.496 UTC [dev-peer0.a.example.com-original-1.1] func2 -> INFO c61 (node:17) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead peer0.a.example.com | 2019-02-18 06:58:12.691 UTC [dockercontroller] func2 -> INFO c62 Container dev-peer0.a.example.com-original-1.1 has closed its IO channel ``` btw using fabric 1.1.0 version of fabricany help would be appreciated

ShefaliMittal (Mon, 18 Feb 2019 08:11:17 GMT):
Hi Can someone please help me with endorsement policy. I have set it as OR(ORG1Msp.admin, Org2MSP.admin) when I invoke chaincode, it fails with endorsement policy failure error. and peer log shows identity is not an admin

rthatcher (Mon, 18 Feb 2019 09:55:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=gTze8gmxMKtysqMJ6) @ShefaliMittal In your question you have ORG1Msp and Org2MSP - Is that mixture of cASe deliberate? Endorsement is done by the Peers, so you might want (Org1MSP.peer, Org2MSP.peer)

vtech (Mon, 18 Feb 2019 12:40:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zQXBvnAWyJGkhoZgK) @dave.enyeart I have resolved the issue. Issue was with calling user context and passing the idemix user set up solved it. Thanks !

vtech (Mon, 18 Feb 2019 12:40:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zQXBvnAWyJGkhoZgK) I have resolved the issue. Issue was with calling user context and passing the idemix user set up solved it. Thanks !

mahoney1 (Mon, 18 Feb 2019 17:30:13 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)

haardikkk (Mon, 18 Feb 2019 21:41:59 GMT):
If I have multiple organizations, each with multiple peers, sharing the same kind of data back and forth -- but in certain cases i want one of the fields in the data being shared to not be shown to the peers while everything else is still shared -- is this possible with Fabric?

haardikkk (Mon, 18 Feb 2019 21:44:51 GMT):
say Peer1 from Org1 submits a transaction to register a "Marble" which has some sensitive information, they're on a channel with Peer2 from Org2. If Peer1 executes transaction "showSensitiveInfo" for example, Peer2 should be able to query the ledger and get full details about the "Marble", but if that hasnt been done, Peer2 can query the ledger and fetch some info but not the sensitive information about the "Marble"

rthatcher (Tue, 19 Feb 2019 09:23:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cWdXoHrvmcdm289d2) @haardikkk Have you investigated Private Data? https://hyperledger-fabric.readthedocs.io/en/latest/private-data/private-data.html

Shyam_Pratap_Singh (Tue, 19 Feb 2019 09:42:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=gpSQGRF2Hjr7pJafh) @dave.enyeart as per your answer "The data in the historical log file will eventually be overwritten" . So is there any time frame after which history log get erased or over written. If log exist for longer time, any body can read log file and get to know every thing about private data stored previously.

RamyaLaxmi (Tue, 19 Feb 2019 09:42:52 GMT):
Has joined the channel.

RamyaLaxmi (Tue, 19 Feb 2019 09:43:59 GMT):
Hi All, Can anyone help me understand if we could view History/ all transaction data from peer couch DB. Is it feasible?

rthatcher (Tue, 19 Feb 2019 09:49:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tNQjht68LncTEmbrG) @RamyaLaxmi The CouchDB database is used for the "World State" - current values and does not contain historical data. The historical data is stored on The Ledger. This section from the documentation should help: https://hyperledger-fabric.readthedocs.io/en/latest/ledger/ledger.html

oborovyk (Tue, 19 Feb 2019 11:19:58 GMT):
Hi all. What is the proper way to build go contracts for old fabric releases (e.g. 1.1.0)? Seems like https://github.com/milagro-crypto/amcl/tree/master/version3/go is not avaialble anymore.

dave.enyeart (Tue, 19 Feb 2019 12:56:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cxHSgqAP87uJosHQ5) @shyam 40 The peer admin can potentially know everything the peer has ever known (e.g. by copying off the underlying data at intervals). When private data is purged it means that it is purged from the network and not accessible to user chaincode, and not accessible to other peers that are trying to pull the private data. The rate that leveldb overwrites historical logs is not configurable. Note that even if files are deleted, the peer admin could use disk utilities to find deleted files. There is implicit trust in the peer admin and an implicit requirement that the peer is secured from others.

mahoney1 (Tue, 19 Feb 2019 13:33:57 GMT):
@RamyaLaxmi you would use the proper APIs to query what's in the ledger (world state and blockchain transaction log) in [this Stack](https://stackoverflow.com/questions/54082684/how-retrieve-all-block-transactions-in-the-hyperledger-fabric) may well help you (by block and transactions contained therein) -you mention 'transaction' - you could get the history of transactions for the lifecycle of an asset [using `getHistoryforKey` ](https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html) or also investigate `getTransactionById` to examine a particular transaction or group of transactions etc

mahoney1 (Tue, 19 Feb 2019 13:33:57 GMT):
@RamyaLaxmi you would use the proper APIs to query what's in the ledger (world state and blockchain transaction log) - [this Stack](https://stackoverflow.com/questions/54082684/how-retrieve-all-block-transactions-in-the-hyperledger-fabric) may well help you (by block and transactions contained therein) -you mention 'transaction' - you could get the history of transactions for the lifecycle of an asset [using `getHistoryforKey` ](https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html) or also investigate `getTransactionById` to examine a particular transaction or group of transactions etc

JonasM (Tue, 19 Feb 2019 15:15:28 GMT):
Hi all. I'm playing a bit around and came up with the following question: I have two structs - car and a car-sub-component (e.g Door). The car has an unique ID and also the Door has an unique ID. How is it possible to concatenate these structs, so I can query later to get all of the cars sub-components? Right now I can't get the logic for putting the state and adding the sub-component to the car. Unfortunately I did not find any example. Anybody with a good approach on that? Thanks in advance!

ChinmayIngle (Tue, 19 Feb 2019 17:15:01 GMT):
Has joined the channel.

HLFPOC (Tue, 19 Feb 2019 17:27:58 GMT):
Hi Team, I have a scenario in which I have 2 channels . Org1 and Org2 are part for channel_1 & Org2 and Org3 are part of channel_2. So I will install 2 chaincodes on 2 different channels let's say mycc1 & mycc2. So now I want to have this feature that if Org1 user do a transaction in channel_1 which has mycc1 installed, I want to invoke some function of mycc2 and pass some part of transaction data to channel_2 also. So just wanted to know if it is possible to acheive this functionality here as Org2 is member of both the channels.

HLFPOC (Tue, 19 Feb 2019 17:27:58 GMT):
Hi Team, I have a scenario in which I have 2 channels . Org1 and Org2 are part for channel_1 & Org2 and Org3 are part of channel_2 and i have installed 2 chaincodes on 2 different channels let's say mycc1 on channel_1 & mycc2 on channel_2. So now I want to have this feature that if Org1 user do a transaction in channel_1 which has mycc1 installed, I want to invoke some function of mycc2 and pass some part of transaction data to channel_2 also. So just wanted to know if it is possible to acheive this functionality here as Org2 is member of both the channels?

muralisr (Tue, 19 Feb 2019 19:31:38 GMT):
@HLFPOC the chaincode-to-chaincode call cannot be used to commit on the called chaincode across channels. Is coordinating the two transactions from a middle-tier application an option ?

HLFPOC (Wed, 20 Feb 2019 04:08:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KDggC9s7PqnjFbnce) @muralisr yes, I can handle to invoke to second chaincode from my middle-ware app. However, can I use `stub.InvokeChaincode` from first chaincode to call a function in my second chaincode ?

HLFPOC (Wed, 20 Feb 2019 04:08:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KDggC9s7PqnjFbnce) @muralisr Invoking chaincode of Org2 (channel_2) from middle-tier app of Org1 wont be possible here as current transaction would be done by Org1 user.However, can I use `stub.InvokeChaincode` from first chaincode to call a function in my second chaincode ?

haardikkk (Wed, 20 Feb 2019 06:37:01 GMT):
@rthatcher from my understanding, private data is granular to the level of organizations. so all peers from a certain organization can either see the data or they cannot -- can i somehow limit it to certain peers

dave.enyeart (Wed, 20 Feb 2019 12:51:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HgrQsATjGTbx6fZmH) @JonasM You can create a composite key of carid~subcomponentid and then query for everything in carid~*. See related example at https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/go/marbles_chaincode.go#L223 and query at https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/go/marbles_chaincode.go#L458

dave.enyeart (Wed, 20 Feb 2019 12:53:55 GMT):
These composite keys can have the data structure of the subcomponent in the value, or can be empty to simply enable the queries

muralisr (Wed, 20 Feb 2019 13:55:44 GMT):
@HLFPOC yes you can call the second chaincode in adifferent channel but the call will be effectively readonly (see doc https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L76)

braduf (Wed, 20 Feb 2019 15:55:11 GMT):
Has joined the channel.

HLFPOC (Wed, 20 Feb 2019 18:14:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=S8bHxjSioQ5tsWjMp) @muralisr Okay, So is there any other approach which we can use here to call another chaincode invoke function without the dependency of middle-tier application ?

SuperSeiyan (Thu, 21 Feb 2019 05:03:42 GMT):
Hi, is there anyone ever try to apply goroutine into golang chaincode?

SuperSeiyan (Thu, 21 Feb 2019 05:05:54 GMT):
Hi, is there anyone ever try to apply goroutine into golang chaincode? because I would like to make chaincode process faster when process multiple transaction as batch.

gravity (Thu, 21 Feb 2019 10:44:51 GMT):
hi @muralisr Could you give a hand on how to access chaincode logs that are printed using `shim.NewLogger`? thanks in advance

gravity (Thu, 21 Feb 2019 10:44:51 GMT):
hi all Could you give a hand on how to access chaincode logs that are printed using `shim.NewLogger`? thanks in advance

gravity (Thu, 21 Feb 2019 10:44:51 GMT):
hi all Could someone give me a hand on how to access chaincode logs that are printed using `shim.NewLogger`? thanks in advance

mahoney1 (Thu, 21 Feb 2019 12:22:49 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:49 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 here: https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - be great to hear from you later ! :-) regards Paul

mahoney1 (Thu, 21 Feb 2019 12:22:49 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

annalisa.chiacchiaretta (Thu, 21 Feb 2019 16:44:46 GMT):
Has joined the channel.

yuki-kon (Thu, 21 Feb 2019 19:07:03 GMT):
Hi experts. After the Fabric Developer Community call, I read the commercial-paper in fabric-samples. In the commercial paper, Chaincode uses classes “state” and “statelist” to put/get states. They generate composite keys, serialize/deserialize state, and call ChaincodeShim. These classes seem useful for many use cases because developers can focus on the business logic. Is there any plan to add these classes to fabric-contract-api?

haardikkk (Fri, 22 Feb 2019 03:04:02 GMT):
Hey guys, how can I limit certain function invocations to certain 'users' in an organization?

haardikkk (Fri, 22 Feb 2019 03:04:34 GMT):
Im working on a multi-org network where 'users' can have different roles (defined as Structs in Go CC) -- Client, Agent, Manager

haardikkk (Fri, 22 Feb 2019 03:04:53 GMT):
Client can execute certain transactions, Agent can execute different transactions, and Manager can execute all of Agent and some extra transactions

haardikkk (Fri, 22 Feb 2019 03:05:01 GMT):
coming over from Composer, i'm not sure how to implement this in chaincode

knagware9 (Fri, 22 Feb 2019 05:29:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wsL8TTFPqwYwTz9so) @haardikkk use ACL (attribute access control list) in chaincode,check this https://jira.hyperledger.org/browse/FABC-539

mahoney1 (Fri, 22 Feb 2019 09:48:09 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

Shash2329 (Fri, 22 Feb 2019 17:21:24 GMT):
Has joined the channel.

muralisr (Fri, 22 Feb 2019 17:29:38 GMT):
@HLFPOC given that the Invoke function can be called only as a Proposal or as a chaincode-chaincode call, and the later doesn't apply to your scenario, there is no other approach currently

muralisr (Fri, 22 Feb 2019 17:29:56 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EWbKxK4zJuRJuGufi

muralisr (Fri, 22 Feb 2019 17:32:43 GMT):
@SuperSeiyan I assume you mean multiple proposals (not transactions)... I'd note chaincode does process multiple proposals concurrently already (ie, each proposal is a goroutine in the shim layer callin the chaincode Invoke method)

muralisr (Fri, 22 Feb 2019 17:33:11 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8HJATd3nLPrbfBX8W

muralisr (Fri, 22 Feb 2019 17:41:33 GMT):
@gravity you should be able to access logs using `docker logs ` ... other approach is to direct logs to peer log chaincide logs appear in peer logs using `CORE_VM_DOCKER_ATTACHSTDOUT=true` to peer

muralisr (Fri, 22 Feb 2019 17:43:04 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=wsL8TTFPqwYwTz9so

muralisr (Fri, 22 Feb 2019 17:46:02 GMT):
you have access to the proposal credentials in the chaincode. That could be the basis for cert based ACLs (role, attributes) etc. I'd checkout the GO chaincode helper `cid` library https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/lib/cid ... the same ideas would carry out to other languages as well

muralisr (Fri, 22 Feb 2019 17:47:21 GMT):
^^ just saw @knagware9 response as well (also relevant)

haardikkk (Fri, 22 Feb 2019 19:16:18 GMT):
perfect. thanks a lot guys!

vitiko (Fri, 22 Feb 2019 21:59:54 GMT):
Hi All, I have written article on using protocol buffers schema in hyperledger fabric chaincode. I would greatly appreciate it if you kindly give me some feedback https://medium.com/coinmonks/hyperledger-fabric-smart-contract-data-model-protobuf-to-chaincode-state-mapping-191cdcfa0b78

haardikkk (Sat, 23 Feb 2019 03:57:49 GMT):
Hey guys, im trying to spin up my network locally and when i run `peer channel create` im getting an error saying

haardikkk (Sat, 23 Feb 2019 03:57:55 GMT):
`FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied`

haardikkk (Sat, 23 Feb 2019 03:58:21 GMT):
not sure whats wrong, all the files exist the tls certs exist ive tried generating new channel artifacts and i made sure crypto-config was okay as well

haardikkk (Sat, 23 Feb 2019 03:58:54 GMT):
`peer channel create -o orderer.flexfintx.co.zw:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/flexfintx.co.zw/orderers/orderer.flexfintx.co.zw/msp/tlscacerts/tlsca.flexfintx.co.zw-cert.pem` this is the exact command im running and all the files mentioned exist and my domains are correct

haardikkk (Sat, 23 Feb 2019 04:00:19 GMT):
also $CHANNEL_NAME is set

AbdullahKamran (Sat, 23 Feb 2019 12:30:58 GMT):
Has joined the channel.

DanielHruby (Sat, 23 Feb 2019 14:55:17 GMT):
Has joined the channel.

DanielHruby (Sat, 23 Feb 2019 14:55:33 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

KartikChauhan (Mon, 25 Feb 2019 06:44:28 GMT):
I've killed all the docker containers and all the fabric images are removed. But I've all the data saved in my host machine. Will I need to install and instantiate the chaincode again?

SuperSeiyan (Mon, 25 Feb 2019 07:13:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=95jpJytH7Jv8ydKiS) @muralisr I appreciate your reply. I meant multiple proposals that you mentioned in your answer and I curious about goroutine in shim layer that you meant, did it available on old version before hf1.4 as well or it just developed on hf1.4?

SuperSeiyan (Mon, 25 Feb 2019 07:14:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=29KTNY6wmFr8FMxZL) @muralisr I appreciate your reply. I meant multiple proposals that you mentioned in your answer and I curious about goroutine in shim layer that you meant, did it available on old version before hf1.4 as well or it just developed on hf1.4?

SuperSeiyan (Mon, 25 Feb 2019 07:15:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=29KTNY6wmFr8FMxZL) @muralisr I appreciate your reply. I meant multiple proposals that you mentioned in your answer but, I curious about goroutine in shim layer that you meant, did it available on old version before hf1.4 as well or it just developed on hf1.4?

YSZYCF (Mon, 25 Feb 2019 09:10:04 GMT):
Has joined the channel.

YSZYCF (Mon, 25 Feb 2019 09:13:03 GMT):
hey, I am trying to write fabric system-chaincode Plugins. I don't know how to do. I don't know How to use system-chaincode Plugins. Can you help me?

JonasM (Mon, 25 Feb 2019 10:12:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rHASTKmdbLmXZ3K7w) @dave.enyeart @dave.enyeart Hey Dave, thank you very much. That is exactly how I solved it - I used empty values to enable the queries.

JonasM (Mon, 25 Feb 2019 10:12:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rHASTKmdbLmXZ3K7w) Hey Dave, thank you very much. That is exactly how I solved it - I used empty values to enable the queries.

ashuu-gupta (Mon, 25 Feb 2019 10:13:21 GMT):
Is it necessary to store all the aruguments in different array variable. Like color = arg[1], owner = arg[2]. Can't we store in one single variable. And if we can store in one variable, can we apply quey on it. func (t *SimpleChaincode) initMarble(stub shim.ChaincodeStubInterface, args []string) pb.Response { var err error // 0 1 2 3 // "asdf", "blue", "35", "bob" if len(args) != 4 { return shim.Error("Incorrect number of arguments. Expecting 4") } marbleName := args[0] color := strings.ToLower(args[1]) owner := strings.ToLower(args[3]) size, err := strconv.Atoi(args[2]) if err != nil { return shim.Error("3rd argument must be a numeric string") }

ashuu-gupta (Mon, 25 Feb 2019 10:13:21 GMT):
Is it necessary to store all the aruguments in different array variable. Like color = arg[1], owner = arg[2]. Can't we store in one single variable. And if we can store in one variable, can we apply query on it. func (t *SimpleChaincode) initMarble(stub shim.ChaincodeStubInterface, args []string) pb.Response { var err error // 0 1 2 3 // "asdf", "blue", "35", "bob" if len(args) != 4 { return shim.Error("Incorrect number of arguments. Expecting 4") } marbleName := args[0] color := strings.ToLower(args[1]) owner := strings.ToLower(args[3]) size, err := strconv.Atoi(args[2]) if err != nil { return shim.Error("3rd argument must be a numeric string") }

dave.enyeart (Mon, 25 Feb 2019 12:57:37 GMT):
@ashuu-gupta You can do anything you like. For example you could use JSON to pass everything in one string.

ashuu-gupta (Mon, 25 Feb 2019 13:01:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=dSLsm6gBZXti48yk9) @dave.enyeart But can i query after that for a particular field using selector function. for example fetch all the data where color = 'red' .

dave.enyeart (Mon, 25 Feb 2019 13:03:34 GMT):
If using CouchDB as state database you can query on any JSON field

ashuu-gupta (Mon, 25 Feb 2019 13:04:39 GMT):
can you send for the code for selector line

ashuu-gupta (Mon, 25 Feb 2019 13:04:48 GMT):
I tried but couldn't do it

ashuu-gupta (Mon, 25 Feb 2019 13:06:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oC6b6nwmFyyyjjXSM) @dave.enyeart can you send for the code for selector line? I tried but couldn't do it.

dave.enyeart (Mon, 25 Feb 2019 13:10:12 GMT):
JSON query sample at https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/go/marbles_chaincode.go#L525. See more examples and links for further help at the top of the file.

ashuu-gupta (Mon, 25 Feb 2019 13:11:20 GMT):
I have seen this, it works only when we store in different variables. If we store all the arguments as json, this query command is not working

ashuu-gupta (Mon, 25 Feb 2019 13:11:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8ZtFcDaeJQNTNbQXa) @dave.enyeart I have seen this, it works only when we store in different variables. If we store all the arguments as json in single variable, this query command is not working

dave.enyeart (Mon, 25 Feb 2019 13:13:01 GMT):
You need put values in different JSON fields when storing to state database. You can pass them into chaincode any way you like.

ashuu-gupta (Mon, 25 Feb 2019 13:17:22 GMT):
can you give a example? I'm struggling on this from last one month.

ashuu-gupta (Mon, 25 Feb 2019 13:17:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LmtLrLJYNpDS4tfdG) @dave.enyeart can you give a example? I'm struggling on this from last one month.

dave.enyeart (Mon, 25 Feb 2019 13:24:55 GMT):
The marbles02 sample has examples of JSON queries and examples of how to marshal and unmarshal JSON into fields in to golang.

dave.enyeart (Mon, 25 Feb 2019 13:24:55 GMT):
The marbles02 sample has examples of JSON queries and examples of how to marshal and unmarshal JSON into fields in golang.

DanielHruby (Mon, 25 Feb 2019 15:12:03 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.

walmon (Mon, 25 Feb 2019 16:32:47 GMT):
Hello everybody, recently we added Convector into Hyperledger Labs, Convector is a smart contracts framework for Fabric (and soon other frameworks) based in TypeScript and a model/controller pattern. I'd love to have feedback and know what you guys think of it https://github.com/hyperledger-labs/convector

muralisr (Mon, 25 Feb 2019 18:42:47 GMT):
@DanielHruby I assume you are using https://fabric-sdk-node.github.io/tutorial-channel-events.html ? If it `stop getting events without any error.` suggested checking in #fabric-sdk-node (if you haven't already)

muralisr (Mon, 25 Feb 2019 18:42:47 GMT):
@DanielHruby I assume you are using https://fabric-sdk-node.github.io/tutorial-channel-events.html ? If it `stop getting events without any error.` suggested checking in #fabric-sdk-node (if you haven't already) .. assume you are on latest release or dot-release picking up all recent bug fixes

iramiller (Mon, 25 Feb 2019 19:32:27 GMT):
Is there a refactor of the chain code build/run process planned for the 2.0 release of Hyperledger? My team is planning the best way to integrate with Hyperledger and we have been having some discussions around how the current system works. Presently I have a fork with a Kubernetes Controller integrated with the docker controller that bypasses all of the peer compile steps by always returning true that the image exists and scheduling the container as a pod in kubernetes pulled from our internal docker repositories instead. We would like to have something that integrates with Hyperledger a little more completely so that our work could be contributed back to the project as something that works for more than just our unique use cases. At the moment our internal discussions have focused on using the peer command in our admin-cli container to build source code into containers that are published into a local repository for the peers within the org to pull from when scheduling... We have more than 10 separate orgs in different google and AWS kubernetes clusters managed by different companies in our consortium. A solution that uses raw source code from a central Artifactory/Nexus repository and builds within in each org would be useful for the review step of chaincode by members within our consortium. Is this the right place for this discussion? Perhaps one of the maintainers would like to discuss this withe me or others on my team further?

muralisr (Mon, 25 Feb 2019 20:13:19 GMT):
@iramiller there is ongoing work on `Peer and Chaincode cloud native deployment support ` (https://jira.hyperledger.org/browse/FAB-13582 ) which is relevant to the above. The core idea is to separate chaincode management from Peer and leave it to the organizations. This will make native k8s support more inline with traditional cloud management (and has other signficant benefits as well).

muralisr (Mon, 25 Feb 2019 20:13:19 GMT):
@iramiller there is ongoing work on `Peer and Chaincode cloud native deployment support ` (https://jira.hyperledger.org/browse/FAB-13582 ) which is relevant to the above. The core idea is to separate chaincode management from Peer and leave it to the organizations. This will make native k8s support more inline with traditional cloud management (and has other signficant benefits as well). ...link to a preliminary playback on this https://wiki.hyperledger.org/download/attachments/2392116/20190206-chaincode-cloud-native-deployment.mp4?api=v2

iramiller (Mon, 25 Feb 2019 20:14:35 GMT):
Our patch for kubernetes controller achieves much of that ticket ...

iramiller (Mon, 25 Feb 2019 20:15:23 GMT):
Looks like the direction of Hyperledger is away from raw source files ...,

muralisr (Mon, 25 Feb 2019 20:15:29 GMT):
yes

muralisr (Mon, 25 Feb 2019 20:16:06 GMT):
in addition there's a fundamnenta change in client/server orientation that'll add other benefits as well

iramiller (Mon, 25 Feb 2019 20:18:38 GMT):
Lots to unpack in that ticket ... definitely a good direction though.

muralisr (Mon, 25 Feb 2019 20:19:19 GMT):
`Looks like the direction of Hyperledger is away from raw source files` - that has to be answered a bit more carefully (than the deleted, hasty "yes" :-) )

iramiller (Mon, 25 Feb 2019 20:21:14 GMT):
For audibility of chaincode source into what is actually executing ... and the separate organizations who by installing the chaincode would be endorsing it ...

muralisr (Mon, 25 Feb 2019 20:21:32 GMT):
in general, the direction is to recognize there is much to be gained at different levels (usability, flexibility, capabilities, modeling etc) in relaxing the requirement that we need the source files and everyine should have the same source files. That is not to say there isn't benefit in having the same source files either

iramiller (Mon, 25 Feb 2019 20:21:34 GMT):
and ensuring consistency across the entire consortium ...

muralisr (Mon, 25 Feb 2019 20:21:38 GMT):
well

muralisr (Mon, 25 Feb 2019 20:22:22 GMT):
that's some thing that cannot be enforced even today easily (case in point, look at fork you did to cut off the image generation completely)

iramiller (Mon, 25 Feb 2019 20:22:26 GMT):
I am fine with an answer of "implement a process outside of Hyperledger"

muralisr (Mon, 25 Feb 2019 20:22:34 GMT):
right

muralisr (Mon, 25 Feb 2019 20:24:09 GMT):
that approach does not detract any of the values of the current processes/features in fabric

iramiller (Mon, 25 Feb 2019 20:25:55 GMT):
certainly this is something I need to watch close ... some what unrelated but impacted by this is that our chaincode containers run with a special validating security context that generates encryption keys ... the public keys are flowed into a central KMS and we have privacy protections based on encrypting everything. Eventually if TEEs become a reasonable choice that our approach is positioned for that purpose. Having the ability to control the chaincode containers fully is a requirement for our approaches.

muralisr (Mon, 25 Feb 2019 20:26:21 GMT):
there you go...

muralisr (Mon, 25 Feb 2019 20:26:51 GMT):
great observations... if you haven't done so already please do take a look at the attached doc in that FAB

iramiller (Mon, 25 Feb 2019 20:27:02 GMT):
converting the chaincode container to a server complicates things somewhat given the formal methods used for communicating with a TEE

iramiller (Mon, 25 Feb 2019 20:27:24 GMT):
(reviewing now)

muralisr (Mon, 25 Feb 2019 20:27:45 GMT):
it can still be a docker container (and likely will be)

muralisr (Mon, 25 Feb 2019 20:27:58 GMT):
its just not created/managed by fabric

iramiller (Mon, 25 Feb 2019 20:30:40 GMT):
Chaincode containers instantiated with repository, image name, and version as a SHA (instead of a number of 'latest') fit very well with the tight controls on what code can be invoked/scheduled as designated on the channel.

iramiller (Mon, 25 Feb 2019 20:30:40 GMT):
Chaincode containers instantiated with repository, image name, and version as a SHA (instead of a number or 'latest') fit very well with the tight controls on what code can be invoked/scheduled as designated on the channel.

muralisr (Mon, 25 Feb 2019 20:36:32 GMT):
to avoid confusion, what is the context for that observation ... ?

muralisr (Mon, 25 Feb 2019 20:37:20 GMT):
(as you kniw there's the current notion of "version" that will be blurred)

iramiller (Mon, 25 Feb 2019 20:37:46 GMT):
we want to determine that the source code which was audited and built in a controlled process is the only version that is allowed to run regardless of which image repository it is sourced from

iramiller (Mon, 25 Feb 2019 20:39:54 GMT):
by using chaincodename with a specific hash b602f265313c9e4b3e4892505f7652c46540d926 for example in the channel config then distributed organizations with their own internal docker repositories can be sure they have an identical and unmodified version of the code running

iramiller (Mon, 25 Feb 2019 20:40:27 GMT):
without sourcing the images from one central repository (if for example that is not desired for private network reasons)

iramiller (Mon, 25 Feb 2019 20:42:05 GMT):
an image of `postgres@sha256:bf87ee22821e1bc5cedd5da2def1700685a9e3828605b31162d8f04e16c06385` is more strongly controlled then `postgres:9.6.6-alpine`

muralisr (Mon, 25 Feb 2019 20:42:27 GMT):
each org can have its own notion of what the correct chaincode is.... in other words that process could be internal to the org

iramiller (Mon, 25 Feb 2019 20:45:05 GMT):
especially with the ability to reach outside of the chaincode via network access the approach described in this document along with more flexible versioning seems to open up a very real possibility of transactions that can not be repeated and verified with only the contents of what is on chain... is the idea then that those consistency decisions are an "exercise for the reader" so to speak versus something the platform strives to ensure are hard requirements?

iramiller (Mon, 25 Feb 2019 20:46:30 GMT):
... actually at this point I think I need to discuss things further with my team ... what is the most appropriate way to provide any additional feedback to the team... through comments on the JIRA? or just bring up further points in this (or another) channel?

muralisr (Mon, 25 Feb 2019 20:49:56 GMT):
comments in the JIRA is good ... or if its more appropriate to comment on the doc if that has more context, that;s good as well

iramiller (Mon, 25 Feb 2019 21:03:02 GMT):
The last important comment I have about why tightly controlling the exact executable that is run for a chaincode is that it is a critical aspect of the distributed trust problem a blockchain is solving. If I am working with a remote partner(s) and I have sensitive proprietary data ... an important factor in that trust relationship is that all of the partners can certify that the data is handled only by the exact version of the chaincode intended. As a member I do not want a remote peer to be able to invoke chaincode with my data unless it is run with code as agreed.

muralisr (Mon, 25 Feb 2019 21:12:50 GMT):
right, however the moment you send a request to the remote peer with the sensitive data, there's already a level of trust, never mind what the chaincode is doing with it.

iramiller (Mon, 25 Feb 2019 21:22:44 GMT):
Certainly ... and an organization is not likely to be part of a private blockchain consortium without some sort of legal arrangement being in place. That doesn't mean that we would want to abandon the idea of using strong guarantees on what software is running at this level, especially given we already have it at every other level in the stack and this last area is actually the one most prone to churn. The idea of allowing strong version requirements wouldn't be an overly adverse impact so long as other approaches like `latest` tags or simple version numbers were also allowed for those with flexible use cases.

muralisr (Mon, 25 Feb 2019 21:33:12 GMT):
`especially given we already have it at every other level in the stack ` - as in organizations sign off on the version requirements on the entire stack ? Perhaps I'm missing something...butOrgs can even choose their own vendor to host fabric.

iramiller (Mon, 25 Feb 2019 21:46:34 GMT):
auditing the exact version of containers running in an environment is a pretty trivial task ... drawing up a legal agreement that requires a specific set of versions is also pretty straight forward to do for company legal along with the associated compliance checking ... there are plenty of tools on that side for organizations to work with on a private blockchain network. As an example we have an agent running in each environment that is doing many of these auditing and consistency checks on a continuous basis and reporting those details into a consolidated location for compliance checking.

muralisr (Mon, 25 Feb 2019 22:14:39 GMT):
injecting a chaincode version check based on hash to this process should be fairly straightforward then

iramiller (Mon, 25 Feb 2019 23:37:10 GMT):
This seems very important ... as a concrete example if I have chaincode calculating fees I need to have the ability to get it deployed everywhere before instantiating it on the channel ... with a larger multiple member consortium that is going to take time. With the chaincode as a service approach there would need to be multiple services or multiple versions within the chaincode service ... or some other solution (of which no obvious ones are apparent). With the current setup we are using the peers all know which version they need from channel config and they request that kubernetes schedules that specific version be instantiated. It would be especially important to have these strict versions available, ideally even more than one version available at once for replaying and validating historical data if so required. This is a complex issue and I look forward to seeing what the HLF team comes up with. I forwarded the google doc and the Jira issue around so we can keep an eye on it and provide any comments or insights that we might have which could prove useful. Admittedly our large financial securitization system is a pretty unique case with members spanning the 3 major public cloud providers on a full private network but I believe our use case might still provide an interesting set of constraints to consider.

iramiller (Mon, 25 Feb 2019 23:58:55 GMT):
One solution to the versioning issue would be to go full on service mesh routing ... we have considered something like Istio or Linkerd which would also help make some of the TLS certificate pain go away ... these solutions do add a non-trivial amount of complexity to the architecture though.

YSZYCF (Tue, 26 Feb 2019 05:19:32 GMT):

企业微信截图_15511535127267.png

netanyahuyasser (Tue, 26 Feb 2019 07:54:44 GMT):
Has joined the channel.

netanyahuyasser (Tue, 26 Feb 2019 08:03:20 GMT):
I try to use the getHistoryForKey method in fabric-node-sdk. When I tried to getValue, it returns a Buffer object. When I try to parse the Buffer into string, it shows something like this

netanyahuyasser (Tue, 26 Feb 2019 08:03:20 GMT):
I try to use the getHistoryForKey method in fabric-node-sdk. When I tried to getValue, it returns a Buffer object. When I try to parse the Buffer into string, it shows something like this `ByteBufferNB(offset=74,markedOffset=-1,limit=155,capacity=3921)`. The capacity value is increasing whenever I change the the value of KV-pair. My question is how do we read the actual history value of corresponding KV-value?

netanyahuyasser (Tue, 26 Feb 2019 08:03:20 GMT):
I try to use the `getHistoryForKey` method in fabric-node-sdk. When I tried to `getValue`, it returns a Buffer object. I try to parse the Buffer into string and it shows something like `ByteBufferNB(offset=74,markedOffset=-1,limit=155,capacity=3921)`. The capacity value is increasing whenever I change the the value of KV-pair. My question is how do we read the actual history value of corresponding KV-value using the `getHistoryForKey` method?

govinda-attal (Tue, 26 Feb 2019 08:53:08 GMT):
Has joined the channel.

govinda-attal (Tue, 26 Feb 2019 09:00:11 GMT):
hello guys, I would really appreciate your opinion on this one :-) For chaincode development in Go, sometimes using using sub interface feels like the code written is too low level - routing logic, marshal unmarshal to json, error handling, validations, etc. With this regards, https://github.com/s7techlab/cckit this library helped to write more abstract but business application friendly code (with fewer lines of code) The only place where this library lacks is ability to keep up with new features of fabric like private data, pagination, etc... so we fall back to stub interface. Do you think supporting this library for Go chaincode or similar measures in say Node or other langs when writing chaincode will help. Of course we could write our own wrapper libs (like this an opinionated one).. but something that comes from community and supported by more contributors will always be preferred, your thoughts?

rthatcher (Tue, 26 Feb 2019 10:23:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bBbMt3eigTfpX2HmM) @netanyahuyasser - `getHistoryForKey` returns an iterator - the Fabcar sample shows how to extract data from an iterator (although it is doing a range query not a history query) - https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/fabcar/javascript/lib/fabcar.js#L112

netanyahuyasser (Tue, 26 Feb 2019 10:55:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ymw7xamFuYzSMwzeu) @rthatcher You save my day @rthatcher. Much obliged!

dave.enyeart (Tue, 26 Feb 2019 11:28:10 GMT):
@govinda-attal Higher-level APIs are indeed getting added to node.js chaincode and then to java and go chaincode. I'd suggest to partner with others already working in this area. @mbwhite could probably explain the current plan.

govinda-attal (Tue, 26 Feb 2019 11:30:16 GMT):
@dave.enyeart many thanks for your reply. I would be happy to hear from @mbwhite too :-)

DavorKljajic (Tue, 26 Feb 2019 11:36:04 GMT):
Hello guys , im using the chaincode docker dev with marbles02 node, in first step i start the network, second i execute the " CORE_CHAINCODE_ID_NAME="marbles02:v0" node marbles_chaincode.js --peer.address peer:7052", when i want to install i have i have this error" Error: Error endorsing chaincode: rpc error: code = Unimplemented desc = unknown service protos.Endorser"

rthatcher (Tue, 26 Feb 2019 12:11:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=uDNTCAMH8naRFgprr) @DavorKljajic I think you need to specify the peer address differently - try this command to start the chaincode: `CORE_CHAINCODE_ID_NAME="marbles02:v0" CORE_PEER_ADDRESS=peer:7052 node marbles_chaincode.js` (This command assumes you are running the chaincode in some sort of cli docker container and the name "peer" is the docker name for the peer container.)

walmon (Tue, 26 Feb 2019 14:15:21 GMT):
@dave.enyeart and @mbwhite I'm interested in the node interfaces, we created Convector which is in the hyperledger labs and already makes it feel higher level through a set of tools

walmon (Tue, 26 Feb 2019 14:15:28 GMT):
We may collaborate as well

theathibm (Tue, 26 Feb 2019 15:23:48 GMT):
Does anyone know about stub.invokeChaincode() and how to get the expected "payload" back successfully in "node" (not GO)? Here is a link to a discussion regarding support for invokeChaincode: https://jira.hyperledger.org/browse/FAB-9832. But I can't seem to make it work.

theathibm (Tue, 26 Feb 2019 15:25:00 GMT):

Clipboard - February 26, 2019 10:24 AM

theathibm (Tue, 26 Feb 2019 15:25:00 GMT):

Clipboard - February 26, 2019 10:24 AM

theathibm (Tue, 26 Feb 2019 15:25:00 GMT):

Clipboard - February 26, 2019 10:24 AM

theathibm (Tue, 26 Feb 2019 15:25:00 GMT):

Clipboard - February 26, 2019 10:24 AM

icordoba (Tue, 26 Feb 2019 18:04:36 GMT):
Hello I am developing a Wallet type application in Java chaincode with basically 2 models, Wallet and MoneyTransfer. MoneyTransfer has properties for the from Wallet and target Wallet ids. I have not found examples of how to code in the chaincode a query method to fetch, for example, all MoneyTransfer's for a specific wallet. Any URL for doc or help on how to do this? (Samples I have found just fetch models by Id from ChaincodeStub) Thanks.

ApurvTandon (Tue, 26 Feb 2019 19:08:39 GMT):
could some one clarify if the hyperledger fabric REST beta server works on the new fabric 1.4 release ?

Rajatsharma (Tue, 26 Feb 2019 20:38:03 GMT):
Can we rollback any transaction using it's transaction ID. I know data is immutable so probably a way by which we could send in another transaction. But my main motive is to reverse the transaction.

walmon (Tue, 26 Feb 2019 21:28:27 GMT):
You could do a function in your chaincode for that @Rajatsharma but the history will prevail

prabu3192 (Wed, 27 Feb 2019 06:02:01 GMT):
Has joined the channel.

Aniket.1 (Wed, 27 Feb 2019 08:38:45 GMT):
Has joined the channel.

srinivasd (Wed, 27 Feb 2019 10:35:36 GMT):
Hi All, How to pass a file path while invoking the chaincode. Please suggest some link

srinivasd (Wed, 27 Feb 2019 10:35:54 GMT):
and that has to be read in chaincode

balakrishna.devasani (Wed, 27 Feb 2019 11:45:34 GMT):
Hi All, i have a requirement in chaincode where i need to create a view (design document) in couchdb database. Do hyperledger fabric allow to create a view in couchdb ? Thanks in advance.

dave.enyeart (Wed, 27 Feb 2019 12:37:28 GMT):
@balakrishna.devasani No View support, for aggregate queries see the suggestion at https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html#good-practices-for-queries

rthatcher (Wed, 27 Feb 2019 12:37:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vGkeHx6QJajGXygDT) @balakrishna.devasani Currently you are not able to create views inCouchDB. There is a Jira outstanding for this, but I don't think there is a timetable for implementing it: https://jira.hyperledger.org/browse/FAB-5528

mbwhite (Wed, 27 Feb 2019 13:05:04 GMT):
@walmon Hello - thanks for the contact... more than happy to talk!

mbwhite (Wed, 27 Feb 2019 13:05:04 GMT):
@walmon Hello - thanks for the contact... more than happy to talk, and discuss the interfaces etc..

mbwhite (Wed, 27 Feb 2019 13:10:37 GMT):
likewise @govinda-attal happy to go through this; thinking of the best thing to do here; couple of items 'on my desk' today.. but perhaps this could be a topic for the thursday developer community call?

donjohnny (Thu, 28 Feb 2019 07:20:56 GMT):
Hi All, I have a question regarding the following functionalities: https://jira.hyperledger.org/browse/FAB-7406 https://jira.hyperledger.org/browse/FAB-13582 Where are we standing wrt to cloud native support for the chaincode containers? Has anyone else been successfull at deploying fabric in non-root mode?

jv_400 (Thu, 28 Feb 2019 16:14:12 GMT):
Has joined the channel.

Rajatsharma (Thu, 28 Feb 2019 19:52:16 GMT):
I'm trying to delete some records using querying some records by `GetQueryResult()` and then removing them. I had implemented update in batches by using `skip` keyword in mango-queries. I was able to perform update as suppose I perform update on 10 records and skip them, then I'll get the next 10 records but with delete as the records get deleted I'm left with the dilema that I can't fire the other query because if the block gets committed then I'll lose those 10 records. And if I wait for the block to commit. The overall for my application that would require a lot of time. Could anyone suggest me any work-around.

duwenhui (Fri, 01 Mar 2019 09:00:12 GMT):
Has joined the channel.

duwenhui (Fri, 01 Mar 2019 09:00:21 GMT):
At present, there is a need to design an Org, and specify the Org peer to implement a special endorsement function, such as the deduction in the billing function in the process of endorsement, and the deduction information need to be on the chain. I know that the fabric supports the plugin way to modify the endorsement smart contract. Can fabric support and achieve such a function?

mahoney1 (Fri, 01 Mar 2019 09:58:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LvYxJgfGGzBWrAcaW) @duwenhui should be able to, yes (policy, rather than 'function') - more on this is described here -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/endorsementpolicies.html?highlight=endorsement and here -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/endorsement-policies.html

Rajatsharma (Fri, 01 Mar 2019 10:46:32 GMT):
Could anyone help me to get the difference between view and indexes in couchDb. I want to know what will be useful for y case

Rajatsharma (Fri, 01 Mar 2019 10:46:32 GMT):
Could anyone help me to get the difference between view and indexes in couchDb. I want to know what will be useful for my case

rthatcher (Fri, 01 Mar 2019 11:02:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=r46inuiKSEd3pz8rE) @Rajatsharma Views are not currently supported for Fabric - so you will want to focus on Indexes.

rthatcher (Fri, 01 Mar 2019 11:02:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=r46inuiKSEd3pz8rE) @Rajatsharma Views are not currently supported for Fabric - so you will want to focus on Indexes. Have you saeen this tutorial in the Fabric docs? https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html

duwenhui (Fri, 01 Mar 2019 11:22:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pQYFTKg2HHNDWEiwz) @mahoney1 clearly that I need to write the coustom (escc) by plugin way to achieve to write some transactions to the fabric? can fabric support this?

dave.enyeart (Fri, 01 Mar 2019 12:34:48 GMT):
@duwenhui that sounds like normal chaincode logic, rather than an endorsement plugin.

dave.enyeart (Fri, 01 Mar 2019 12:34:48 GMT):
@duwenhui that sounds like normal chaincode logic, rather than an endorsement plugin. Why do you think you need a plugin?

gade (Fri, 01 Mar 2019 13:09:44 GMT):
Has joined the channel.

Estebanrestrepo (Fri, 01 Mar 2019 19:36:04 GMT):
Has joined the channel.

harshitrajan (Fri, 01 Mar 2019 20:06:40 GMT):
Has joined the channel.

duwenhui (Sat, 02 Mar 2019 14:43:24 GMT):
@dave.enyeart In fact, we want to implement a similar Ethereum, which consumes a certain amount of gas for each transaction, so we must design two smart contracts, one to complete the business transaction and one to complete the gas billing function. So you need a smart contract to invoke a smart contract. At the same time, vscc cannot support concurrent execution. So we picture that design the gas billing in the endorsement contract(escc).

silliman (Sat, 02 Mar 2019 14:52:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=YTXRKnPxYb6JGDJpZ) @duwenhui Have you investigated the upcoming Token Management support in Hyperledger Fabric to see if it may be useful to your use case? Go here https://wiki.hyperledger.org/display/fabric/Playbacks and search on 'Token' and you will find three playbacks- from August 14, 2018, January 15, 2019, and February 26, 2019- that may be of interest to you.

Hezaveh (Sat, 02 Mar 2019 15:00:34 GMT):
Hey... I am trying to add SetStateValidationParameter to the fabcar example. when I run invoke, it says: Retrieved channel (mychannel) orderer endpoint: orderer.example.com:7050 Error: endorsement failure during invoke. response: status:500 message:"PUT_STATE_METADATA failed: transaction ID: c218551e48c2cfc08286f9b02beb162a6707d87095a260454ced4be5cc47185b: key level endorsement is not enabled" Any idea how I can solve this problem?

dave.enyeart (Sat, 02 Mar 2019 15:53:26 GMT):
To ensure deterministic behavior across peers, your channel needs to support at least V1_3 application capabilities, for more information see https://hyperledger-fabric.readthedocs.io/en/release-1.3/upgrading_your_network_tutorial.html#overview and an example config at https://github.com/hyperledger/fabric-samples/blob/release-1.3/first-network/configtx.yaml#L156

muralisr (Sat, 02 Mar 2019 20:54:44 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tYhgm6RvEvoaGtFPJ

muralisr (Sat, 02 Mar 2019 20:58:43 GMT):
@donjohnny theres ongoing work for https://jira.hyperledger.org/browse/FAB-13582 under https://gerrit.hyperledger.org/r/#/c/29687/ and child CRs (in review).

tstonely (Sun, 03 Mar 2019 14:13:04 GMT):
Has joined the channel.

duwenhui (Mon, 04 Mar 2019 02:27:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SjNQmy2trGegeoeXn) @silliman Thank you for detailed reply, So When will the latest release version support fabric token function ? What and how can I do with fabric token before release version?

mahoney1 (Mon, 04 Mar 2019 10:15:48 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)

GaneshGhag (Mon, 04 Mar 2019 10:48:52 GMT):
Has joined the channel.

Mahesh-Raj (Mon, 04 Mar 2019 10:50:50 GMT):
Has joined the channel.

Mahesh-Raj (Mon, 04 Mar 2019 10:50:57 GMT):
Hey all, this is regarding Fabric1.4 Private Data Let's say I have 5 Orgs, (Org1, Org2, Org3, Org4, Org5) and each of them wants to do some transactions where only TWO Orgs are involved and they wanna keep them Private. I wanna use only 1 Channel 1. How many collections would network need? 2. If a new Org has to be added (Org6), how will existing Organisations gonna know about new Collections to interact with Org6?

GaneshGhag (Mon, 04 Mar 2019 11:05:47 GMT):
Some simple code which will simulate a ctx.stub when you want to run and test chaincode on local node setup class Stub { constructor(){ this.dataInMemory = {}; } async putState(key, value){ this.dataInMemory[key] = value; } async getState(key){ return this.dataInMemory[key]; } } class InMemoryContext { constructor(){ this.stub = new Stub(); } } Having above code in your local setup, you can execute you smart contract locally and test it to reasonable extent before deploying it onto a network console.log('starting out....'); let mod1 = new ReverseBid(); //your smart contract(SC) let ctx = new InMemoryContext(); await mod1.initLedger(ctx); //your init code for SC await mod1.addAssetForBid(ctx,'key2','asset 2 desc','Mandy2','99999'); //your business method for SC

dave.enyeart (Mon, 04 Mar 2019 13:02:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Fkd2QbNDihkfi572q) @Mahesh-Raj You will need a collection for every pair of orgs. You can add a collection by updating the chaincode with a new collection definition, see https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#updating-a-collection-definition. Note that there is a feature on the roadmap for the client to choose the recipients rather than encode the collection in the chaincode to support use cases where all permutations are needed without having to define each one explicitly.

dave.enyeart (Mon, 04 Mar 2019 13:02:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Fkd2QbNDihkfi572q) @Mahesh-Raj You will need a collection for every pair of orgs. You can add a collection by upgrading the chaincode with a new collection definition, see https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#updating-a-collection-definition. Note that there is a feature on the roadmap for the client to choose the recipients rather than encode the collection in the chaincode to support use cases where all permutations are needed without having to define each one explicitly.

Mahesh-Raj (Mon, 04 Mar 2019 13:12:15 GMT):
thanks @dave.enyeart , that helps a lot

devboy00 (Mon, 04 Mar 2019 18:38:30 GMT):
Has joined the channel.

sean.brown2796 (Mon, 04 Mar 2019 19:08:56 GMT):
Has joined the channel.

harshitrajan (Tue, 05 Mar 2019 09:53:15 GMT):
Hi folks, I am trying to enroll admin through node SDK , but i got error "Failed to enroll admin, error:%o message=Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054], stack=Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]"

harshitrajan (Tue, 05 Mar 2019 09:54:06 GMT):
kindly help me to regarding this

mahoney1 (Tue, 05 Mar 2019 11:11:28 GMT):
@harshitrajan sounds like your CA server docker container isn't running :-) you can check your Fabric's status with `docker ps `

muralisr (Tue, 05 Mar 2019 13:09:53 GMT):
@harshitrajan `127.0.0.1:7054` is a "local" host address (assumes - in your case - CA is running on the same machine as SDK). I'd verify to make sure you are using the IP for the CA

Rajatsharma (Tue, 05 Mar 2019 19:28:47 GMT):
Yes @harshitrajan had mapped ca on a different port that's why he was facing this issue. Thanks !!

PMoura (Wed, 06 Mar 2019 01:50:24 GMT):
Hello guys. I'm facing an issue related to starting the chaincode on the peers, because the command included in the `package.json` is `fabric-chaincode-node start`. This fails on the server because it issues the command `fabric-chaincode-node start "--peer.address" "peer0.org1.example.com:7052"`. However, my port for the peer it is not 7052, but 17052 (yes, I'm using VSCode Extension). Do you know how can we solve this? Thanks.

harshitrajan (Wed, 06 Mar 2019 06:10:25 GMT):
@PMoura I think check you configuration file of peer or there is mismatch in port forwarding

HoneyShah (Wed, 06 Mar 2019 06:52:08 GMT):
Hello All, I am getting following error while invoking chaincode: `E0306 05:24:56.195214856 19 ssl_transport_security.cc:238] Could not get common name of subject from certificate.`

mahoney1 (Wed, 06 Mar 2019 09:39:25 GMT):
@PMoura there's one (single) peer in that extension's config (you'll see in the docker-compose.yml the mapped setting is ${PEER_CHAINCODE_PORT}:7052 and `netstat -an` would confirm that. I suggest to do a teardown and start Fabric in the tool. Also check you meet the requirements per the tool.

rthatcher (Wed, 06 Mar 2019 09:54:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=X8P3BDg4diXYSuBwt) @PMoura The command you are seeing (in your chaincode container log?) is the normal command - the `peer0.org1.example.com:7052` is correct as it refers to the address and port which are known *within the docker environment*. I don't think this command is the cause of your problem - what error messages are you seeing?

HoneyShah (Wed, 06 Mar 2019 10:20:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=idxPn6cmHTe2YT4AE) @rthatcher @mahoney1 Can you please help?

mahoney1 (Wed, 06 Mar 2019 10:43:34 GMT):
@HoneyShah could be a number of things - have you check the logs of your CA server/chaincode containers?

HoneyShah (Wed, 06 Mar 2019 10:50:56 GMT):
@mahoney1 the logs I have posted is of chaincode container and I don't find anything wrong in CA logs. Here are the CA logs: https://pastebin.com/ZrXnJDsY

PMoura (Wed, 06 Mar 2019 19:11:42 GMT):
@rthatcher , @mahoney1 , @harshitrajan ,

PMoura (Wed, 06 Mar 2019 19:11:42 GMT):
@rthatcher , @mahoney1 , @harshitrajan , Configuration of my network: ` (...) "peer0.org1.example.com": { "url": "grpc://localhost:17051", "eventUrl": "grpc://localhost:17053" } (...) ` In fact, when I issue the command netstat -an on the chaincode peer, the results are: `root@86a262b61be4:/# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.11:37797 0.0.0.0:* LISTEN tcp 0 0 172.18.0.7:35344 172.18.0.6:7052 ESTABLISHED udp 0 0 127.0.0.11:34400 0.0.0.0:* Active UNIX domain sockets (servers and established)` And the starting logs from the chaincode peer are the following: `> globalfinancing-js@0.0.15 start /usr/local/src > fabric-chaincode-node start "--peer.address" "peer0.org1.example.com:7052" (node:17) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead schema $id ignored http://json-schema.org/draft-07/schema# schema $id ignored http://json-schema.org/draft-07/schema# schema $id ignored http://json-schema.org/draft-07/schema# Command succeeded` However, when I try to issue the command on the chaincode peer shell, I get the following: `root@86a262b61be4:/usr/local/src# npm start > globalfinancing-js@0.0.14 start /usr/local/src > fabric-chaincode-node start fabric-chaincode-node start --peer.address localhost:7051 --chaincode-id-name mycc Options: --help Show help [boolean] -v, --version Show version number [boolean] --peer.address [string] [required] --grpc.max_send_message_length [number] [default: -1] --grpc.max_receive_message_length [number] [default: -1] --grpc.keepalive_time_ms [number] [default: 110000] --grpc.http2.min_time_between_pings_ms [number] [default: 110000] --grpc.keepalive_timeout_ms [number] [default: 20000] --grpc.http2.max_pings_without_data [number] [default: 0] --grpc.keepalive_permit_without_calls [number] [default: 1] --ssl-target-name-override [string] --chaincode-id-name [string] [required] --module-path [string] [default: "/usr/local/src"] Missing required argument: peer.address npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! globalfinancing-js@0.0.14 start: `fabric-chaincode-node start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the globalfinancing-js@0.0.14 start 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! /root/.npm/_logs/2019-03-06T17_53_34_458Z-debug.log` I can execute my transactions without any error and the network seems to be working well. However, I'm trying to test the use of `metadata.json` for my chaincode, and I think it is ignored.

mcoblenz (Wed, 06 Mar 2019 20:44:24 GMT):
Hi all. I see it's possible to have multiple smart contracts in the same chaincode. But is it the case that exactly one smart contract must be the one that is publicly addressable (i.e. the one to which all invocations are sent)?

mauricio (Wed, 06 Mar 2019 21:42:02 GMT):
Has joined the channel.

Jaline (Thu, 07 Mar 2019 03:15:50 GMT):
Has left the channel.

sprintwithcarlos (Thu, 07 Mar 2019 04:43:39 GMT):
Has joined the channel.

MuhammedHafil (Thu, 07 Mar 2019 07:32:01 GMT):
Is it possible to check if a given enrollment id exists from withing chaincode?

HoneyShah (Thu, 07 Mar 2019 09:03:24 GMT):
Hello all, I have two organizations and each has one peer. I am using `AND` endorsement policy. I am storing the timestamp in one field which will later be stored in the state database (I am doing this stuff in chaincode). So, now my question is that field with a timestamp will have different values for both peers so my transaction is getting failed with an error of `failure of endorsement policy`. How can I deal with this situation?

HoneyShah (Thu, 07 Mar 2019 09:03:24 GMT):
Hello all, I have two organizations and each has one peer. I am using `AND` endorsement policy. I am storing the timestamp in one field which will later be stored in the state database (I am doing this stuff in chaincode). So, now my question is, that field with a timestamp will have different values for both peers. So ,my transaction is getting failed with an error of `failure of endorsement policy`. How can I deal with this situation?

rthatcher (Thu, 07 Mar 2019 10:34:48 GMT):
@PMoura - your chaincode is already running - why are you connecting to the chaincode container and running this command?

pankajchoudhary1990 (Thu, 07 Mar 2019 11:22:50 GMT):
Has joined the channel.

mahoney1 (Thu, 07 Mar 2019 11:24:58 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

knagware9 (Thu, 07 Mar 2019 11:29:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mB6Na6kAz2j7ghZEE) @HoneyShah dont use timestamp in chaincode level,, when chaincode executed at different peer it creates different timestamp and that is causing error of endorsment policy bcoz both peer would have diffrenet read-write set ,,pass timestamp via any SDK

mahoney1 (Thu, 07 Mar 2019 11:38:32 GMT):
@HoneyShah timestamp is already available to you for your trxn - see more at https://fabric-shim.github.io/release-1.3/fabric-shim.ChaincodeStub.html#getTxTimestamp__anchor

mahoney1 (Thu, 07 Mar 2019 11:38:32 GMT):
@HoneyShah timestamp is already available to you for your trxn - see more at https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getTxTimestamp__anchor

dave.enyeart (Thu, 07 Mar 2019 12:07:31 GMT):
Right - Clients automatically put the system timestamp in the transaction proposal header. Endorsers can retrieve this timestamp in chaincode using chaincode api GetTxTimestamp(). This will be deterministic across endorsers. You can also pass a timestamp as an argument to the chaincode, just be sure you pass the same timestamp in each transaction proposal to all the endorsers.

HoneyShah (Thu, 07 Mar 2019 12:12:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZD5kfeMnT4pznwpGF) @mahoney1 Yes, there is timestamp but I need database records sorted by timestamp. So I have added that to database field. How can I achieve that?

HoneyShah (Thu, 07 Mar 2019 12:15:06 GMT):
@mahoney1 @dave.enyeart Yes, there is timestamp but I need database records sorted by timestamp. So I have added that to database field. How can I achieve that?

florianc (Thu, 07 Mar 2019 12:31:12 GMT):
Has joined the channel.

dave.enyeart (Thu, 07 Mar 2019 13:09:05 GMT):
You can encode timestamp as an integer, e.g. using epoch seconds, and then sort on this field..

Hezaveh (Thu, 07 Mar 2019 14:14:23 GMT):
In fabcar example I'd like to do a field field validation. So for example color can only be blue or red. I thought it may be possible by using SetStateValidationParameter. hey...

rthatcher (Thu, 07 Mar 2019 14:24:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=sn9TzsiNaLc9GrZAn) @Hezaveh - `setStateValidationParameter` is for State Based Endorsement - setting an endorsement policy for a particular key in the State database. You will need to write code to validate fields. Using typescript would help a little or you could try some external 'model' solution.

rthatcher (Thu, 07 Mar 2019 14:45:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cwzatah7jR9w9Hojv) @mcoblenz - yes you can define multiple Smart Contracts into one chaincode package. All the functions in all Smart Contracts will be callable/accessible by name - unless there are duplicate names. In the event of duplicate function names, the one from the first contract will become the default and will be used. (I think 'first' is determined alphabetically.) But rather than rely on defaults, best practise is to namespace each contract as per the Commercial Paper Sample: ``` constructor() { super('org.papernet.commercialpaper'); } ```

mahoney1 (Thu, 07 Mar 2019 15:33:34 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

Hezaveh (Thu, 07 Mar 2019 15:44:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Radd9gn8bYehzcYjk) @rthatcher I am using go version. any idea on that?

mcoblenz (Thu, 07 Mar 2019 16:06:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AjRMNGiDZEXR3xRAL) @rthatcher Hm. Are you assuming I'm using JS chaincode here? I'm actually writing Java chaincode.

rthatcher (Thu, 07 Mar 2019 17:05:19 GMT):
@mcoblenz - yes I was referring to JS! I'm sorry I can't answer the same question wrt Java.

muralisr (Thu, 07 Mar 2019 17:07:02 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EcLJL87AmeFwy4fXb

muralisr (Thu, 07 Mar 2019 17:10:29 GMT):
@mcoblenz "Smart Contract" could take different meaning based on the application definition (sometimes the chaincode itself is referred to as a "smart contract"). (It seems in ur case the chaincode is a "container" for "Smart Contracts" perhaps ?) ... in any case "addressibility" is basically at chaincode level.

mahoney1 (Thu, 07 Mar 2019 18:00:03 GMT):
fyi all: Links promised from today's Fabric Developer Community call (recording (MP4) of the call will be made available in due course): Matthews repo (a number of examples here - note: work-in-progress !) https://github.com/ampretia/fabric-application-examples Fabric Samples Commercial Paper: https://github.com/hyperledger/fabric-samples/tree/release-1.4/commercial-paper Go developer API (prototype) Link: https://github.com/awjh-ibm/fabric-go-developer-api @jmason900 - JIRA epic for Contract Metadata discussed on call https://jira.hyperledger.org/browse/FAB-12071

mahoney1 (Thu, 07 Mar 2019 18:00:03 GMT):
fyi all: Links promised from today's Fabric Developer Community call (recording (MP4) of the call will be made available in due course): Matthews repo (a number of examples here (see README) - note: work-in-progress !) https://github.com/ampretia/fabric-application-examples Fabric Samples Commercial Paper: https://github.com/hyperledger/fabric-samples/tree/release-1.4/commercial-paper Go developer API (prototype) - (see README): https://github.com/awjh-ibm/fabric-go-developer-api @jmason900 - JIRA epic for Contract Metadata discussed on call https://jira.hyperledger.org/browse/FAB-12071

mahoney1 (Thu, 07 Mar 2019 18:22:38 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

mcoblenz (Thu, 07 Mar 2019 18:24:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DHzZjCDfu7juzXQLx) @muralisr OK thanks. I'm going off this documentation: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/chaincodenamespace.html

mcoblenz (Thu, 07 Mar 2019 18:35:12 GMT):
This also refers to the concept: https://jira.hyperledger.org/browse/FAB-13754

varadhbhatnagar (Fri, 08 Mar 2019 08:21:29 GMT):
Has joined the channel.

varadhbhatnagar (Fri, 08 Mar 2019 08:22:50 GMT):
Hi all I am new to fabric. I have created an application which is running some transactions on my local machine. When I run ./stopFabric, all the data in the transaction history is lost. Is there a way I can save that data and run from this point again after sometime ?

mahoney1 (Fri, 08 Mar 2019 09:24:02 GMT):
@varadhbhatnagar see https://stackoverflow.com/questions/43330569/hyperledger-fabric-with-docker-not-storing-data-after-restart use (1st answer) - Basically you need locate your docker-compose.yaml file(s) and (from the directory or providing the path using the appropriate command below) preserve them using: `docker-compose stop` to stop the Fabric Containers `docker-compose start` to restart where you left off previously (don't use `up` / `down`)

varadhbhatnagar (Fri, 08 Mar 2019 09:41:19 GMT):
@mahoney1 When should I be using these commands. After stopping fabric or before stopping fabric ?

florianc (Fri, 08 Mar 2019 09:51:55 GMT):
Does someone have a code example for getQueryResult in nodejs? (https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getQueryResult). From the documentation, I don't really understand what is returns

varadhbhatnagar (Fri, 08 Mar 2019 10:03:27 GMT):
@mahoney1 `docker-compose stop` and `docker-compose restart` is working normally but when I restart my pc, everything is lost again and `docker-compose restart` doesn't help.

mahoney1 (Fri, 08 Mar 2019 11:03:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=e62GAda7xSW46aWir) @varadhbhatnagar as mentioned, you `use` those commands to stop / start your Fabric - and retain existing containers' state (before you shutdown your m/c (I can't vouch for how you do that or if you reset a VM etc) - upon a `start` it should bring the same Fabric state up - notice I didn't write `restart` - see answer for further explanation https://stackoverflow.com/questions/33715499/what-is-the-difference-between-docker-compose-up-and-docker-compose-start

mahoney1 (Fri, 08 Mar 2019 11:03:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=e62GAda7xSW46aWir) @varadhbhatnagar as mentioned, you `use` those commands to stop / start your Fabric - and retain existing containers' state (before you shutdown your m/c (I can't vouch for how you do that or if you reset a VM etc)) - upon a `start` it should bring the same Fabric state up - notice I didn't write `restart` - see answer for further explanation https://stackoverflow.com/questions/33715499/what-is-the-difference-between-docker-compose-up-and-docker-compose-start)

mahoney1 (Fri, 08 Mar 2019 11:03:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=e62GAda7xSW46aWir) hi @varadhbhatnagar as mentioned, you `use` those commands to stop / start your Fabric - and retain existing containers' state (before you shutdown your m/c (I can't vouch for how you do that or if you reset a VM etc)) - upon a `start` it should bring the same Fabric state up - notice I didn't write `restart` - see answer for further explanation https://stackoverflow.com/questions/33715499/what-is-the-difference-between-docker-compose-up-and-docker-compose-start)

rthatcher (Fri, 08 Mar 2019 11:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=fgxrpPboDngnyfEZ6) @florianc The Query is returning an Iterator object, and general documentation for Iterators can be found here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators The following Contract Function illustrates extracting the iterator into an array: ``` async queryHighQuantityCommodities(ctx) { let qString = '{"selector":{"quantity":{"$gt":600}}}'; let commodityQI = await ctx.stub.getQueryResult(qString); let results = []; let res = { done: false }; while (!res.done) { res = await commodityQI.next(); if (res && res.value && res.value.value) { let val = res.value.value.toString('utf8'); if (val.length > 0) { results.push(JSON.parse(val)); } } if (res && res.done) { try { commodityQI.close(); } catch (err) { } } } console.info('~~~~~~Results~~~~~~'); console.info(results); console.info('~~~~~~End Results~~~~~~'); return results; } ```

haardikkk (Sat, 09 Mar 2019 05:23:02 GMT):
Suppose i have Bank1, Bank2, and Bank3 peer organizations. I want to design a system where they each store Client information (where client is a bank account holder). Typically, I wouldn't want Bank2 to have acess to Bank1's clients -- but if the client invokes a certain function call somehow, bank2 should be able to fetch that client's information over from bank1 (given all banks share a channel)

haardikkk (Sat, 09 Mar 2019 05:23:08 GMT):
How can I achieve something like this in chaincode?

haardikkk (Sat, 09 Mar 2019 05:23:34 GMT):
ive looked at ABAC, im not sure how i can update the attribute of an org to allow access to a specific client based on them having taken an action

MuhammedHafil (Sat, 09 Mar 2019 13:06:43 GMT):
Is there any way to get all transaction done from a particular enrolment id within chaincode?

logannwu (Sun, 10 Mar 2019 05:47:34 GMT):
Has joined the channel.

donamKim (Mon, 11 Mar 2019 06:20:05 GMT):
Has joined the channel.

donamKim (Mon, 11 Mar 2019 06:20:25 GMT):
Hi

donamKim (Mon, 11 Mar 2019 06:20:26 GMT):
How to make multiple smartcontract within chaincode ?

donamKim (Mon, 11 Mar 2019 06:20:38 GMT):
with Go chaincode SDK

AshutoshGupta888 (Mon, 11 Mar 2019 09:12:33 GMT):
Has joined the channel.

AshutoshGupta888 (Mon, 11 Mar 2019 09:15:34 GMT):
Hello team, I'm facing problem while creating composite key using a float64 and a string field. // ==== Index the marble to enable color-based range queries, e.g. return all blue marbles ==== // An 'index' is a normal key/value entry in state. // The key is a composite key, with the elements that you want to range query on listed first. // In our case, the composite key is based on indexName~color~name. // This will enable very efficient state range queries based on composite keys matching indexName~color~* indexName := "cust_amt~cust_name" custamtIndexKey, err := stub.CreateCompositeKey(indexName, []string{customer.Cust_amt, customer.Cust_name}) //custamtIndexKey, err := stub.CreateCompositeKey(indexName, float64, {customer.Cust_amt}) if err != nil { return shim.Error(err.Error()) } // Save index entry to state. Only the key name is needed, no need to store a duplicate copy of the marble. // Note - passing a 'nil' value will effectively delete the key from state, therefore we pass null character as value value := []byte{0x00} stub.PutState(custamtIndexKey, value) Here ''cust_amt" is a float64 valuePlease help me out as composite function have take only string fields as arguments.

AshutoshGupta888 (Mon, 11 Mar 2019 13:06:55 GMT):
Can anyone send the code for "Sort" query using Selector?

florianc (Mon, 11 Mar 2019 13:07:51 GMT):
https://docs.couchdb.org/en/2.2.0/api/database/find.html#sort-syntax

mahoney1 (Mon, 11 Mar 2019 13:12:15 GMT):
@AshutoshGupta888 see https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.CreateCompositeKey takes String args, yes

mcoblenz (Mon, 11 Mar 2019 14:15:24 GMT):
Anyone have advice on how to debug this error? It occurs on the first invocation of a particular transaction, but if I try to invoke again, the transaction completes successfully. `Error: could not assemble transaction: ProposalResponsePayloads do not match`

florianc (Mon, 11 Mar 2019 14:21:11 GMT):
It means that the endorsing peers did not return the same result.

mcoblenz (Mon, 11 Mar 2019 14:24:44 GMT):
That's what I thought, but I printed the results to the console and they're the same bytes.

florianc (Mon, 11 Mar 2019 14:26:36 GMT):
Can't tell you without seeing it ^^

mcoblenz (Mon, 11 Mar 2019 14:31:59 GMT):
I'll message you directly so we don't flood the channel

braduf (Mon, 11 Mar 2019 16:45:55 GMT):
Hi all, what is the cid library that should be used: "github.com/hyperledger/fabric/core/chaincode/shim/ext/cid" or "github.com/hyperledger/fabric/core/chaincode/lib/cid"? Thanks!

rthatcher (Mon, 11 Mar 2019 17:42:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ygJ9XtoZ2rrfXDbAE) @braduf The Client Identity Object can be used in Chaincode to determine the certificate and certificate properties of the ID that invoked the transaction. If attributes are present in the Certificate then these can form the basis of Attribute Based Access Control (abac). I think that the cid object is now included in the context when using the fabric-contract api so you don't have to create it. https://fabric-shim.github.io/release-1.4/fabric-shim.ClientIdentity.html

mcoblenz (Mon, 11 Mar 2019 18:11:49 GMT):
Is it the case that all endorsers must read the same set of keys when executing a transaction? i.e. it does not suffice for them to only have the same write set, but they must also have the same read set?

mcoblenz (Mon, 11 Mar 2019 18:14:51 GMT):
Looks like yes, based on discussion in #fabric-ledger .

braduf (Mon, 11 Mar 2019 18:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iSocGYu7n8BRDt2Fu) @rthatcher Thank! But I think that is the case for nodejs contracts. In golang, there are two cid libraries that can be imported, I think the latest is the shim/ext/cid, but I am not sure.

braduf (Mon, 11 Mar 2019 18:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iSocGYu7n8BRDt2Fu) @rthatcher Thanks! But I think that is the case for nodejs contracts. In golang, there are two cid libraries that can be imported, I think the latest is the shim/ext/cid, but I am not sure.

KyunghoKim (Tue, 12 Mar 2019 03:07:15 GMT):
Has joined the channel.

AshutoshGupta888 (Tue, 12 Mar 2019 06:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ZndrSuHP6At9oERnT) @mahoney1 what if I have float64 as a argument?

kristina96 (Tue, 12 Mar 2019 11:37:57 GMT):
Has joined the channel.

kristina96 (Tue, 12 Mar 2019 11:38:03 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://medium.com/beyondi/iot-hyperledger-development-from-scratch-within-21-days-day-1-b82cb47d11f8

gravity (Tue, 12 Mar 2019 11:52:54 GMT):
Hi all are there any best practices on how to identify, authenticate and authorize a user in a chaincode? is it enough to use `cn` from the `x509Certificate`?

muralisr (Tue, 12 Mar 2019 13:16:56 GMT):
@kristina96 looking forward to it...!

muralisr (Tue, 12 Mar 2019 13:18:25 GMT):
@gravity I assume you have already looked into the _mechanics_ of this (for example using the helper "cid" library in the GOLANG chaincode)

muralisr (Tue, 12 Mar 2019 13:20:12 GMT):
ultimately AAA is driven by the usecase and how the business represents identity

gravity (Tue, 12 Mar 2019 13:25:21 GMT):
@muralisr yep. we use `cid` lib heavily. in terms of business identity is represented by it's unique name that is also used to register this identity on CA, hence it's a `cn` in the certificate of this identity. but I'm wondering what will happen if I join another org to a channel that also has an identity with the same enrollment id (cn in certificate)? if I identify an identity by it's cn, then the identity with the same cn may have access to the data that is related to the identity from the first org

hppranaav02 (Tue, 12 Mar 2019 18:39:51 GMT):
Has joined the channel.

haardikkk (Tue, 12 Mar 2019 19:21:27 GMT):
If based upon chaincode functions I want to make calls to external APIs and perform some business logic, should I include that directly in the chaincode or the client app??

haardikkk (Tue, 12 Mar 2019 19:21:27 GMT):
If based upon chaincode functions I want to make calls to external APIs and perform some business logic, should I include that directly in the chaincode or the client app?

PradeepJaligama (Tue, 12 Mar 2019 23:29:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AARBSiSadEdkoRmTh) @mcoblenz That is right, as per my understanding. If they have different read sets, it means that one of them is looking at stale data and could be a double-spending attack.

PradeepJaligama (Tue, 12 Mar 2019 23:30:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Kt85XFdtspQWurzyA) @haardikkk Any external call, should be done outside the BC.

PradeepJaligama (Tue, 12 Mar 2019 23:33:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=F8XbFaB4FSwEv8qLf) @MuhammedHafil Not natively, I dont think so. You might have to add the enrollment id as part of your world state and can query on that.

dan13 (Wed, 13 Mar 2019 02:14:25 GMT):
@gravity you may find this interesting: https://stackoverflow.com/questions/5290571/which-parts-of-the-client-certificate-to-use-when-uniquely-identifying-users

AshutoshGupta888 (Wed, 13 Mar 2019 08:46:53 GMT):
Anyone who have used sorting in chaincode, Please help me out!

florianc (Wed, 13 Mar 2019 10:51:02 GMT):
Is there a clear step by step documentation on the best way to setup a test cycle for nodejs chaincode development?

muralisr (Wed, 13 Mar 2019 13:50:10 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=PtZaDdL34eHK7JnrE

muralisr (Wed, 13 Mar 2019 13:50:59 GMT):
@gravity you _could_ do a think similar to MSP principal ands come up with a fingerprint based on attributes in the x509 that makes it user-unique

FlorianStoica (Wed, 13 Mar 2019 13:51:26 GMT):
Hello, is there a way to retrieve the block hash after stub.putState ?

muralisr (Wed, 13 Mar 2019 13:57:03 GMT):
@FlorianStoica no access to block hash from chaincode .. just curious, why do you want to do that anyway ? There may be other approaches to your need.

FlorianStoica (Wed, 13 Mar 2019 13:58:50 GMT):
I want to have the block hash in which something was added to the ledger as reference

FlorianStoica (Wed, 13 Mar 2019 13:58:50 GMT):
@muralisr I want to have the block hash in which something was added to the ledger as reference

FlorianStoica (Wed, 13 Mar 2019 13:58:50 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mH7hghtCFcQsnFNoR

jlcs (Wed, 13 Mar 2019 14:09:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=4xvMyAxCBsXjvZ6aS) @florianc Maybe this helps a little, it's about debugging: https://blockchain.jlcs.es/2018/12/16/debugging-hyperledger-fabric-s-nodejs-chaincode-with-vs-code.html

muralisr (Wed, 13 Mar 2019 14:35:45 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mH7hghtCFcQsnFNoR

muralisr (Wed, 13 Mar 2019 14:39:01 GMT):
transaction ID is accessible in the call to chaicnode. This same TX ID will be in block at commit time. So the reference is there at a later point (also note that at the time of call, the call to piutState is not associated with a block yet - at "endorsement" time. That association happens later and avalilable at commit time)

lupass93 (Wed, 13 Mar 2019 15:09:46 GMT):
Has joined the channel.

FlorianStoica (Wed, 13 Mar 2019 15:14:34 GMT):
@muralisr thanks

haardikkk (Wed, 13 Mar 2019 23:55:30 GMT):
Hey, when using Private Data (according to https://hyperledger-fabric.readthedocs.io/en/release-1.4/private_data_tutorial.html) is there any way for the collection definition be for individual marbles? Rather than the whole group of marbles?

haardikkk (Wed, 13 Mar 2019 23:56:13 GMT):
For eg `price` is visible only to `Org1` if you follow the tutorial, say I have 2 marbles in the ledger, is there any way `Org1` can make `marble1` `price` visible to `Org2` but keep `marble2` data to itself?

dave.enyeart (Thu, 14 Mar 2019 02:38:06 GMT):
@haardikkk That is indeed on the roadmap... ability for client to distribute the private data to a chosen set of org peers on a transaction by transaction basis

rohitkhatri (Thu, 14 Mar 2019 13:36:17 GMT):
Has joined the channel.

rohitkhatri (Thu, 14 Mar 2019 13:37:34 GMT):
Is there anyone who can guide me how to limit no of results from couchdb while accessing in go chaincode using `GetQueryResult` method? This is the query I'm using ```{"selector": { "doc_type": "Company"}] }, "limit": 1}``` Right now, It's giving all the results of doc_type company, the limit parameter is not working.

rohitkhatri (Thu, 14 Mar 2019 13:37:34 GMT):
Can anyone please guide me how to limit no of results from couchdb while accessing in go chaincode using `GetQueryResult` method? This is the query I'm using ```{"selector": { "doc_type": "Company"}] }, "limit": 1}``` Right now, It's giving all the results of doc_type company, the limit parameter is not working.

mahoney1 (Thu, 14 Mar 2019 13:54:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Smbyg5TdQXEHwfEcq) @rohitkhatri use `getQueryResultWithPagination` see https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetQueryResultWithPagination

rohitkhatri (Thu, 14 Mar 2019 13:57:01 GMT):
@mahoney1 Thanks man, you saved my time.

mahoney1 (Thu, 14 Mar 2019 14:00:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EecFKJYrSNTv4nSJn) @rohitkhatri no worries - there is an example [here btw](https://github.com/IBM-Blockchain/fabric-spring-sdk/blob/master/spring-data-chaincode/src/test/resources/chaincode/marbles02/go/marbles_chaincode.go#L674)

kristina96 (Thu, 14 Mar 2019 15:32:06 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

PradeepJaligama (Thu, 14 Mar 2019 16:12:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cqDnGCkGuoaSwcn8i) @muralisr one more thing to add.. you can subscribe to the block event and will be notified when the block is written to the ledger. I am thinking that the notification payload would contain a reference to the block metadata.

PradeepJaligama (Thu, 14 Mar 2019 16:12:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cqDnGCkGuoaSwcn8i) @FlorianStoica one more thing to add.. you can subscribe to the block event and will be notified when the block is written to the ledger. I am thinking that the notification payload would contain a reference to the block metadata.

jmason900 (Thu, 14 Mar 2019 16:47:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3ze8ovijqwLXY3BWi) @kristina96 good short read on a few key concepts in Fabric. good use of the Fabric documentation diagrams

haardikkk (Thu, 14 Mar 2019 19:45:16 GMT):
@dave.enyeart is there any ETA for it? Also, any way to implement something like that in the meantime?

haardikkk (Thu, 14 Mar 2019 19:48:35 GMT):
I was thinking that I could have an array of MSP id's in the `marble` struct, and in chaincode when functions are called I get the `CID` and check if their `MSPid in marble.MSPid`

haardikkk (Thu, 14 Mar 2019 19:49:08 GMT):
but im not sure if peers can read the ledger state directly and not through the chaincode in which case thats useless

dave.enyeart (Thu, 14 Mar 2019 21:37:31 GMT):
@haardikkk any interim solution would require pre-defining many collections. You can vote for 'local collections' here: https://jira.hyperledger.org/browse/FAB-7593 . The more votes, the more likely it will be prioritized for later in 2019.

AshutoshGupta888 (Fri, 15 Mar 2019 06:26:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tdEysJCbuFx4KyABy) @mahoney1 @mahoney1 Can you help me out with sort query?

AshutoshGupta888 (Fri, 15 Mar 2019 08:45:31 GMT):
Can anyone tell me how to access amount field in the given code below: package main import "fmt" import "encoding/json" type PublicKey struct { Key string Amount float64 item_id string item_qty string item_unit string } func main() { keysBody := []byte(`[{"Key":"so_12345", "Record":{"amount":24134,"item_id":"21","item_qty":23,"item_unit":43}}]`) keys := make([]PublicKey,0) json.Unmarshal(keysBody, &keys) fmt.Printf("%#v", keys[0].item_id[0]) }

mahoney1 (Fri, 15 Mar 2019 09:35:49 GMT):
@AshutoshGupta888 check out this [sample code](https://github.com/IBM-Blockchain/marbles/blob/master/chaincode/src/marbles/write_ledger.go#L170) which can assist you

mahoney1 (Fri, 15 Mar 2019 09:35:49 GMT):
@AshutoshGupta888 check out this [sample code](https://github.com/IBM-Blockchain/marbles/blob/master/chaincode/src/marbles/write_ledger.go#L170) which can assist you with what you're trying to achieve

Antimttr (Fri, 15 Mar 2019 21:12:59 GMT):
I had a general question about the types of chaincodes. RIght now there are three (that i know of) Go, Nodejs and Java. Does anyone know of any comparisons of the three? What advantages/disadvantages each of them have over eachother?

Antimttr (Fri, 15 Mar 2019 21:13:25 GMT):
And if no such comparison exists, would anyone like to comment on their experience using the different languages to write hlf chaincodes?

Antimttr (Fri, 15 Mar 2019 21:14:10 GMT):
Has anyone found that one language's chaincode has a superior feature set to the other? Or are the implementations so similar that no meaningful differences between languages exist?

AlexArise (Sat, 16 Mar 2019 04:38:45 GMT):
The experience of each is largely determined by the language itself

YoussefSadek (Sat, 16 Mar 2019 09:02:17 GMT):
Has joined the channel.

YoussefSadek (Sat, 16 Mar 2019 09:05:56 GMT):
Hi everyone, @albert.lacambra and I had a question regarding the peer running in devmode: When I kill my local CC process and run a query I would expect the peer to return an error. Instead the peer starts a CC container. Should the peer be able to start a CC container when running in devmode?

YoussefSadek (Sat, 16 Mar 2019 09:05:56 GMT):
Hi everyone, @albert.lacambra and I had a question regarding the peer running in devmode: When I kill my local CC process and run a query I would expect the peer to return an error. Instead the peer starts a CC container. Should the peer be able to start a CC container when running in devmode? Tested with Fabric v1.4

YoussefSadek (Sat, 16 Mar 2019 09:05:56 GMT):
Hi everyone, @albert.lacambra and I had a question regarding the peer running in devmode (`peer node start --peer-chaincodedev=true`): When I kill my local CC process and run a query I would expect the peer to return an error. Instead the peer starts a CC container. Should the peer be able to start a CC container when running in devmode? Tested with Fabric v1.4

YoussefSadek (Sat, 16 Mar 2019 09:05:56 GMT):
Hi everyone, @albert.lacambra and I had a question regarding the peer running in devmode (peer node start --peer-chaincodedev=true): When I kill my local CC process and run a query I would expect the peer to return an error. Instead the peer starts a CC container. Should the peer be able to start a CC container when running in devmode? Tested with Fabric v1.4

simplexity-ckcclc (Sat, 16 Mar 2019 09:10:06 GMT):
Has joined the channel.

AnandBanik (Sat, 16 Mar 2019 14:19:03 GMT):
Hi Team.....can we have chincode running on Node and Go on the same peer but different channels

muralisr (Sat, 16 Mar 2019 14:57:19 GMT):
@AnandBanik you cannot run mycc/node and mycc/go on channels c1 and c2 respectively .... but obviously can run mycc1 / node and mycc2 / go

muralisr (Sat, 16 Mar 2019 15:00:29 GMT):
@Antimttr I have not made the comparison myself (and will leave it to others to comment on that) ... but as a general observation, the GOLANG chaincode will certainly have the latest implementation. The goal is to have other chaincodes follow suit as closely as possible.

AnandBanik (Sat, 16 Mar 2019 15:02:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=BkJcTEL8s3mhvtD9Y) @muralisr @muralisr thanks!

muralisr (Sat, 16 Mar 2019 15:25:36 GMT):
@YoussefSadek @albert.lacambra re dev mode, I tried with both GO and Java chaincodes and it appears to work on the latest master (for the java chaincode used release-1.4). Here are the steps for java ``` PEER: peer node start --peer-chaincodedev=true CHAINCODE: CORE_PEER_ADDRESS=192.168.1.11:7052 CORE_CHAINCODE_ID_NAME=mycc:0 gradle run ```

muralisr (Sat, 16 Mar 2019 15:25:36 GMT):
@YoussefSadek @albert.lacambra re dev mode, I tried with both GO and Java chaincodes and it appears to work on the latest master (for the java chaincode used release-1.4). Here are the steps for java ``` PEER: peer node start --peer-chaincodedev=true CHAINCODE: CORE_PEER_ADDRESS=192.168.1.11:7052 CORE_CHAINCODE_ID_NAME=mycc:0 gradle run ```

muralisr (Sat, 16 Mar 2019 15:25:36 GMT):
@YoussefSadek @albert.lacambra re dev mode, I tried with both GO and Java chaincodes and it appears to work on the latest master (for the java chaincode used release-1.4). Here are the steps for java ``` PEER: peer node start --peer-chaincodedev=true CHAINCODE: cd (assume you build chaincode as usual with gradle) add the following to build.gradle apply plugin:'application' mainClassName = "org.hyperledger.fabric.example.SimpleChaincode" run the chaincode CORE_PEER_ADDRESS=192.168.1.11:7052 CORE_CHAINCODE_ID_NAME=mycc:0 gradle run ```

muralisr (Sat, 16 Mar 2019 15:28:03 GMT):
With that the when I do `peer chaincode query -n mycc -C myc -c '{"Args":["query", "a"]}'` I see something like the following on the chaincode ``` INFO: CORE_TLS_CLIENT_CERT_PATHnull Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: <<<<<<<<<<<<>>>>>>>>>>> Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_CHAINCODE_ID_NAME: mycc:0 Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_PEER_ADDRESS: 192.168.1.11:7052 Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_PEER_TLS_ENABLED: false Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_PEER_TLS_ROOTCERT_FILEnull Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_TLS_CLIENT_KEY_PATHnull Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions INFO: CORE_TLS_CLIENT_CERT_PATHnull Mar 16, 2019 11:27:08 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Mar 16, 2019 11:27:17 AM org.hyperledger.fabric.example.SimpleChaincode invoke INFO: Invoke java simple chaincode Mar 16, 2019 11:27:17 AM org.hyperledger.fabric.example.SimpleChaincode query INFO: Query Response: Name: a, Amount: 100 ```

muralisr (Sat, 16 Mar 2019 15:28:52 GMT):
hope that helps... if the same thing fails for you, perhaps something go fixed with the latest fabric on the peer side

muralisr (Sat, 16 Mar 2019 15:28:52 GMT):
hope that helps... if the same thing fails for you, perhaps something got fixed with the latest fabric on the peer side

muralisr (Sat, 16 Mar 2019 15:43:58 GMT):
@YoussefSadek @albert.lacambra ... oops, I misunderstood the question. I see what you mean now...you _are_ able to execute the above process successfully but when you kill the chaincode and trying an invoke, peer attempts to start the chancode (even though its in dev mode). "dev mode" does not imply "don't start chaincodes"... it merely means its OK for chaincodes to be launched and registered manually (as an aid to development)

muralisr (Sat, 16 Mar 2019 15:43:58 GMT):
@YoussefSadek @albert.lacambra ... oops, I misunderstood the question. I see what you mean now...you _are_ able to execute the above process successfully but when you kill the chaincode and trying an invoke, peer attempts to start the chancode (even though its in dev mode). ... So, "dev mode" does not imply "don't start chaincodes"... it merely means its OK for chaincodes to be launched and registered manually (as an aid to development)

YoussefSadek (Sat, 16 Mar 2019 16:44:42 GMT):
@muralisr thank you for the reply and for the clarification

YoussefSadek (Sat, 16 Mar 2019 16:44:42 GMT):
@muralisr exactly :) thank you for the reply and for the clarification

AvinashMeda (Mon, 18 Mar 2019 06:17:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iofYhPtwta3vS27ne) @Moolkothari You can use node js sdk for the same.

florianc (Mon, 18 Mar 2019 09:59:01 GMT):
Hello. I would like to know if, when calling shim.error, the events are triggered or not.

mahoney1 (Mon, 18 Mar 2019 11:40:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=B8zgActaZCsg54MGa) @florianc See https://stackoverflow.com/questions/45481644/how-can-chaincode-send-error-messages-back-to-the-application-where-call-came-fr SetEvent saves the event to be sent when a transaction is made part of a block and for that it needs to be committed - my understanding is that if you're `throwing` an error specifically then the transaction would not be committed.

amanjain (Mon, 18 Mar 2019 12:08:39 GMT):
Has joined the channel.

wirsiing (Mon, 18 Mar 2019 12:30:37 GMT):
Has joined the channel.

schoppara (Mon, 18 Mar 2019 13:20:50 GMT):
Has joined the channel.

mahoney1 (Mon, 18 Mar 2019 19:47:42 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

abedsau (Mon, 18 Mar 2019 21:21:50 GMT):
Has joined the channel.

RohanKandalkar (Tue, 19 Mar 2019 06:49:12 GMT):
Has joined the channel.

RohanKandalkar (Tue, 19 Mar 2019 06:49:24 GMT):
Hi. I am java developer. I have intestate in smart contract development in hyperledger fabric framework. i started also. all the examples and tutorials which i see in official documents are related to node js . so is the chaincode development in java is still in progress or its completed and i can do all the things which are possible in node .?

RohanKandalkar (Tue, 19 Mar 2019 06:52:21 GMT):
because i developed chaincode using java.but when i start reading commercial-paper tutorial . i found different classes in node js which are not in java . i am not sure about this but is this true? please any one worked around this please help me .

mbwhite (Tue, 19 Mar 2019 08:15:31 GMT):
@RohanKandalkar the work on the Java chaincode to update to the node.js level is underway! The same features will be available - if you checkout that the last community calls you'll some of the demos and here discussion around them. @mahoney1 think I'm correct in saying are recordings available?

RohanKandalkar (Tue, 19 Mar 2019 10:03:41 GMT):
can you suggest best (most used) language for chain-code development ? or mature language whose support i can get easily. or whose library is very rich.please suggest .

RohanKandalkar (Tue, 19 Mar 2019 10:05:24 GMT):
and in client application's java sdk also work in progress . because classes related to network are present in node js but not available in java.

mahoney1 (Tue, 19 Mar 2019 10:13:42 GMT):
@mbwhite - yes they are available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - the call was 0207-2019 .... slides: 2019-0207-fabricdevcommunitycallslides.pdf and mp4 recording and chat: 2019-0207-fabricdevcommunitycall.zip

mahoney1 (Tue, 19 Mar 2019 10:13:42 GMT):
@mbwhite - yes they are available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - the call was 0207-2019 .... slides: 2019-0207-fabricdevcommunitycallslides.pdf and mp4 recording, chat: 2019-0207-fabricdevcommunitycall.zip

mahoney1 (Tue, 19 Mar 2019 10:13:42 GMT):
@mbwhite - yes they are available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - the call was 0207-2019 .... slides: 2019-0207-fabricdevcommunitycallslides.pdf and mp4 recording, chat: 2019-0207-fabricdevcommunitycall.zip

vahuja4 (Tue, 19 Mar 2019 10:20:37 GMT):
Has joined the channel.

vahuja4 (Tue, 19 Mar 2019 10:23:18 GMT):
The link here: [https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid][1] shows the golang chaincode functions that can be used to implement ACL at the application level. Using calls like `cid.GetAttributeValue(APIstub, "role")`, I can get the `role` of the person who has initiated the transaction and accordingly I can perform checks using the `role` value. But I am not able to figure out how to test these scenarios while using the `MockStub` (https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#MockStub). Can someone please point me to / show an example of how to pass attributes with every transaction which can be then accessed using `cid`.

muralisr (Tue, 19 Mar 2019 12:40:39 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=bNBhLcdYbEzwRJNd5

muralisr (Tue, 19 Mar 2019 12:50:51 GMT):
@RohanKandalkar a few points (1) the SDK can be in different language than chaincode ..if you like to develop chaincode in Java you can do so without worrying about somethings not being there in java SDK (2) typically the GO chaincode have all the core functionality (but some feature related to higher programming model constructs may target node first (but I think the GO chaincode support is in the plan, true @mbwhite @mahoney1 ?) (3) if you are most familiar with java it is probably a good idea to start with java chaincode (assuming you are starting with fabric, better minimize learning curve)

florianc (Tue, 19 Mar 2019 12:52:41 GMT):
Hi. Is there a "best practice" to check if a document exists in the world state (couchDb)? If I do a getState on a key that does not exist, how to handle the error properly?

florianc (Tue, 19 Mar 2019 12:52:44 GMT):
(nodejs)

mahoney1 (Tue, 19 Mar 2019 13:03:13 GMT):
@muralisr yes on (2)

mahoney1 (Tue, 19 Mar 2019 13:05:49 GMT):
@vahuja4 should be able to (haven't tested FYI) ```let clientID = new ClientIdentity(ctx.stub); let id = clientID.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf('CN=') + 3, id.lastIndexOf('::')) // getting just CN here ``` or use getCreator() eg `use getCreator as in `let creator = await ctx.mockstub.getCreator(); let cert = creator.getIdBytes().toString('utf8');` blah blah

mahoney1 (Tue, 19 Mar 2019 13:05:49 GMT):
@vahuja4 should be able to (haven't tested FYI) ``` let clientID = new ClientIdentity(ctx.mockstub); let id = clientID.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf('CN=') + 3, id.lastIndexOf('::')) // getting just CN here ``` or use getCreator() eg `use getCreator as in `let creator = await ctx.mockstub.getCreator(); let cert = creator.getIdBytes().toString('utf8');` blah blah

mahoney1 (Tue, 19 Mar 2019 13:05:49 GMT):
@vahuja4 should be able to (haven't tested FYI) ``` let clientID = new ClientIdentity(ctx.mockstub); let id = clientID.getID(); // X509 Certificate invoker is in CN form let CN = id.substring(id.indexOf('CN=') + 3, id.lastIndexOf('::')) // getting just CN here ``` or use getCreator() eg as in `let creator = await ctx.mockstub.getCreator(); let cert = creator.getIdBytes().toString('utf8');` blah blah

mbwhite (Tue, 19 Mar 2019 13:18:48 GMT):
@muralisr the prototype of the golang support is being maintained here https://github.com/awjh-ibm/fabric-go-developer-api

mahoney1 (Tue, 19 Mar 2019 13:32:32 GMT):
@florianc see fabric samples eg https://github.com/hyperledger/fabric-sdk-rest/blob/master/tests/input/src/marbles02/marbles_chaincode.go#L183 or (in NodeJS) something like (1.4 new prog model contract-api) ``` const ledgerKey = this.ctx.stub.createCompositeKey(this.name, [id]); let data = await this.ctx.stub.getState(ledgerKey); if (!data.length) { console.log(`Ledger: Record with ID ${id} could not be retrieved`); return 'NORECORD'; // or Error as appropriate etc) } ``` or `try/catch` around `await ctx.stub.getState(ledgerKey);` segment etc

florianc (Tue, 19 Mar 2019 13:35:39 GMT):
@mahoney1 Oh yeah, so simple... Thank you!

vahuja4 (Tue, 19 Mar 2019 14:37:20 GMT):
@mahoney1, thank you for your reply. The code snippet is using the nodejs sdk, but I am more keen on using golang. From what I have read, using the mockstub should not even require using the sdk. Please clear the confusion.

vahuja4 (Tue, 19 Mar 2019 14:37:20 GMT):
@mahoney1, thank you for your reply. The code snippet you have shownis using the nodejs sdk, but I am more keen on using golang. From what I have read, using the mockstub should not even require using the sdk. Please clear the confusion.

vahuja4 (Tue, 19 Mar 2019 14:37:20 GMT):
@mahoney1, thank you for your reply. The code snippet that you have shown is using the nodejs sdk, but I am more keen on using golang. From what I have read, using the mockstub should not even require using the sdk. Please clear the confusion.

florianc (Tue, 19 Mar 2019 14:56:39 GMT):
Does anyone has an example for invokeChaincode in nodejs? Because the parameter _args Array.> List of arguments to pass to the called chaincode_ is quite confusing.

florianc (Tue, 19 Mar 2019 14:56:49 GMT):
How do I build this?

vahuja4 (Tue, 19 Mar 2019 15:25:56 GMT):
@florianc , take a look at the fabcar example that comes in fabric-samples. It shows an end-to-end example.

mahoney1 (Tue, 19 Mar 2019 15:32:19 GMT):
@vahuja4 - that was node chaincode. For Go chaincode, see the API docs https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewMockStub or maybe the example in [this tutorial](https://medium.com/coinmonks/tutorial-on-hyperledger-fabrics-chaincode-testing-44c3f260cb2b) will help (Test Chaincode functions)

mahoney1 (Tue, 19 Mar 2019 15:32:19 GMT):
@vahuja4 - that was node chaincode (using Fabric 1.4 new prog model). For Go chaincode, see the API docs https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewMockStub or maybe the example in [this tutorial](https://medium.com/coinmonks/tutorial-on-hyperledger-fabrics-chaincode-testing-44c3f260cb2b) will help (Test Chaincode functions)

mahoney1 (Tue, 19 Mar 2019 15:32:19 GMT):
@vahuja4 - that was node chaincode (using Fabric 1.4 new prog model). For Go chaincode, see the API docs https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewMockStub or maybe the example in [this JIRAl](https://jira.hyperledger.org/browse/FAB-5644)

mahoney1 (Tue, 19 Mar 2019 15:32:19 GMT):
@vahuja4 - that was node chaincode (using Fabric 1.4 new prog model). For Go chaincode, see the API docs https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewMockStub or maybe the example in [this JIRA](https://jira.hyperledger.org/browse/FAB-5644)

mahoney1 (Tue, 19 Mar 2019 15:32:19 GMT):
@vahuja4 - that was node chaincode (using Fabric 1.4 new prog model). For Go chaincode, see the API docs https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#NewMockStub (use GetCreator())

raphaelbenoit (Tue, 19 Mar 2019 16:34:51 GMT):
Has joined the channel.

vahuja4 (Wed, 20 Mar 2019 06:20:36 GMT):
@mahoney1, I am not able to find any information regarding the `creator` field of `stub`. The `stub` struct is defined here: https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/chaincode.go#L973, but there is no example showing what to assign into `stub.Creator` while testing

vahuja4 (Wed, 20 Mar 2019 06:27:48 GMT):
In other words, I am not able to see how to pass a client's information while submitting a transaction.

vahuja4 (Wed, 20 Mar 2019 08:45:20 GMT):
@mahoney1 Am I to use `func (stub *MockStub) MockInvokeWithSignedProposal(uuid string, args [][]byte, sp *pb.SignedProposal) pb.Response`? If so, please can you please show an example?

mahoney1 (Wed, 20 Mar 2019 09:35:31 GMT):
@vahuja4 I believe that's because its merged in current `master` - https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/mockstub.go#L365 but not 1.4 see this [Gerrit](https://gerrit.hyperledger.org/r/#/c/28744/1/core/chaincode/shim/mockstub.go) - the associated JIRA is here -> https://jira.hyperledger.org/browse/FAB-5644

mahoney1 (Wed, 20 Mar 2019 09:35:31 GMT):
@vahuja4 I believe that's because `GetCreator` is merged in current `master` - https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/mockstub.go#L365 but not 1.4 see this [Gerrit](https://gerrit.hyperledger.org/r/#/c/28744/1/core/chaincode/shim/mockstub.go) - the associated JIRA is here -> https://jira.hyperledger.org/browse/FAB-5644

vahuja4 (Wed, 20 Mar 2019 09:45:45 GMT):
Ah! So, application level ACL testing cannot be done via mockstub?

vahuja4 (Wed, 20 Mar 2019 09:45:45 GMT):
Ah! So for now, application level ACL testing cannot be done via mockstub?

mahoney1 (Wed, 20 Mar 2019 10:01:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Z6yjNFHbB3u99oYv3) @vahuja4 not with 1.4 mockstub it would appear ..

sunlidong (Wed, 20 Mar 2019 10:07:29 GMT):
Has joined the channel.

mastersingh24 (Wed, 20 Mar 2019 10:12:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ENjPsBzAkqFpXjoLg) @vahuja4 It's a marshaled (serialized) SigningIdentity ( https://github.com/hyperledger/fabric/blob/release-1.4/protos/msp/identities.pb.go#L24 ) . Mspid would be the MSP ID of the signer and IdBytes would be the PEM-encoded X509 certificate

vsadriano (Wed, 20 Mar 2019 16:08:42 GMT):
Hi! I would like to add access control decisions in my chaincode (NodeJS). Is it possible?

vsadriano (Wed, 20 Mar 2019 16:08:42 GMT):
Hi! I would like to add access control decisions in my chaincode (NodeJS). Is it possible?

vsadriano (Wed, 20 Mar 2019 16:41:32 GMT):
Hi! I would like to implement control access per function in chaincode (NodeJS). Is it possible?

vsadriano (Wed, 20 Mar 2019 16:41:32 GMT):
Hi! I would like to implement access control per function in chaincode (NodeJS). Is it possible?

Suarez 3 (Wed, 20 Mar 2019 17:18:27 GMT):
Has joined the channel.

mahoney1 (Wed, 20 Mar 2019 17:47:07 GMT):
You could use the ClientIdentity class methods https://fabric-shim.github.io/master/fabric-shim.ClientIdentity.html eg. in 1.4 ``` let cid = ctx.clientIdentity; if (cid.assertAttributeValue("groupName", "sales")) { throw new Error("Not a valid user of this function"); }``` where `groupName` was added as a custom attribute for the registered user

mahoney1 (Wed, 20 Mar 2019 17:47:07 GMT):
@vsadriano You could use the ClientIdentity class methods https://fabric-shim.github.io/master/fabric-shim.ClientIdentity.html eg. in 1.4 ``` let cid = ctx.clientIdentity; if (cid.assertAttributeValue("groupName", "sales")) { throw new Error("Not a valid user of this function"); }``` where `groupName` was added as a custom attribute for the registered user

vsadriano (Wed, 20 Mar 2019 18:32:33 GMT):
Tks @mahoney1!

akoenig (Thu, 21 Mar 2019 08:29:07 GMT):
Hi, has anyone tested the java-chaincode? Or use it more often?

florianc (Thu, 21 Mar 2019 10:09:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MNCvZZDLSahvakJio) @vahuja4 I think you misunderstood. I am looking for an example of chaincode invokation FROM a chaincode. Not from client app.

florianc (Thu, 21 Mar 2019 11:00:08 GMT):
In invokeChaincode of the node shim, what does `args Array.>` means? Is it args as an array of an array of bytes ?

florianc (Thu, 21 Mar 2019 12:39:20 GMT):
Got it. Still do not understand what this Array stuff is about. Just pass args as they are and it works fine.

mahoney1 (Thu, 21 Mar 2019 13:07:57 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:07:57 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

PradeepJaligama (Thu, 21 Mar 2019 13:37:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=m8DcMJ6aF8HysdGk5) @florianc Its very simple.. You can use the following function

PradeepJaligama (Thu, 21 Mar 2019 13:37:11 GMT):
`func (stub *ChaincodeStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response`

PradeepJaligama (Thu, 21 Mar 2019 13:37:28 GMT):
very self explanatory.

PradeepJaligama (Thu, 21 Mar 2019 13:38:10 GMT):
documentation for the function

PradeepJaligama (Thu, 21 Mar 2019 13:38:10 GMT):
InvokeChaincode locally calls the specified chaincode `Invoke` using the same transaction context; that is, chaincode calling chaincode doesn't create a new transaction message. If the called chaincode is on the same channel, it simply adds the called chaincode read set and write set to the calling transaction. If the called chaincode is on a different channel, only the Response is returned to the calling chaincode; any PutState calls from the called chaincode will not have any effect on the ledger; that is, the called chaincode on a different channel will not have its read set and write set applied to the transaction. Only the calling chaincode's read set and write set will be applied to the transaction. Effectively the called chaincode on a different channel is a `Query`, which does not participate in state validation checks in subsequent commit phase. If `channel` is empty, the caller's channel is assumed.

PradeepJaligama (Thu, 21 Mar 2019 13:39:05 GMT):
InvokeChaincode locally calls the specified chaincode `Invoke` using the same transaction context; that is, chaincode calling chaincode doesn't create a new transaction message. If the called chaincode is on the same channel, it simply adds the called chaincode read set and write set to the calling transaction. If the called chaincode is on a different channel, only the Response is returned to the calling chaincode; any PutState calls from the called chaincode will not have any effect on the ledger; that is, the called chaincode on a different channel will not have its read set and write set applied to the transaction. Only the calling chaincode's read set and write set will be applied to the transaction. Effectively the called chaincode on a different channel is a `Query`, which does not participate in state validation checks in subsequent commit phase. If `channel` is empty, the caller's channel is assumed.

florianc (Thu, 21 Mar 2019 13:40:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eQ4PqCFH7HfFdegRR) @PradeepJaligama You don't need [][]byte in nodejs. Just pass the args as json and it works fine (does it handle it itelf internally?)

PradeepJaligama (Thu, 21 Mar 2019 13:48:54 GMT):
this is in golang

florianc (Thu, 21 Mar 2019 13:50:06 GMT):
I asked in nodejs ;) Thanks anyway!

PradeepJaligama (Thu, 21 Mar 2019 13:50:33 GMT):
:thumbsup:

walmon (Thu, 21 Mar 2019 14:43:55 GMT):
Hi all, this may be interesting for you Testing and debugging a Convector Smart Contract (nodeJS) https://medium.com/worldsibu/testing-and-debugging-a-convector-smart-contract-aa02c84e7ecc

mahoney1 (Thu, 21 Mar 2019 17:00:52 GMT):
Community call starting shortly -> https://zoom.us/my/hyperledger.community

mahoney1 (Thu, 21 Mar 2019 18:29:31 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:31 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:31 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)

florianc (Fri, 22 Mar 2019 08:42:32 GMT):
Hello. I am confused by javascript buffers. When I invoke another chaincode, the return is the following: `` But I can't find a way to convert this in JSON and use it. Could someone help me? (tried JSON.parse, gives error, tried toString(), gives basically the same) The function in the queried chaincode returns its data as bytes (no transformation done)

mahoney1 (Fri, 22 Mar 2019 10:48:54 GMT):
@florianc see this [stack overflow](https://stackoverflow.com/questions/41951307/convert-a-json-object-to-buffer-and-buffer-to-json-object-back)

florianc (Fri, 22 Mar 2019 10:58:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DB7CgKP5KCBJC5avC) @mahoney1 Tried it. But it returns me : `SyntaxError: Unexpected token . in JSON at position 0` My queried cc returns the following: `return Buffer.from(JSON.stringify(stringQueryResult));` The cc querying is doing this: `console.log("L55 " + JSON.parse(basicReturn.toString()));` If I just .toString the return, it gives me` .protos.response`

florianc (Fri, 22 Mar 2019 10:58:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DB7CgKP5KCBJC5avC) @mahoney1 Tried it. But it returns me : `SyntaxError: Unexpected token . in JSON at position 0` My queried cc returns the following: `return Buffer.from(JSON.stringify(stringQueryResult));` The cc querying is doing this: `console.log("L55 " + JSON.parse(basicReturn.toString()));` If I just `.toString` the return, it gives me` .protos.response`

florianc (Fri, 22 Mar 2019 10:59:54 GMT):
The most troubling stuff is that if I just query the cc with the nodejs SDK (channel.queryByChaincode(request);) I can read the content just with a `.toString()`

florianc (Fri, 22 Mar 2019 10:59:54 GMT):
The most troubling stuff is that if I just query the cc with the nodejs SDK (`channel.queryByChaincode(request);`) I can read the content just with a `.toString()`

florianc (Fri, 22 Mar 2019 10:59:54 GMT):
The most troubling stuff is that if I just query the cc with the nodejs SDK (`channel.queryByChaincode(request);`) I can read the content just with a `.toString()`

florianc (Fri, 22 Mar 2019 15:11:27 GMT):
https://stackoverflow.com/questions/55302364/weird-charaters-in-a-stringified-buffer-in-javascript?noredirect=1#comment97333349_55302364

florianc (Fri, 22 Mar 2019 15:11:36 GMT):
The problem evolved... :S

diestrin (Sat, 23 Mar 2019 05:51:13 GMT):
florianc, since you're using javascript, haven't you considered using Convector? https://github.com/hyperledger-labs/convector the idea is to let you still write your custom javascript code, but with all this base problems solved for you already, you just need to focus on what you actually need instead of being solving buffer conversions, check it out ;)

diestrin (Sat, 23 Mar 2019 05:51:13 GMT):
@florianc , since you're using javascript, haven't you considered using Convector? https://github.com/hyperledger-labs/convector the idea is to let you still write your custom javascript code, but with all this base problems solved for you already, you just need to focus on what you actually need instead of being solving buffer conversions, check it out ;)

YogiGhogare (Sat, 23 Mar 2019 17:57:41 GMT):
Has joined the channel.

braduf (Sun, 24 Mar 2019 01:31:05 GMT):
Hi all, I am implementing a chaincode with golang and I would like to know what is the best way to register an asset safely on someones identity, is it best to use GetID() from the cid .go library, or is it better to use the cid library to extract the public key from the certificate and register the asset on this?

braduf (Sun, 24 Mar 2019 01:31:05 GMT):
Hi all, I am implementing a chaincode with golang and I would like to know what the best way is to register an asset safely on someones identity. Is it best to use GetID() from the cid .go library, or is it better to use the cid library to extract the public key from the certificate and register the asset on this?

braduf (Sun, 24 Mar 2019 01:31:05 GMT):
Hi all, how is the payload in a chaincode stub.SetEvent function usually used? Is it a JSON object with all fields you want to have on receiving the event or what is the advised data to put in here? Thanks in advance.

mallikarjunasai995 (Sun, 24 Mar 2019 15:13:32 GMT):
while instantiating the chaincode am getting the below error .... can anyone help me on the below error --- Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode mycc:1.0 for transaction

yanli133 (Mon, 25 Mar 2019 06:51:53 GMT):
Has joined the channel.

florianc (Mon, 25 Mar 2019 08:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=dkxxzPXRjH4tZKWRa) @diestrin I saw convector. But I don't want to depend on yet another tool.

florianc (Mon, 25 Mar 2019 08:03:40 GMT):
As last week, I still have a problem with cross chaincode invoke (invokeChaincode) in nodejs. I manage to get the result (with overcomplicated parsing stuff), but there are stuff that should not be in the return. More information here: https://stackoverflow.com/questions/55302364/weird-charaters-in-a-stringified-buffer-in-javascript Any help would be gladly appreciated, as it is blocking me quite hard.

rohitkhatri (Mon, 25 Mar 2019 09:52:11 GMT):
Hi everyone, Is there a way to sort the results in golang chaincode against couchdb?

dave.enyeart (Mon, 25 Mar 2019 10:35:30 GMT):
@rohitkhatri You can include a `sort` in the couchdb query string, see syntax here: https://docs.couchdb.org/en/stable/api/database/find.html. Note that you will also need an index that includes the filter and sort fields. See instructions for queries and index creation in the tutorial: https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html

Rajatsharma (Mon, 25 Mar 2019 10:43:41 GMT):
I'm using `cid.GetAttributeValue(stub, attrName)` , It's working perfectly fine for regular users but when i fetch attributes of admin. I'm facing some issue. Can anyone help me with this.

Rajatsharma (Mon, 25 Mar 2019 10:44:02 GMT):
I'm talking about https://godoc.org/github.com/hyperledger/fabric/core/chaincode/lib/cid for cid

Rajatsharma (Mon, 25 Mar 2019 10:45:20 GMT):
For admin the `found` flag is returned false in case of admin.

Rajatsharma (Mon, 25 Mar 2019 10:45:20 GMT):
For admin the `found` flag is returned false. While when I check CA directly I'm able to see those attribute.

Rajatsharma (Mon, 25 Mar 2019 10:45:20 GMT):
For admin the `found` flag is returned false. While when I check CA directly I'm able to see those attributes.

rohitkhatri (Mon, 25 Mar 2019 10:46:19 GMT):
Thanks for reply @dave.enyeart, below is the query that already includes `sort` parameter, but It's not working and I have also declared index on couchdb ``` { "selector": { "status": "pending" }, "sort": [ {"created_at": "desc"} ] } ``` It works when executed directly in couchdb, but not in chaincode. In chaincode, It gives random results.

rohitkhatri (Mon, 25 Mar 2019 10:46:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=g8rfTizaihoJ3eGWh) @dave.enyeart Thanks for reply @dave.enyeart, below is the query that already includes `sort` parameter, but It's not working and I have also declared index on couchdb ``` { "selector": { "status": "pending" }, "sort": [ {"created_at": "desc"} ] } ``` It works when executed directly in couchdb, but not in chaincode. In chaincode, It gives random results.

mahoney1 (Mon, 25 Mar 2019 11:01:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=R9t7CFaywbRSygztq) @Rajatsharma @Rajatsharma assuming you registered the attr for the admin you specified, suggest to put your 'failing' code on Stack Overflow - like shown in this [related Stack Overflow](https://stackoverflow.com/questions/51362351/cannot-access-user-attribute-using-attribute-based-access-control-abac-in-hype)

mahoney1 (Mon, 25 Mar 2019 11:01:24 GMT):
@rohitkhatri suggest to post your chaincode sample on Stack overflow (where you build the query selector)

Rajatsharma (Mon, 25 Mar 2019 11:06:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rv5edHRCmZMg8jpG5) @mahoney1 Should I post my issue as a new one ?

rohitkhatri (Mon, 25 Mar 2019 12:07:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ER3oeD8YWRQXKkr4H) @mahoney1 Here's my question on stackoverflow with code sample: https://stackoverflow.com/questions/55337440/sorting-not-working-in-golang-chaincode-hyperledger-fabric

akoenig (Mon, 25 Mar 2019 12:21:01 GMT):
Hi, has anyone tested the java-chaincode? Or use it more often?

mahoney1 (Mon, 25 Mar 2019 12:44:36 GMT):
@rohitkhatri answered

braduf (Mon, 25 Mar 2019 16:25:02 GMT):
Hi all, how is the payload in a chaincode stub.SetEvent function usually used? Is it a JSON object with all fields you want to have on receiving the event or what is the advised data to put in here? Thanks in advance.

braduf (Mon, 25 Mar 2019 16:25:02 GMT):
Hi all, how is the payload in a chaincode stub.SetEvent function usually used? - Is it a JSON object with all fields you want to have on receiving the event or what is the advised data to put in here? - And on receiving the event, there still has to be checked if the transaction was valid on the peer? Receiving an event does not mean that the tx was comitted to the world state, right? Thanks in advance.

braduf (Mon, 25 Mar 2019 16:25:02 GMT):
Hi all, how is the payload in a chaincode stub.SetEvent function usually used? - Is it a JSON object with all fields you want to have on receiving the event or what is the advised data to put in here? - And on receiving the event, there still has to be checked if the transaction was valid on the peer? Receiving an event does not mean that the tx was comitted to the world state, right? Thanks in advance.

mahoney1 (Tue, 26 Mar 2019 09:19:22 GMT):
@braduf the best description of how the event is received and type of the fields in the event is shown here -> https://fabric-shim.github.io/master/fabric-shim.ChaincodeStub.html#setEvent__anchor . SetEvent saves the event to be sent when a transaction is made part of a block and for that it needs to be committed. The payload can be generated for example from stringified JSON as shown in this 1.4 example [here](https://stackoverflow.com/questions/54981807/hyperledger-fabric-1-4-how-to-emit-events-from-the-smart-contract-chaincode-u)

mahoney1 (Tue, 26 Mar 2019 09:19:22 GMT):
@braduf the best description of how the event is received and type of the fields in the event structure is shown here -> https://fabric-shim.github.io/master/fabric-shim.ChaincodeStub.html#setEvent__anchor . SetEvent saves the event to be sent when a transaction is made part of a block and for that it needs to be committed. The payload can be generated for example from stringified JSON as shown in this 1.4 example [here](https://stackoverflow.com/questions/54981807/hyperledger-fabric-1-4-how-to-emit-events-from-the-smart-contract-chaincode-u)

mahoney1 (Tue, 26 Mar 2019 09:19:22 GMT):
@braduf You use it to notify listeners that an event [business event, notifiable threshold was reached?] of "yourEventType" have been executed in the smart contract such that your clients can process? The best description of how the event is received and type of the fields in the event structure is shown here -> https://fabric-shim.github.io/master/fabric-shim.ChaincodeStub.html#setEvent__anchor . SetEvent saves the event to be sent when a transaction is made part of a block and for that it needs to be committed. The payload can be generated for example from stringified JSON as shown in this 1.4 example [here](https://stackoverflow.com/questions/54981807/hyperledger-fabric-1-4-how-to-emit-events-from-the-smart-contract-chaincode-u)

florianc (Tue, 26 Mar 2019 14:10:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9XBHHNHsNFzcjXy7g) @rthatcher hi. I am working on it now, but I am encountering a problem with your code: `Error: Unsupported encoding: utf-8` Here is the code I use: ``` async richQuery(stub, args) { console.info('============= START : RichQuery method ==========='); if (args.length != 1) { throw new Error('Incorrect number of arguments. Expecting 1'); } let query = args[0]; query = { "selector": { "resourceId": "none" } }; let resultIterator = await stub.getQueryResult(JSON.stringify(query)); let results = []; let res = {done: false}; while(!res.done){ res = await resultIterator.next(); if (res && res.value && res.value.value) { console.log("THE RES " + res.value.value.toString('utf-8')); // console.log("RES VALUE 1 " + res.value); //console.log("RES VALUE 2 " + res.value.value); //results.push(JSON.parse(res.value.value.toString('utf-8'))); } if (res.done) { try { resultIterator.close(); } catch (error) { console.log("ITERATOR ERROR " + error); } } } console.log("RESULTS " + results); console.info('============= END : RichQuery method ==========='); return results; } ```

florianc (Tue, 26 Mar 2019 14:17:22 GMT):
NEVERMIND, wrote utf-8 instead of utf8 ...

florianc (Tue, 26 Mar 2019 14:17:34 GMT):
Thank you for your help.

walmon (Tue, 26 Mar 2019 14:32:28 GMT):
In case you missed the news https://medium.com/worldsibu/convector-smart-contracts-is-now-part-of-hyperledger-labs-hosted-by-the-linux-foundation-f9c02b7df9cc

florianc (Tue, 26 Mar 2019 15:03:21 GMT):
With getQueryResult, is it possible to retrieve the key of the document that matched the selector?

florianc (Tue, 26 Mar 2019 15:30:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=B7aDCAHpguZPNt2TB) result.value.key (for those wondering)

vsadriano (Tue, 26 Mar 2019 16:05:42 GMT):
Hi! I'm implementing private data control in NodeJS and I'm getting the error bellow: ```shell 2019-03-26 16:01:01.175 UTC [gossip.privdata] fetchPrivateData -> WARN 0a0 Do not know any peer in the channel( mychannel ) that matches the policies , aborting 2019-03-26 16:01:01.175 UTC [gossip.privdata] reconcile -> ERRO 0a1 reconciliation error when trying to fetch missing items from different peers: Empty membership 2019-03-26 16:01:01.175 UTC [gossip.privdata] run -> ERRO 0a2 Failed to reconcile missing private info, error: Empty membership ``` Can someone helpe me?

walmon (Wed, 27 Mar 2019 03:20:39 GMT):
@vsadriano https://github.com/worldsibu/convector-example-private-data in case this example works to find what's different on your case

walmon (Wed, 27 Mar 2019 03:20:39 GMT):
@vsadriano https://github.com/worldsibu/convector-example-private-data in case this example works to find what's different on your end

dave.enyeart (Wed, 27 Mar 2019 11:59:10 GMT):
@vsadriano the possible reasons are collection definition misconfiguration, or gossip anchor peer or gossip external endpoint misconfiguration

vsadriano (Wed, 27 Mar 2019 13:46:20 GMT):
@dave.enyeart and @walmon tks! TLS configuration was missing.

yod 15 (Wed, 27 Mar 2019 17:28:57 GMT):
Has joined the channel.

yod 15 (Wed, 27 Mar 2019 17:29:06 GMT):
restrict

walmon (Wed, 27 Mar 2019 17:33:23 GMT):
Sure

yod 15 (Wed, 27 Mar 2019 17:38:00 GMT):
Hello guys! Is there a way to restrict some org from writing to the ledger? Like i'd like to have certain orgs which will write changes to the ledger only, but i need some other orgs to have ability to query only. I've tryed to modify ACL and Writers Policies in the configtx but then, even `peer chaincode query` command starts to fail. Endoresemnt policy also does not helps me, on chaincode_example02. Maybe I need somehow to perform check in cheincode itself, like who was creator of the transactions?

yod 15 (Wed, 27 Mar 2019 17:38:00 GMT):
Hello guys! Is there a way to restrict some org from writing to the ledger? Like i'd like to have certain orgs which will write changes to the ledger only, but i need some other orgs to have ability to query only. I've tryed to modify ACL and Writers Policies in the configtx but then, even `peer chaincode query` command starts to fail. Endoresemnt policy also does not helps me, on chaincode_example02. Maybe I need somehow to perform check in chaincode itself, like who was creator of the transactions?

Antimttr (Wed, 27 Mar 2019 18:31:30 GMT):
or if you're writing the gateway client for the hyperledger you can do checks there and restrict access

spartucus (Thu, 28 Mar 2019 02:42:19 GMT):
Has joined the channel.

lucky114407 (Thu, 28 Mar 2019 05:46:46 GMT):
Hello guys, I have a network with chaincode instantiated, i have created 1,00,000 transactions, but when i am querying all the transactions based on selector query, i am getting an error saying timeout. Can anyone help me in this regard

knagware9 (Thu, 28 Mar 2019 07:50:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9KJKYWuYWCja5BzCE) @yod 15 Did you check Attribute-Based Access Control ? https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html

rthatcher (Thu, 28 Mar 2019 09:31:28 GMT):
@lucky114407 - have you seen this doc which has useful information about Queries, Indexes and Pagination: https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html

lucky114407 (Thu, 28 Mar 2019 10:10:22 GMT):
thanks a lot @rthatcher very helpful

rthatcher (Thu, 28 Mar 2019 10:19:19 GMT):
@yod 15 - @knagware9 is correct, and there is there is a little more detail here: https://stackoverflow.com/questions/55392184/how-can-put-a-permission-on-function-in-node-sdk-of-hyperledger-fabric/55395073#55395073

rthatcher (Thu, 28 Mar 2019 10:20:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9KJKYWuYWCja5BzCE) @yod 15 test

Abubakar 3 (Thu, 28 Mar 2019 15:19:10 GMT):
Has joined the channel.

Abubakar 3 (Thu, 28 Mar 2019 15:19:35 GMT):
Hi! I want to know does hyperledger provide a way for tokenization of assets to be transacted? Like an asset can have multiple stakeholders and share the profit and loss of the asset value?

florianc (Thu, 28 Mar 2019 15:27:14 GMT):
This is a logic you can implement in a chaincode.

jmason900 (Thu, 28 Mar 2019 16:13:46 GMT):
@mahoney1 - when is the next scheduled developer meeting ?? I thought they were every other Thursday at 12 pm EST. thanks

braduf (Thu, 28 Mar 2019 21:38:24 GMT):
Hi all, is there a way to use the GetHistoryForKey with pagination just like GetQueryResultWithPagination?

walmon (Fri, 29 Mar 2019 04:13:29 GMT):
Hi guys, here's a practical example of Private Data with 1.4 and Convector - https://hackernoon.com/understanding-blockchain-private-data-a-hands-on-example-eacc3efe4ad6

ilyahq (Fri, 29 Mar 2019 15:44:52 GMT):
Has joined the channel.

charyorde (Sat, 30 Mar 2019 16:55:17 GMT):
Hello, Is it possible to query the balance of all wallets?

muralisr (Sat, 30 Mar 2019 18:20:19 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=igxRbzCK9kwRxC9bS

muralisr (Sat, 30 Mar 2019 18:25:47 GMT):
@Abubakar 3 first class support for tokens in fabrics (`FabToken`) has been in the works for a while with much of the function scheduled for the 2.0 release. High level ideas and design can be obtained following https://jira.hyperledger.org/browse/FAB-11144 and the design doc there. A new "token" CLI command is available for easy construction of transactions (haven't cehcked SDK support). Not sure how much of doc is current or ready. @adc may I bug you to correct and fill in details pretty please :-) ?

Henrycoffin (Sun, 31 Mar 2019 09:30:37 GMT):
Has joined the channel.

mahoney1 (Sun, 31 Mar 2019 13:44:03 GMT):
@jmason900 that's correct - the next is scheduled for Thurs 4th April -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Community+Call

anjalinaik (Mon, 01 Apr 2019 06:00:43 GMT):
Has joined the channel.

anjalinaik (Mon, 01 Apr 2019 06:01:13 GMT):
Hi All. In Golang chaincode can we manipulate the query string to have conditions such as `> || <` in `stub.GetQueryResult`. If so, can you please provide me an example.

sunit.versatile (Mon, 01 Apr 2019 08:24:40 GMT):
Has joined the channel.

mahoney1 (Mon, 01 Apr 2019 10:14:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HrHTkrkSKcR2iXgtp) @anjalinaik are you using CouchDB? If so - see combination operators in http://docs.couchdb.org/en/stable/api/database/find.html#combination-operators (it has examples)

vsadriano (Mon, 01 Apr 2019 15:46:17 GMT):
Hi! I'm using private data in my chaincode and I'm getting the error bellow: ```shell 2019-04-01T15:23:53.167Z ERROR [contracts-spi/chaincodefromcontract.js] {"message":"iterator.next is not a function","stack":"TypeError: iterator.next is not a function at Ccoea.getAllResults (/usr/local/src/lib/ccoea.js:168:38) at Ccoea.getQueryPrivateResultForQueryString (/usr/local/src/lib/ccoea.js:160:34) at at process._tickCallback (internal/process/next_tick.js:188:7)"} ``` The same function is running with public data query. Is there any differecen between return objects of `getQueryResult` and `getPrivateDataQueryResult`?

vsadriano (Mon, 01 Apr 2019 15:46:17 GMT):
Hi! I'm using private data in my chaincode and I'm getting the error bellow: ```shell 2019-04-01T15:23:53.167Z ERROR [contracts-spi/chaincodefromcontract.js] {"message":"iterator.next is not a function","stack":"TypeError: iterator.next is not a function at Ccoea.getAllResults (/usr/local/src/lib/ccoea.js:168:38) at Ccoea.getQueryPrivateResultForQueryString (/usr/local/src/lib/ccoea.js:160:34) at at process._tickCallback (internal/process/next_tick.js:188:7)"} ``` The same function is running with public data query. Is there any difference between return objects of `getQueryResult` and `getPrivateDataQueryResult`?

vsadriano (Mon, 01 Apr 2019 15:46:17 GMT):
Hi! I'm using private data in my chaincode and I'm getting the error bellow: ```shell 2019-04-01T15:23:53.167Z ERROR [contracts-spi/chaincodefromcontract.js] {"message":"iterator.next is not a function","stack":"TypeError: iterator.next is not a function at Ccoea.getAllResults (/usr/local/src/lib/ccoea.js:168:38) at Ccoea.getQueryPrivateResultForQueryString (/usr/local/src/lib/ccoea.js:160:34) at at process._tickCallback (internal/process/next_tick.js:188:7)"} ``` The same function is running with public data query. Is there any difference between object type returned by `getQueryResult` and `getPrivateDataQueryResult`?

notnull (Mon, 01 Apr 2019 15:49:34 GMT):
Has joined the channel.

vsadriano (Mon, 01 Apr 2019 17:25:43 GMT):
I found [FAB-14216](https://jira.hyperledger.org/browse/FAB-14216) and changed from: ```javascript async getQueryPrivateResultForQueryString(cto, collection, queryString) { let resultsIterator = await cto.stub.getPrivateDataQueryResult(collection, queryString); let results = await this.getAllResults(resultsIterator); return results; } ``` to: ```javascript async getQueryPrivateResultForQueryString(cto, collection, queryString) { let resultsIterator = await cto.stub.getPrivateDataQueryResult(collection, queryString); let results = await this.getAllResults(resultsIterator.iterator); return results; } ``` Query is running!

ShrutiHK (Tue, 02 Apr 2019 09:54:22 GMT):
Has joined the channel.

ShrutiHK (Tue, 02 Apr 2019 09:56:56 GMT):
Hi! I want to save multiple records in one invocation request. Is it possible to get this done using a for loop in a chaincode with PutState calls?

walmon (Tue, 02 Apr 2019 12:40:10 GMT):
Yes @ShrutiHK

walmon (Tue, 02 Apr 2019 12:41:07 GMT):
For example https://github.com/worldsibu/convector-example-fabcar/blob/master/packages/car-cc/src/car.controller.ts#L28

ShrutiHK (Tue, 02 Apr 2019 14:28:11 GMT):
Thanks @walmon

walmon (Tue, 02 Apr 2019 14:29:08 GMT):
Sure thing @ShrutiHK

jlcs (Tue, 02 Apr 2019 15:05:15 GMT):
Is there an official Mock Stub for NodeJS chaincode? If not, How do you do unit testing in node chaincode?

walmon (Tue, 02 Apr 2019 15:13:42 GMT):
Hi @jlcs I don't think there's an official one, we use one from The Ledger - here's an example on how to do unit tests on node https://medium.com/worldsibu/testing-and-debugging-a-convector-smart-contract-aa02c84e7ecc

walmon (Tue, 02 Apr 2019 15:13:42 GMT):
Hi @jlcs I don't think there's an official one, we use one from The Ledger - here's an example on how to do unit tests in node https://medium.com/worldsibu/testing-and-debugging-a-convector-smart-contract-aa02c84e7ecc

AYUSHIAGARWAL (Tue, 02 Apr 2019 17:01:26 GMT):
Has joined the channel.

AYUSHIAGARWAL (Tue, 02 Apr 2019 17:10:00 GMT):
I want to implement my own consensus algorithm in hyperledger fabric. https://hyperledger-fabric.readthedocs.io/en/release-1.4/Fabric-FAQ.html#ordering-service Here, I got to know that I need to implement Consenter and Chain interfaces. I tried to read Kafka's code but I am not able to understand much. Can someone guide how to impplement the functions such as HandleChain() , Order() , Configure() , WaitReady() etc.

gumballwabbit (Wed, 03 Apr 2019 01:00:31 GMT):
Has joined the channel.

jlcs (Wed, 03 Apr 2019 07:12:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=8L29Ht497jNwXZYFj) @walmon Thanks!

cyptonized.u (Wed, 03 Apr 2019 08:44:36 GMT):
Has joined the channel.

Crystalto (Wed, 03 Apr 2019 14:08:33 GMT):
Has joined the channel.

mahoney1 (Wed, 03 Apr 2019 17:50:14 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

anjalinaik (Thu, 04 Apr 2019 05:44:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=xTmBLoEC2X96wzXFg) @mahoney1 yes i am using couchDb.Thankyou for the references. Exactly what i needed.

anjalinaik (Thu, 04 Apr 2019 06:14:30 GMT):
Hi All.is it possible to verify the identity of the person who performs invoke/query within the chaincode?

anjalinaik (Thu, 04 Apr 2019 06:15:55 GMT):
identity

NilsPe (Thu, 04 Apr 2019 11:41:35 GMT):
Hi all, GetState does not consider data which has been modified by PutState (in the same transaction). I understand why that is. What is the best way to get the modified state? Is there a chaincode interface available? My approach would be to introduce a data caching layer between my chaincode and the GetState Function to keep track of changes that are not yet committed. Did any of you face this issue before? What are your ideas about that?

anjalinaik (Thu, 04 Apr 2019 14:02:50 GMT):
Hi all.is it possible to call a chain code function from one .go file to another ?

florianc (Thu, 04 Apr 2019 15:21:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=xgP3sNKPKg9iEBq6b) @NilsPe I don't understand what is the purpose of this. Could you share any use case? Also, I think this is ipossible and actually that it should not be implemented inside the chain itself. The ledger should only contain data validated by the consensus, not data that are not valided yet.

mahoney1 (Thu, 04 Apr 2019 15:27:22 GMT):
@anjalinaik see this S/O https://stackoverflow.com/questions/54017510/hyperledger-fabric-chaincode-function-calling-another-function-from-within-chai or an example in the examples directory -> https://github.com/hyperledger/fabric/blob/release-1.4/examples/chaincode/go/example05/chaincode.go#L77

mahoney1 (Thu, 04 Apr 2019 15:29:31 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

mahoney1 (Thu, 04 Apr 2019 16:41:56 GMT):
FYI all - recording of today's Fabric Developer community call is posted at -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings (filename: 2019-0404-fabricdevcommunitycall.zip)

walmon (Thu, 04 Apr 2019 17:01:17 GMT):
@mahoney1 this link in the first slide doesn't seem to work - https://jira.hyperledger.org/browser/FAB-6135

mahoney1 (Thu, 04 Apr 2019 17:34:21 GMT):
@walmon the link is https://jira.hyperledger.org/browse/FAB-6135 (think somehow you added an 'r')

walmon (Thu, 04 Apr 2019 17:40:09 GMT):
Sorry! Thanks

walmon (Thu, 04 Apr 2019 17:40:34 GMT):
I copied from the video and missed 😅

Estebanrestrepo (Thu, 04 Apr 2019 23:25:22 GMT):
How to invoke a chaincode form another chaincode?

anjalinaik (Fri, 05 Apr 2019 05:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=scfdevjZzS29ZQoiK) @mahoney1 Thankyou very much for the referneces @mahoney1.Are there any conditions that needs to be satisfied to succesfully invoke a chaincode from another go file?

anjalinaik (Fri, 05 Apr 2019 05:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=scfdevjZzS29ZQoiK) @mahoney1 Thankyou very much for the references @mahoney1.Are there any conditions that need to be satisfied to successfully invoke a chaincode from another go file?

anjalinaik (Fri, 05 Apr 2019 05:28:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=scfdevjZzS29ZQoiK) @mahoney1 Thankyou very much for the references @mahoney1 .Are there any conditions that need to be satisfied to successfully invoke a chaincode from another go file?

anjalinaik (Fri, 05 Apr 2019 05:30:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=PrGifgN5M4XqMmFDY) @Estebanrestrepo Examples directory -> https://github.com/hyperledger/fabric/blob/release-1.4/examples/chaincode/go/example05/chaincode.go#L77

Rajatsharma (Fri, 05 Apr 2019 07:38:55 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 ?

Rajatsharma (Fri, 05 Apr 2019 07:38:55 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 ?

Rajatsharma (Fri, 05 Apr 2019 07:39:18 GMT):
Then I'll implement my logic accordingly.

mahoney1 (Fri, 05 Apr 2019 09:10:58 GMT):
@anjalinaik many factors to consider (eg, same channel, different channel?) Conditions, yes - see https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html?redirect=true#invokeChaincode__anchor - would also suggest to read this page -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/chaincodenamespace.html for more information

mahoney1 (Fri, 05 Apr 2019 09:15:59 GMT):
@Rajatsharma its invoked by your app client that uses the SDK - an identity is registered/issues for the user and uses that to interact with the smart contract (packaged and installed as chaincode) - suggest to read https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure and the accompanying sample app client for this smart contract is here https://github.com/hyperledger/fabric-samples/tree/release-1.4/commercial-paper/organization/magnetocorp/application

ahmadraza (Fri, 05 Apr 2019 09:38:44 GMT):
Has joined the channel.

Rajatsharma (Fri, 05 Apr 2019 11:02:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=hHqXaeqN3iwLct9oL) @mahoney1 Actually, my query was a bit different You know there are two methods to invoke a chaincode : 1) We invoke our chaincode directly using cli or SDK 2) Or we could call the chaincode inside another chaincode using `stub.InvokeCHaincode()`. In my use case I want to find a way so that I can differentiate between these two(inside the chaincode).

Rajatsharma (Fri, 05 Apr 2019 11:03:54 GMT):
I can get the identity of the registering user using `cid` package. But I want a way that I know that my chaincode is being called from another chaincode.

ViveikYadav (Fri, 05 Apr 2019 11:49:54 GMT):
Has joined the channel.

muralisr (Fri, 05 Apr 2019 13:29:22 GMT):
@Rajatsharma there is no direct way to get that information... however, you can infer it as follows - get the name of called chaincode from the proposal (https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L332), get the called chaincode in the proposal (this is the original proposal received by the peer). If that's different from your chaincode name, then it is called from another chaincode.

muralisr (Fri, 05 Apr 2019 13:29:56 GMT):
(at some point we have make it easy to have that information via a api)

florianc (Fri, 05 Apr 2019 13:48:12 GMT):
Hi. Is there any example for errors handling with the nodejs shim? (this: https://fabric-shim.github.io/release-1.4/fabric-shim.ErrorResponse.html) I would like to improve the handling of errors I throw.

florianc (Fri, 05 Apr 2019 13:53:46 GMT):
Nevermind, got it.

charki (Fri, 05 Apr 2019 14:57:11 GMT):
Has joined the channel.

joeganley (Fri, 05 Apr 2019 15:38:40 GMT):
Has joined the channel.

khrandm (Sat, 06 Apr 2019 10:05:51 GMT):
Has joined the channel.

fardinho (Sat, 06 Apr 2019 18:17:58 GMT):
Has joined the channel.

AYUSHIAGARWAL (Sat, 06 Apr 2019 18:53:13 GMT):
Hi! I am building Hyperledger fabric's code by doing some changes. I get a statement when I execute "$sudo make dist-clean all release docker" The statement is : find: ‘/src/github.com/hyperledger/fabric/core/chaincode/shim’: No such file or directory

AYUSHIAGARWAL (Sat, 06 Apr 2019 18:54:08 GMT):

Selection_001.png

AYUSHIAGARWAL (Sat, 06 Apr 2019 18:55:04 GMT):
This statement cause problem of "shim" not found in gopath when I start my network. Using ./byfn.sh up

AYUSHIAGARWAL (Sat, 06 Apr 2019 18:55:19 GMT):
Can anyone help me?

Rajatsharma (Sun, 07 Apr 2019 07:41:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GTj7xqCkLjZz4X2dT) @muralisr Thanks this was a really big help !! At least now it'll work for me.

Rajatsharma (Mon, 08 Apr 2019 08:25:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GTj7xqCkLjZz4X2dT) @muralisr There's no way I could directly retrieve the name even by getting the proposal. I mean I couldn't find a even a key to retrieve the name of the chaincode. Finally I had to get the key by: ``` let proposal = stub.getSignedProposal() console.log("Signature Header buffer",proposal.proposal.header.signature_header.creator.id_bytes.buffer.toString()) ``` And finally in this buffer I got the name of the chaincode which probably I'll have to parse and get that. Is there any better way to do this ?

netanyahuyasser (Mon, 08 Apr 2019 12:05:54 GMT):
I managed to debug chaincode in dev mode (without spawning any docker containers) via unit tests. I use fabric-node-sdk to create the chaincode. It did successfully debug the chaincode much faster than installing and instantiating it directly within docker containers. However, when I try to put some state i.e. stub.putState, it simply cannot. The state cannot be persisted somewhere within the unit test environment. Is there any proper example of Hyperledger Fabric node-sdk unit tests, specifically for the fabcar example?

muralisr (Mon, 08 Apr 2019 13:25:35 GMT):
@Rajatsharma the information is not in the header but in the payload (cast to ChaincodeProposalPayload). I haven't done this myslef in nodejs but going by your notation above, would be something like `proposal.proposal.payload.input.chaincode_spec.chaincode_id.name` ... apologize if that doesn;'t translate correctly, but the idea is you have to follow the `proposal.proposal.payload` path instead of `proposal.proposal.header`

muralisr (Mon, 08 Apr 2019 13:30:57 GMT):
basically get to https://github.com/hyperledger/fabric/blob/release-1.4/protos/peer/proposal.proto#L245 and from there into https://github.com/hyperledger/fabric/blob/release-1.4/protos/peer/chaincode.proto#L71

nicoduch (Mon, 08 Apr 2019 13:44:42 GMT):
Has joined the channel.

walmon (Mon, 08 Apr 2019 14:40:37 GMT):
@netanyahuyasser there are tricks to start a container in the blockchain with hot-reload and debug active

walmon (Mon, 08 Apr 2019 14:42:10 GMT):
if you use Hurley as your dev environment you can do something like this: https://medium.com/worldsibu/testing-and-debugging-a-convector-smart-contract-aa02c84e7ecc https://github.com/worldsibu/convector-example-unit-tests/blob/master/package.json#L15

walmon (Mon, 08 Apr 2019 14:42:39 GMT):
which at the end is just a ` hurl install --debug`

akshay.lawange (Mon, 08 Apr 2019 14:45:27 GMT):
Hi, We are trying to invoke a transaction with very huge amount of data (say a josn of 2000 inner jsons), but when it comes in chaincode it gives an error for PutState `no ledger context` . However, we have an instance of couchdb for that particular node which is invoking the transaction and other moderate size jsons are invoked successfully. Can anyone help with this?

akshay.lawange (Mon, 08 Apr 2019 14:45:27 GMT):
Hi, We are trying to invoke a transaction with very huge amount of data (array of 2000 inner jsons), but when it comes in chaincode it gives an error for PutState `no ledger context` . However, we have an instance of couchdb for that particular node which is invoking the transaction and other moderate size jsons are invoked successfully. Can anyone help with this?

akshay.lawange (Mon, 08 Apr 2019 14:45:27 GMT):
Hi, We are trying to invoke a transaction with very huge amount of data (array of 2000 jsons), but when it comes in chaincode it gives an error for PutState `no ledger context` . However, we have an instance of couchdb for that particular node which is invoking the transaction and other moderate size jsons are invoked successfully. Can anyone help with this?

netanyahuyasser (Mon, 08 Apr 2019 15:48:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=B4Ze8oC7AqFLM5wwX) @walmon In this example, it uses theledger/fabric-mock-stub instead of sinon and chai. While this is not the one that I’m looking for, I guess I’ll stick with this way. Hurley seems promising, I want to try it soon. Thank you for answering.

walmon (Mon, 08 Apr 2019 15:57:20 GMT):
Yeah, what I referenced was the Hurley part, you don't need to have the same unit tests

walmon (Mon, 08 Apr 2019 15:57:51 GMT):
@netanyahuyasser let me know! Starting code with Hurley is quite easy https://medium.com/worldsibu/fabric-samples-made-easier-with-hurley-the-development-environment-manager-c75b44fa6ac6

walmon (Mon, 08 Apr 2019 15:58:00 GMT):
Just make sure to use the debug flag as the first post

SaphiraBjartskular (Mon, 08 Apr 2019 16:13:12 GMT):
Has joined the channel.

Koushik (Mon, 08 Apr 2019 16:31:32 GMT):
Has joined the channel.

SaphiraBjartskular (Mon, 08 Apr 2019 16:31:37 GMT):
Hi, is there an official node chaincode testing library?

SaphiraBjartskular (Mon, 08 Apr 2019 16:33:52 GMT):
Is there an official testing library for any of the supported languages?

muralisr (Mon, 08 Apr 2019 21:21:34 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=kszGWJYCS4aTJMLFN

muralisr (Mon, 08 Apr 2019 22:02:37 GMT):
@akshay.lawange likely the original proposal timed out and quit. The chaincode interaction failed subsequently due to the timeout. Increasin the timeout https://github.com/hyperledger/fabric/blob/release-1.4/sampleconfig/core.yaml#L527 or via peer's env var CORE_CHAINCODE_EXECUTETIMEOUT will lilkely fix your issue

netanyahuyasser (Mon, 08 Apr 2019 23:47:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vmnJBjFDT2qfSMChu) @SaphiraBjartskular For Go and Java use MockStub API to mock the chaincode transactions. For node, you have to be comfortable with chai and sinon library.

GeenNuar (Tue, 09 Apr 2019 03:33:57 GMT):
Has joined the channel.

Rajatsharma (Tue, 09 Apr 2019 08:08:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qAkhLCRJwiHAKRZcz) @muralisr Currently when I console using: ''' let proposal = stub.getSignedProposal() let input = proposal.proposal.payload.input console.log("input",input) ''' I get: ``` input ByteBuffer { buffer: , offset: 964, markedOffset: -1, limit: 1001, littleEndian: true, noAssert: false } ``` And I've even tried `JSON.parse(input.buffer.toString())`, even that throws an error. I'm trying in Node but actually even I want to implement this in GO. SO If you know a method in even Go that would be useful. Otherwise, we'll have to parse the string converted buffer and work on that.

Rajatsharma (Tue, 09 Apr 2019 08:08:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qAkhLCRJwiHAKRZcz) @muralisr Currently when I console using: ``` let proposal = stub.getSignedProposal() let input = proposal.proposal.payload.input console.log("input",input) ``` I get: ``` input ByteBuffer { buffer: , offset: 964, markedOffset: -1, limit: 1001, littleEndian: true, noAssert: false } ``` And I've even tried `JSON.parse(input.buffer.toString())`, even that throws an error. I'm trying in Node but actually even I want to implement this in GO. SO If you know a method in even Go that would be useful. Otherwise, we'll have to parse the string converted buffer and work on that.

davidkel (Tue, 09 Apr 2019 10:06:46 GMT):
@Rajatsharma The input buffer is a protobuf bytearray. The node fabric-shim doesn't decode it. Don't know if the Go Shim decodes it or not either as I don't know if it's guaranteed to be the same type of protobuf for every request @muralisr might now. Your only option would be to decode the protobuf bytearray yourself

florianc (Tue, 09 Apr 2019 11:02:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=pEGpZj2eYY85cPmCs) @Rajatsharma Hey. Check my last comment on this issue: https://jira.hyperledger.org/browse/FAB-14785 It should solve your problem

AndresMartinezMelgar.itcl (Tue, 09 Apr 2019 11:51:56 GMT):
Hi, why my query method doent work? private Response query(ChaincodeStub stub, List params) { try{ String key = params.get(0); String state = stub.getStringState(key); if(state==null) { return newErrorResponse("Id doesnt exit"); } _logger.info("STATE--> "+state); return newSuccessResponse(state); }catch (Throwable e) { return newErrorResponse(e); } } When i look "logger.info" i find the spected result, but return statment is always blank peer chaincode query..... doesnt return nothing

Rajatsharma (Tue, 09 Apr 2019 13:09:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AG5CRvroaJ9bibjwq) @florianc Thanks but actually my work was a bit different. I don't need to work on `stub.invokeChaincode()` rather I'm working on `stub.getSignedProposal()` and returned structure is different in both the cases. And I tried the way you've proceeded it's not working for me.

florianc (Tue, 09 Apr 2019 13:22:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=MuRsjFouRb4YGpCv7) @Rajatsharma Can you give me the buffer parsed as a string? (toString('utf8') shoud do)

Rajatsharma (Tue, 09 Apr 2019 13:44:11 GMT):
that's what I was saying it's not even getting converted to a string. This error shows up :laughing:

Rajatsharma (Tue, 09 Apr 2019 13:44:11 GMT):
that's what I was saying it's not even getting converted to a string. This error shows up: ``` Unexpected token � in JSON at position 1 ```

Rajatsharma (Tue, 09 Apr 2019 13:45:11 GMT):
See if you want to replicate what I'm saying:

Rajatsharma (Tue, 09 Apr 2019 13:45:11 GMT):
See if you want to replicate what I'm saying: just do this in any chaincode ``` let proposal = stub.getSignedProposal() let input = proposal.proposal.payload.input let buf = input.buffer console.log("Proposal -- ",proposal) console.log("input",input) console.log(JSON.parse(buf.toString())); ```

florianc (Tue, 09 Apr 2019 13:47:00 GMT):
Can you give me the result of buf.toString() ? (without json parsing)

Rajatsharma (Tue, 09 Apr 2019 13:48:19 GMT):
```� m �Ų���ʔ" mychannel*@96d87b9d47767f8f66e0061e913c1cad0f51c9f8e4f8be2ed0468b2ca35b116b: b┤┌┐_cc_24� � O⎼±1MSP�↑↑↑↑↑BEGIN CERTIFICATE↑↑↑↑↑ MIICJDCCAc┤±A┬IBA±IRAIOJ7⎼7└Q3I└├⎺dd⎻▮─79H⎺┬C±YIK⎺ZI≥┘▮EA┬I┬b≥EL MA┐GA1UEB▒MCVVM│E≥ARB±NVBA±TC┐N▒bG┌└b3J┤▒WE│F┘AUB±NVBAcTDVN▒b☃BG c└F┤Y2┌≥Y28│F≥AVB±NVBA⎺TD└9≤Z≥E┤c└F─YXQ┤Y29├MR⎺┬GAYDVQQDE│F┘YS5┴ c└c│L┼J▒▒└F▮L└N┴bTAeF┬▮│OTA▮MDQ│M≥Q│MDB▒F┬▮≤OTA▮MDE│M≥Q│MDB▒MG⎺│ C≥AJB±NVBAYTA┌VTMRM┬EQYDVQQIE┬⎻DYW│⎻Z└9≤b└┌▒MRY┬FAYDVQQHE┬1TYW4± R┼J▒b└N⎻c2N┴MQ8┬DQYDVQQLE┬Z┘bG┌┌b┼Q│HTAbB±NVBAMMFEF┐bW┌┤QG9≤Z≥E┤ c└F─YXQ┤Y29├MF┐┬E┬YHK⎺ZI≥┘▮CAQYIK⎺ZI≥┘▮DAQcDQ±AEW▮┌┬F☃┤7dUZUP8│/ SP├┼8Y/BMQ≥O⎻DX┴⎺ZF5─9N⎽VOX┌±F5VSYEG3E┬8A7→c└K≥Z┌cI→┘d±│L☃GJ▒JVB KeW┐▒6NNME⎽┬D±YDVR▮PAQH/BAQDA±eAMA┬GA1UdE┬EB/┬QCMAA┬K┬YDVR▮┘BCQ┬ I⎺A±▒eQ│W├┼C5☃57d┐TC/│▒U3Hec5⎻└BWbM┴c▮4▒J└☃D°F⎺┬C±YIK⎺ZI≥┘▮EA┬ID R┬A┬RAI±dHS▒┬3└┬┴3WY°XV▮4▒b│6┬☃4SQNeeCAdP─6I3Ac▒5→QCIAU│YPA2≥2⎼⎽ ┤≥ATUYP≥┴2┐⎺d│≥≥S±⎽▒├┬PHVe├O72±1 ↑↑↑↑↑END CERTIFICATE↑↑↑↑↑ Q�>��T5��┴��5�☃☃O<��' % # b┤┌┐_cc_24 e┼├⎼≤ 121 1▮▮ 2▮19↑▮4↑▮9T13:47:46↓616Z ☃┼°⎺ [┌☃b/▒▒┼d┌e⎼↓┘⎽] ☃┼°⎺: [└≤c▒▒┼┼e┌↑96d87b9d] C▒┌┌☃┼± c▒▒☃┼c⎺de I┼┴⎺┐e() ⎽┤cceeded↓ Se┼d☃┼± COMPLETED └e⎽⎽▒±e b▒c┐ ├⎺ ⎻ee⎼ π"├☃└e⎽├▒└⎻":"2▮19↑▮4↑▮9T13:47:46↓616Z"£ ```

Rajatsharma (Tue, 09 Apr 2019 13:48:19 GMT):
```� l �Ų����" mychannel*@da9525861554f4a20880ae1b3f65d35e3007f51e356f870d3840eddd7ecc875c: b┤┌┐_cc_25� � O⎼±1MSP�↑↑↑↑↑BEGIN CERTIFICATE↑↑↑↑↑ MIICJDCCAc┤±A┬IBA±IRAIOJ7⎼7└Q3I└├⎺dd⎻▮─79H⎺┬C±YIK⎺ZI≥┘▮EA┬I┬b≥EL MA┐GA1UEB▒MCVVM│E≥ARB±NVBA±TC┐N▒bG┌└b3J┤▒WE│F┘AUB±NVBAcTDVN▒b☃BG c└F┤Y2┌≥Y28│F≥AVB±NVBA⎺TD└9≤Z≥E┤c└F─YXQ┤Y29├MR⎺┬GAYDVQQDE│F┘YS5┴ c└c│L┼J▒▒└F▮L└N┴bTAeF┬▮│OTA▮MDQ│M≥Q│MDB▒F┬▮≤OTA▮MDE│M≥Q│MDB▒MG⎺│ C≥AJB±NVBAYTA┌VTMRM┬EQYDVQQIE┬⎻DYW│⎻Z└9≤b└┌▒MRY┬FAYDVQQHE┬1TYW4± R┼J▒b└N⎻c2N┴MQ8┬DQYDVQQLE┬Z┘bG┌┌b┼Q│HTAbB±NVBAMMFEF┐bW┌┤QG9≤Z≥E┤ c└F─YXQ┤Y29├MF┐┬E┬YHK⎺ZI≥┘▮CAQYIK⎺ZI≥┘▮DAQcDQ±AEW▮┌┬F☃┤7dUZUP8│/ SP├┼8Y/BMQ≥O⎻DX┴⎺ZF5─9N⎽VOX┌±F5VSYEG3E┬8A7→c└K≥Z┌cI→┘d±│L☃GJ▒JVB KeW┐▒6NNME⎽┬D±YDVR▮PAQH/BAQDA±eAMA┬GA1UdE┬EB/┬QCMAA┬K┬YDVR▮┘BCQ┬ I⎺A±▒eQ│W├┼C5☃57d┐TC/│▒U3Hec5⎻└BWbM┴c▮4▒J└☃D°F⎺┬C±YIK⎺ZI≥┘▮EA┬ID R┬A┬RAI±dHS▒┬3└┬┴3WY°XV▮4▒b│6┬☃4SQNeeCAdP─6I3Ac▒5→QCIAU│YPA2≥2⎼⎽ ┤≥ATUYP≥┴2┐⎺d│≥≥S±⎽▒├┬PHVe├O72±1 ↑↑↑↑↑END CERTIFICATE↑↑↑↑↑ ��↓�Y�?��/E���c�\│��' % # b┤┌┐_cc_25 e┼├⎼≤ 121 1▮▮ 2▮19↑▮4↑▮9T13:49:36↓▮56Z ☃┼°⎺ [┌☃b/▒▒┼d┌e⎼↓┘⎽] ☃┼°⎺: [└≤c▒▒┼┼e┌↑d▒952586] C▒┌┌☃┼± c▒▒☃┼c⎺de I┼┴⎺┐e() ⎽┤cceeded↓ Se┼d☃┼± COMPLETED └e⎽⎽▒±e b▒c┐ ├⎺ ⎻ee⎼ π"├☃└e⎽├▒└⎻":"2▮19↑▮4↑▮9T13:49:36↓▮56Z"£ ```

florianc (Tue, 09 Apr 2019 13:50:53 GMT):
(You are using IBP aren't you?) If I am not mistaken, the result you want is after the "mychannel*stuffstuffstuff" part. I still think you have to play with the offset/limit/buffer length to get it right.

davidkel (Tue, 09 Apr 2019 13:51:48 GMT):
@Rajatsharma The contents are input are a google protobuf format. You cannot easily decipher it. You must decode it using the correct protobuf declaration

davidkel (Tue, 09 Apr 2019 13:51:48 GMT):
@Rajatsharma The contents of input are a google protobuf format. You cannot easily decipher it. You must decode it using the correct protobuf declaration

florianc (Tue, 09 Apr 2019 13:52:39 GMT):
I think I might be able to give you the script if you give me the input variable as a string.

florianc (Tue, 09 Apr 2019 13:52:39 GMT):
I think I might be able to give you the script if you give me the input variable as a string. (with all the buffer content)

Rajatsharma (Tue, 09 Apr 2019 13:52:48 GMT):
Yes I'll try to do that only now. Actually I was just trying to find a way around this. As parsing this string is very tough.

Rajatsharma (Tue, 09 Apr 2019 13:53:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=n9e6XPKTpn6jkfDCG) @florianc You could try doing that in any of your chaincode. Even you'll get the same

Rajatsharma (Tue, 09 Apr 2019 13:53:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5h7TECkhZxKiJQaF3) @davidkel Could you suggest me something

florianc (Tue, 09 Apr 2019 13:53:49 GMT):
I don't want to update my chaincode right now ^^

Rajatsharma (Tue, 09 Apr 2019 13:59:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=CQhLG5PRRwKc28iEW) I just need the name of the chiancode that is being invoked

davidkel (Tue, 09 Apr 2019 14:00:52 GMT):
@Rajatsharma If you look at the following code ``` let ccpp; try { ccpp = _proposalProto.ChaincodeProposalPayload.decode(this.proposal.payload); decodedSP.proposal.payload = ccpp; } catch (err) { throw new Error(util.format('Decoding ChaincodeProposalPayload failed: %s', err)); } ``` What you see if is part of the information being decoded through the protobuf capability that the fabric-shim exploits. This results in the structure that you see with the `input` variable. however the input variable now itself is a bytebuffer of some defined protobuf. If you know the type of protobuf being contained in this field then you can decode it and that would result in an object with a sets with data based on that protobuf. The definition for this protobuf is as follows ``` type ChaincodeProposalPayload struct { // Input contains the arguments for this invocation. If this invocation // deploys a new chaincode, ESCC/VSCC are part of this field. // This is usually a marshaled ChaincodeInvocationSpec Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // TransientMap contains data (e.g. cryptographic material) that might be used // to implement some form of application-level confidentiality. The contents // of this field are supposed to always be omitted from the transaction and // excluded from the ledger. TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } ``` And as you see it says the input field is `likely` to be a ChaincodeInvocationSpec, so you need to decode it using that definition. The problem is that in your chaincode you would have to scaffold all the required capability to be able to decode this bytebuffer correctly in the same way that the shim code does it.

davidkel (Tue, 09 Apr 2019 14:00:52 GMT):
@Rajatsharma If you look at the following code from the fabric-shim that decodes part of the message to create the value you get in the getSignedProposal ``` let ccpp; try { ccpp = _proposalProto.ChaincodeProposalPayload.decode(this.proposal.payload); decodedSP.proposal.payload = ccpp; } catch (err) { throw new Error(util.format('Decoding ChaincodeProposalPayload failed: %s', err)); } ``` What you see if is part of the information being decoded through the protobuf capability that the fabric-shim exploits. This results in the structure that you see with the `input` variable. however the input variable now itself is a bytebuffer of some defined protobuf. If you know the type of protobuf being contained in this field then you can decode it and that would result in an object with a sets with data based on that protobuf. The definition for this protobuf is as follows ``` type ChaincodeProposalPayload struct { // Input contains the arguments for this invocation. If this invocation // deploys a new chaincode, ESCC/VSCC are part of this field. // This is usually a marshaled ChaincodeInvocationSpec Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // TransientMap contains data (e.g. cryptographic material) that might be used // to implement some form of application-level confidentiality. The contents // of this field are supposed to always be omitted from the transaction and // excluded from the ledger. TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } ``` And as you see it says the input field is `likely` to be a ChaincodeInvocationSpec, so you need to decode it using that definition. The problem is that in your chaincode you would have to scaffold all the required capability to be able to decode this bytebuffer correctly in the same way that the shim code does it.

davidkel (Tue, 09 Apr 2019 14:00:52 GMT):
@Rajatsharma If you look at the following code from the fabric-shim that decodes part of the message to create the value you get in the getSignedProposal ``` let ccpp; try { ccpp = _proposalProto.ChaincodeProposalPayload.decode(this.proposal.payload); decodedSP.proposal.payload = ccpp; } catch (err) { throw new Error(util.format('Decoding ChaincodeProposalPayload failed: %s', err)); } ``` What you see if is part of the information being decoded through the protobuf capability that the fabric-shim exploits. This results in the structure that you see with the `input` variable. however the input variable now itself is a bytebuffer of some defined protobuf. If you know the type of protobuf being contained in this field then you can decode it and that would result in an object with a sets with data based on that protobuf. The definition for this protobuf is as follows ``` type ChaincodeProposalPayload struct { // Input contains the arguments for this invocation. If this invocation // deploys a new chaincode, ESCC/VSCC are part of this field. // This is usually a marshaled ChaincodeInvocationSpec Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // TransientMap contains data (e.g. cryptographic material) that might be used // to implement some form of application-level confidentiality. The contents // of this field are supposed to always be omitted from the transaction and // excluded from the ledger. TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } ``` And as you see it says the input field is `likely` to be a ChaincodeInvocationSpec, so you need to decode it using that definition. The problem is that in your chaincode you would have to scaffold all the required capability to be able to decode this bytebuffer correctly in the same way that the shim code does it for other protobufs

davidkel (Tue, 09 Apr 2019 14:00:52 GMT):
@Rajatsharma If you look at the following code from the fabric-shim that decodes part of the message to create the value you get in the getSignedProposal ``` let ccpp; try { ccpp = _proposalProto.ChaincodeProposalPayload.decode(this.proposal.payload); decodedSP.proposal.payload = ccpp; } catch (err) { throw new Error(util.format('Decoding ChaincodeProposalPayload failed: %s', err)); } ``` What you see if is part of the information being decoded through the protobuf capability that the fabric-shim exploits. This results in the structure that you see with the `input` variable. however the input variable now itself is a bytebuffer of some defined protobuf. If you know the type of protobuf being contained in this field then you can decode it and that would result in an object with a sets with data based on that protobuf. The definition for this protobuf is as follows ``` type ChaincodeProposalPayload struct { // Input contains the arguments for this invocation. If this invocation // deploys a new chaincode, ESCC/VSCC are part of this field. // This is usually a marshaled ChaincodeInvocationSpec Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // TransientMap contains data (e.g. cryptographic material) that might be used // to implement some form of application-level confidentiality. The contents // of this field are supposed to always be omitted from the transaction and // excluded from the ledger. TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } ``` And as you see it says the input field is `usually` a ChaincodeInvocationSpec, so you need to decode it using that definition. The problem is that in your chaincode you would have to scaffold all the required capability to be able to decode this bytebuffer correctly in the same way that the shim code does it for other protobufs

davidkel (Tue, 09 Apr 2019 14:03:32 GMT):
The fabric-shim probably doesn't decode the input for you because based on the comment you cannot assume it will always be a ChaincodeInvocationSpec

Rajatsharma (Tue, 09 Apr 2019 14:06:36 GMT):
I got your point. Thanks for helping me out. The only point I'm doing all this is because there's no way we can differentiate if a call to a chaincode is coming directly or using `stub.invokeChaincode()` from another chaincode. In mu use-case I needed to diffenciate that and for that I'm doing all this.

davidkel (Tue, 09 Apr 2019 14:07:19 GMT):
I would suggest you look at writing it in Go. The Go shim may do a comprehensive job of decoding this more for you

davidkel (Tue, 09 Apr 2019 14:07:19 GMT):
I would suggest you look at writing it in Go to see. The Go shim may do a comprehensive job of decoding this more for you

davidkel (Tue, 09 Apr 2019 14:07:59 GMT):
Or you could raise a Jira on fabric-shim to decode the signed proposal more but I don't know when someone might look into implementing that

Rajatsharma (Tue, 09 Apr 2019 14:09:17 GMT):
I'll write in go only. I'll convert the proposal to String and retrieve my chaincode name. That seems pretty easy and will work fine for me. And I've raised a JIRA already but there's no response on that. So i'll proceed like this only.

Rajatsharma (Tue, 09 Apr 2019 14:09:30 GMT):
Thanks anyways, buddy !!!

davidkel (Tue, 09 Apr 2019 14:11:44 GMT):
I don't know if the Go shim does provide any extra decoding or whether you still would have to decode it yourself however

Rajatsharma (Tue, 09 Apr 2019 14:12:32 GMT):
It does give me the capability to normally have my proposal as a string. I'll use that only.

Rajatsharma (Tue, 09 Apr 2019 14:12:59 GMT):
It's just that I was trying to find a better way of doing that.

Rajatsharma (Tue, 09 Apr 2019 14:13:53 GMT):
https://github.com/hyperledger/fabric/blob/release-1.4/protos/peer/proposal.pb.go#L59

florianc (Tue, 09 Apr 2019 14:26:52 GMT):
Makes me think about a " problem" I got back then, where I saw that querying from nodejs sdk returned in a given format, but invoking the same query from chaincode did not return it with the same format. Kind of weird.

SaphiraBjartskular (Tue, 09 Apr 2019 17:59:44 GMT):
OK, I am having a very weird issue with my chaincode. When I install new version of chaincode it is not being run, some old cached version is being run even though the new container has the correct version number. Inside the chaincode docker container how can I see exactly what chaincode is being run?

SaphiraBjartskular (Tue, 09 Apr 2019 18:04:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iWy6Qc8HK5j6qg3Ju) Running node chaincode

SaphiraBjartskular (Tue, 09 Apr 2019 19:02:54 GMT):
docker ps

SaphiraBjartskular (Tue, 09 Apr 2019 19:34:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iWy6Qc8HK5j6qg3Ju) Anyone have similar issues?

SaphiraBjartskular (Tue, 09 Apr 2019 19:48:00 GMT):
It works if I change the chaincodeID

SaphiraBjartskular (Tue, 09 Apr 2019 22:02:48 GMT):
Even after stopping and removing network containers, removing the shared volumes, I cannot reuse the same chaincodeID and version. There must be a cache somewhere I am not clearing- any ideas?

muralisr (Wed, 10 Apr 2019 03:24:52 GMT):
@SaphiraBjartskular I think you are running into stale docker image (not container) ...did you try removing the image with `docker rmi ...` ?

HazimDikenli (Wed, 10 Apr 2019 11:45:54 GMT):
Has joined the channel.

SaphiraBjartskular (Wed, 10 Apr 2019 16:08:06 GMT):
you are correct, that solved the problem! Thanks

SaphiraBjartskular (Wed, 10 Apr 2019 16:08:06 GMT):
you are correct, that solved the problem! Thanks @muralisr

braduf (Wed, 10 Apr 2019 20:23:49 GMT):
Hi, I have a peer deployed on AWS, the peer has successfully joined a channel and installed a chaincode. Now when I try to instantiate the chaincode, I get the following error as a response in the cli: `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0` If I check the logs of the endorsing peer of the transaction I see the following logs: ``` 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ec stopping container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ed stop container result error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ee killing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ef kill container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5f0 removing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] stopInternal -> DEBU 5f1 remove container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.762 UTC [dockercontroller] createContainer -> DEBU 5f2 create container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] getDockerHostConfig -> DEBU 5f3 docker container hostconfig NetworkMode: host 2019-04-10 19:47:34.850 UTC [dockercontroller] createContainer -> DEBU 5f4 created container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [dockercontroller] Start -> DEBU 5f5 Started container dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f6 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f7 waiting for container(ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f8 got container (ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f9 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.421 UTC [gossip.discovery] periodicalReconnectToDead -> DEBU 5fa Sleeping 25s ``` Does anyboy know why the container is stopped? Thanks in advance.

braduf (Wed, 10 Apr 2019 20:23:49 GMT):
Hi, I have a peer deployed on AWS, the peer has successfully joined a channel and installed a chaincode. Now when I try to instantiate the chaincode, I get the following error as a response in the cli: `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0` If I check the logs of the endorsing peer of the transaction I see the following logs: ``` 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ec stopping container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ed stop container result error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ee killing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ef kill container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5f0 removing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] stopInternal -> DEBU 5f1 remove container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.762 UTC [dockercontroller] createContainer -> DEBU 5f2 create container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] getDockerHostConfig -> DEBU 5f3 docker container hostconfig NetworkMode: host 2019-04-10 19:47:34.850 UTC [dockercontroller] createContainer -> DEBU 5f4 created container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [dockercontroller] Start -> DEBU 5f5 Started container dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f6 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f7 waiting for container(ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f8 got container (ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f9 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.421 UTC [gossip.discovery] periodicalReconnectToDead -> DEBU 5fa Sleeping 25s ``` Does anyboy know what could be a reason that the cc container is stopped? Thanks in advance.

braduf (Wed, 10 Apr 2019 20:23:49 GMT):
Hi, I have a peer deployed on AWS, the peer has successfully joined a channel and installed a chaincode. Now when I try to instantiate the chaincode, I get the following error as a response in the cli: `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0` If I check the logs of the endorsing peer of the transaction I see the following logs: ``` 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ec stopping container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ed stop container result error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ee killing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ef kill container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5f0 removing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] stopInternal -> DEBU 5f1 remove container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.762 UTC [dockercontroller] createContainer -> DEBU 5f2 create container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] getDockerHostConfig -> DEBU 5f3 docker container hostconfig NetworkMode: host 2019-04-10 19:47:34.850 UTC [dockercontroller] createContainer -> DEBU 5f4 created container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [dockercontroller] Start -> DEBU 5f5 Started container dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f6 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f7 waiting for container(ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f8 got container (ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f9 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.421 UTC [gossip.discovery] periodicalReconnectToDead -> DEBU 5fa Sleeping 25s ``` Does anyboy know what could be a reason that the cc container is stopped? Thanks in advance.

braduf (Wed, 10 Apr 2019 20:23:49 GMT):
Hi, I have a peer deployed on AWS, the peer has successfully joined a channel and installed a chaincode. Now when I try to instantiate the chaincode, I get the following error as a response in the cli: `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0` If I check the logs of the endorsing peer of the transaction I see the following logs: ``` 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ec stopping container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.760 UTC [dockercontroller] stopInternal -> DEBU 5ed stop container result error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ee killing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5ef kill container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.761 UTC [dockercontroller] stopInternal -> DEBU 5f0 removing container id=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] stopInternal -> DEBU 5f1 remove container result id=dev-peer0.orgname.com.co-ccname-0.1 error="No such container: dev-peer0.orgname.com.co-ccname-0.1" 2019-04-10 19:47:34.762 UTC [dockercontroller] createContainer -> DEBU 5f2 create container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:34.762 UTC [dockercontroller] getDockerHostConfig -> DEBU 5f3 docker container hostconfig NetworkMode: host 2019-04-10 19:47:34.850 UTC [dockercontroller] createContainer -> DEBU 5f4 created container imageID=dev-peer0.orgname.com.co-ccname-0.1-7d440138004697ca76313deaab1b4f5c7752453ca8f5b92b25b3ffa322a3e919 containerID=dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [dockercontroller] Start -> DEBU 5f5 Started container dev-peer0.orgname.com.co-ccname-0.1 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f6 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f7 waiting for container(ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] lockContainer -> DEBU 5f8 got container (ccname-0.1) lock 2019-04-10 19:47:35.166 UTC [container] unlockContainer -> DEBU 5f9 container lock deleted(ccname-0.1) 2019-04-10 19:47:35.421 UTC [gossip.discovery] periodicalReconnectToDead -> DEBU 5fa Sleeping 25s ``` I can not see any logs of the chaincode container that was created because it is completely removed. Does anyboy know what could be a reason that the cc container is stopped? Thanks in advance.

braduf (Wed, 10 Apr 2019 20:37:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rtWa6hFvDLrBqeQZe) ``` 2019-04-10 20:32:44.373 UTC [shim] userChaincodeStreamGetter -> ERRO 001 context deadline exceeded error trying to connect to local peer pesochaincodeutxo/vendor/github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter /chaincode/input/src/pesochaincodeutxo/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:111 pesochaincodeutxo/vendor/github.com/hyperledger/fabric/core/chaincode/shim.Start /chaincode/input/src/pesochaincodeutxo/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:150 main.main /chaincode/input/src/pesochaincodeutxo/pesochaincode.go:100 runtime.main /opt/go/src/runtime/proc.go:201 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 2019-04-10 20:32:44.373 UTC [pesochaincode_utxo] Criticalf -> CRIT 002 Error creating new Smart Contract: error trying to connect to local peer: context deadline exceeded ``` This is the log from the cc container i think...

braduf (Wed, 10 Apr 2019 20:37:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=rtWa6hFvDLrBqeQZe) ``` 2019-04-10 20:32:44.373 UTC [shim] userChaincodeStreamGetter -> ERRO 001 context deadline exceeded error trying to connect to local peer ccname/vendor/github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter /chaincode/input/src/ccname/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:111 ccname/vendor/github.com/hyperledger/fabric/core/chaincode/shim.Start /chaincode/input/src/ccname/vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:150 main.main /chaincode/input/src/ccname/pesochaincode.go:100 runtime.main /opt/go/src/runtime/proc.go:201 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 2019-04-10 20:32:44.373 UTC [ccname] Criticalf -> CRIT 002 Error creating new Smart Contract: error trying to connect to local peer: context deadline exceeded ``` This is the log from the cc container i think...

muralisr (Thu, 11 Apr 2019 02:09:14 GMT):
@braduf going by the above two logs (the former from the chaincode), appears you are running into connectivity issues from the container side

muralisr (Thu, 11 Apr 2019 02:09:14 GMT):
@braduf going by the above two logs (the former from the chaincode), appears you are running into connectivity issues from the chaincode container side

muralisr (Thu, 11 Apr 2019 02:09:32 GMT):
(I wouldn'

muralisr (Thu, 11 Apr 2019 02:09:32 GMT):
(I wouldn't worry about the logs you see on the peer side ... just cleanup)

TristanBustillo (Thu, 11 Apr 2019 04:02:49 GMT):
Has joined the channel.

anjalinaik (Thu, 11 Apr 2019 12:12:22 GMT):
Hi Experts. I am using rich query from couchDB to do some logical filtering of the records. When I execute the query string from couchDB using Mango, I am able to get accurate results. However, when I run the same thing using `stub.GetQueryResult(queryString)` I am getting different results. Can anybody please help me.``` ```

anjalinaik (Thu, 11 Apr 2019 12:12:22 GMT):
Hi Experts. I am using rich query from couchDB to do some logical filtering of the records. When I execute the query string from couchDB using Mango, I am able to get accurate results. However, when I run the same thing using `stub.GetQueryResult(queryString)` I am getting different results. Can anybody please help me. Query String: ``` { "selector": { "docType": { "$eq": "Shipment" }, "_id": { "$gt": null } }, "sort": [ { "_id": "desc" } ], "limit": 1 } ``` Expected Result : 1 record, Obtained result using `stub.GetQueryResult(queryString)`: 2 records

emeakai (Thu, 11 Apr 2019 14:01:08 GMT):
Has joined the channel.

edo3 (Thu, 11 Apr 2019 15:25:28 GMT):
Hello there, I'm having a problem writing tests for a particular chaincode. I can't seem to instantiate another chaincode inside my MockStub. Do you know how to correctly use MockPeerChaincode?

SaphiraBjartskular (Thu, 11 Apr 2019 17:49:28 GMT):
Hi, Where can I find the source code for the npm module `fabric-shim`

SaphiraBjartskular (Thu, 11 Apr 2019 17:49:28 GMT):
Hi, Where can I find the source code for the npm module `fabric-shim`?

davidkel (Thu, 11 Apr 2019 18:11:54 GMT):
@SaphiraBjartskular read only mirror is available on github https://github.com/hyperledger/fabric-chaincode-node

SaphiraBjartskular (Thu, 11 Apr 2019 18:36:48 GMT):
@davidkel thank you!

itg1996 (Fri, 12 Apr 2019 09:01:33 GMT):
Has joined the channel.

itg1996 (Fri, 12 Apr 2019 09:02:48 GMT):
hi everyone, I am writing chaincode in nodejs using fabric-contract-api. I want to know how to pass values to constructor while instantiating ?

ranjan008 (Fri, 12 Apr 2019 10:28:41 GMT):
@muralisr How do we resolve the cauthsdl dependency in chaincode when implementing the key based endorsement policy?

mc (Fri, 12 Apr 2019 10:51:47 GMT):
Has joined the channel.

muralisr (Fri, 12 Apr 2019 12:34:08 GMT):
Can you elaborarte @ranjan008 ?

davidkel (Fri, 12 Apr 2019 12:36:26 GMT):
@itg1996 You can't pass arguments to the constructor. Also when the constructor is run there is no transaction context so no interaction with state can be done. You will have to have an initialisation function. As you say anyone could run that initialisation function so you would need to put some protection in to stop that from happening. For example you could use attribute based access control to restrict who can run it or read the world state and see if the system has already been initialised and just return without doing anything

ranjan008 (Fri, 12 Apr 2019 12:47:06 GMT):
@muralisr I am trying to set key level endorsement policy in my chaincode and since it take byte array for the policy I am getting policy as string and converting it into bytes for which I needed cauthsdl library from the fabric but when I try to install and instantiate the chaincode image doesn't gets created because of dependencies.

muralisr (Fri, 12 Apr 2019 12:49:18 GMT):
@ranjan008 is your chaincode nodejs or go

muralisr (Fri, 12 Apr 2019 12:49:18 GMT):
@ranjan008 is your chaincode nodejs or go ?

muralisr (Fri, 12 Apr 2019 12:49:18 GMT):
@ranjan008 is your chaincode GO ?

muralisr (Fri, 12 Apr 2019 12:57:37 GMT):
in go the ext/statebased library in the shim provides you the interfaces https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/shim/ext/statebased along with the shim apis https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L99

muralisr (Fri, 12 Apr 2019 12:57:37 GMT):
in go the ext/statebased library in the shim provides you the interfaces https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/shim/ext/statebased along with the shim apis https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L99. The chaincode in this fabric-sample excercises those apis https://github.com/hyperledger/fabric-samples/tree/release-1.4/interest_rate_swaps

braduf (Fri, 12 Apr 2019 14:44:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KdrK6A7YnCexhYTof) @muralisr The thing that solved the problem was using the public IP in the CORE_PEER_CHAINCODEADDRESS instead of the container name or 0.0.0.0. Can you explain why exactly? Because both the chaincode container and peer container are run on the same host, so why is the public ip needed there? Thanks a lot!

braduf (Fri, 12 Apr 2019 14:44:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KdrK6A7YnCexhYTof) @muralisr The thing that solved the problem was using the public IP in the CORE_PEER_CHAINCODEADDRESS instead of the container name or 0.0.0.0. Can you explain why exactly? Because both the chaincode container and peer container are running on the same host, so why is the public ip needed there? Thanks a lot!

SaphiraBjartskular (Fri, 12 Apr 2019 17:18:30 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?

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation unless you are passing in an object as the first parameter, and no other parameters

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation unless you are passing in an object as the first parameter, and no other parameters. Be aware that the api signature is of the form `stub.createComposityKey(String, [String, String, String])

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation unless you are passing in an object as the first parameter, and no other parameters. Be aware that the api signature is of the form `stub.createComposityKey(String, [String, String, String])`.

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation unless you are passing in an object as the first parameter, and no other parameters. Be aware that the api signature is of the form `stub.createComposityKey(String, [String, String, String, ...])`.

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation unless you are passing in an object as the first parameter, and an empty array. Be aware that the api signature is of the form `stub.createComposityKey(String, [String, String, String, ...])`.

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation. Be aware that the api signature is of the form `stub.createComposityKey(String, [String, String, String, ...])`.

davidkel (Fri, 12 Apr 2019 17:30:39 GMT):
@SaphiraBjartskular Can you provide an example where this is happening ? I cannot see how that could happen with the implementation. Be aware that the api signature is of the form `stub.createCompositeKey(String, [String, String, String, ...])`.

rhall9090 (Fri, 12 Apr 2019 18:47:53 GMT):
Has joined the channel.

silviu (Fri, 12 Apr 2019 19:41:41 GMT):
Has joined the channel.

silviu (Fri, 12 Apr 2019 19:41:56 GMT):
hello. Is there a possibility to add an Indy distributed ledger as MSP?

SaphiraBjartskular (Fri, 12 Apr 2019 22:06:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=EE7XrpbyRu9cJYkmJ) @davidkel let keysarray = [farmAsset.farmID, farmAsset.pID]; let compKey = stub.createCompositeKey(FARMASSETTYPE, keysarray); where farmID and pID are both strings.... i did add the .toString() method and it fixed the problem so the function does work properly, I guess what I thought were strings were objects?

davidkel (Sat, 13 Apr 2019 08:22:08 GMT):
@SaphiraBjartskular Ok, but unfortunately from your example there isn't enough info to try to recreate. But even if I pass objects in I still get a string back that looks like `[object Object][object Object][object Object]` so still cannot see how you get an object back but if you have a soln now that great.

itg1996 (Sat, 13 Apr 2019 19:07:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=q2RrgMEjefRQ6BwpL) @davidkel thank you so much

itg1996 (Mon, 15 Apr 2019 05:15:07 GMT):
hi everyone , when I am invoking chaincode from cli and passing arguement as environment variable , I am getting the following error: Error: chaincode argument error: unexpected end of JSON input I am using syntax: '{"function":"start","Args":["'$id'"]}'

ranjan008 (Mon, 15 Apr 2019 08:32:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=97axR2GWdC6Wqse9b) @muralisr yes

florianc (Mon, 15 Apr 2019 09:21:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5vAJrf4M9iNqquezt) @itg1996 I believe "Args" should be "args". Can you provide the code yo uare using?

muralisr (Mon, 15 Apr 2019 12:59:54 GMT):
@ranjan008 did this help ?

muralisr (Mon, 15 Apr 2019 12:59:55 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5XfrJuTddLTMPzbKv

muralisr (Mon, 15 Apr 2019 13:02:37 GMT):
@itg1996 @florianc perhaps the above error is due to the embedded `'` ? can you try `'{"function":"start","Args":["$id"]}'` @itg1996 ?

Rajatsharma (Mon, 15 Apr 2019 14:19:37 GMT):
Could anyone explain me what's inside the transaction proposal As I wanted to implement some logic inside this string ``` proposal_bytes:"\n\263\007\nc\010\003\032\013\010\315\357\321\345\005\020\341\273\246N\"\003db2*@b292399544e1bc456ba04c88dd359d62c6fb3f2b3a67075eb544acbaa1e996eb:\013\022\t\022\007user_cc\022\313\006\n\256\006\n\007Org1MSP\022\242\006-----BEGIN CERTIFICATE-----\nMIICIzCCAcqgAwIBAgIQIaD023AhhGeAI3CWhb5ivzAKBggqhkjOPQQDAjBvMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEXMBUGA1UEChMOb3JnMS5yYWphdC5jb20xGjAYBgNVBAMTEWNhLm9y\nZzEucmFqYXQuY29tMB4XDTE5MDQxNTA4MTIwMFoXDTI5MDQxMjA4MTIwMFowajEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xDzANBgNVBAsTBmNsaWVudDEdMBsGA1UEAwwUQWRtaW5Ab3JnMS5y\nYWphdC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR7yHk8nfLzUkMa3zma\nJbuY0ITU3UgVJGoBe1jJ5GmLOnROzF3EiHzmGyiEFLC35RUSaMQIa0VRkvuSK94Z\nCQ/Xo00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAi\ngCDDDLIQnIDxgsr7SVmS3MwfZcJ4ja03/pIPbahPoIyjdzAKBggqhkjOPQQDAgNH\nADBEAiBYG9DHLC9Fn90gSj0u9pjzUetxshBHJgfk38nP0mszoAIgbBAvtLVFAAKM\n+dWDwapz4U2cBmZHhlQBhPXR1NgkXLU=\n-----END CERTIFICATE-----\n\022\030!W\261\326\273\277\301\201\205\252-d\266\327\306]\225n\021\257?\365\201{\022 \n\036\n\034\010\001\022\t\022\007user_cc\032\r\n\tprintStub\n\000" signature:"0E\002!\000\370g\273\372\021H9\312\307=\351A\003\327\376\013N\261g\247c\013\226\253\262\017O&\004Q\030D\002 J\2162m2\271\263\275\002#\"\013\344\214`\351\310\032s:RMW\253\372\005s\347\274\227\036P" ``` As you could see in this transaction proposal channel name is `db2` and it's written as `db2*`. So does fabric always append `*` to the channel's name in the proposal.

Rajatsharma (Mon, 15 Apr 2019 14:19:37 GMT):
Could anyone explain me what's inside the transaction proposal As I wanted to implement some logic inside this string ``` proposal_bytes:"\n\263\007\nc\010\003\032\013\010\2eq315\357\321\345\005\020\wer341\273\246N\"\003db2*@b292399544e1bc456ba04c88dd359d62c6fb3f2b3a67075eb544acbaa1e996eb:\013\022\t\022\007user_cc\022\313\006\n\256\006\n\007Org1MSP\022\242\006-----BEGIN CERTIFICATE-----\nMIICIzCCAcqgAwIBAgIQIaD023AhhGeAI3CWhb5ivzAKBggqhkjOPQQDAjBvMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEXMBUGA1UEChMOb3JnMS5yYWphdC5jb20xGjAYBgNVBAMTEWNhLm9y\nZzEucmFqYXQuY29tMB4XDTE5MDQxNTA4MTIwMFoXDTI5MDQxMjA4MTIwMFowajEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAgjdfkfndfkjnergofwekUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xDzANBgNVBAsTBmNsaWVudDEdMBsGA1UEAwwUQWRtaW5Ab3JnMS5y\nYWphdC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR7yHk8nfLzUkMa3zma\nJbuY0ITU3UgVJGoBe1jJ5GmLOnROzF3EiHzmGyiEFLC35RUSaMQIa0VRkvuSK94Z\nCQ/Xo00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAi\ngCDDDLIQnIDxgsr7SVmS3MwfZcJ4ja03/pIPbahPoIyjdzAKBggqhkjOPQQDAgNH\nADBEAiBYG9DHLC9Fn90gSj0u9pjzUetxshBHJgfk38nP0mszoAIgbBAvtLVFAAKM\n+dWDwapz4U2cBmZHhlQBhPXR1NgkXLU=\n-----END CERTIFICATE-----\n\022\030!W\261\326\273\277\301\201\205\252-d\21266\327\306]\225n\021\257?\365\201{\022 \n\036\n\034\010\001\022\t\022\007user_cc\032\r\n\tprintStub\n\000" signature:"0E\002!\000\370g\273\372\021H9\3122112\307=\351A\003\327\376\01312N\261g\247c\013\226\253\262\017O&\004Q\030D\002 J\2162m2\271\263\275\002#\"\013\344\22114`\351\310\032s:RMW\253\372\005s\347\274\227\036P" ``` As you could see in this transaction proposal channel name is `db2` and it's written as `db2*`. So does fabric always append `*` to the channel's name in the proposal.

Rajatsharma (Mon, 15 Apr 2019 14:21:50 GMT):
I wanted to know, could I safely assume that I'll always find the channel name as `[channelName]*` or are there any exceptions to this ?

muralisr (Mon, 15 Apr 2019 14:47:37 GMT):
@Rajatsharma treating the propoal as a string or byte array to look for information is error prone (to say the least). The byte array correponds to a protobuf structure. So the right approach would be to to deserialize the byte array to that protobuf struct and access any fields you like. There are many examples (could be some in samples but haven't checked). Essentially "unmarshal" in GO like this - https://github.com/hyperledger/fabric/blob/release-1.4/protos/utils/proputils.go#L193

PMoura (Mon, 15 Apr 2019 15:23:46 GMT):
Hi Guys. I'm getting an error during a query: `Error running query. Reason: (invalid_operator) Invalid operator: $class` I also can't either run it in CouchDB, using mango query feature. Is there any incompatibility for naming fields with "`$`" or with the word "`$class`"? Thank you.

JosefButts (Mon, 15 Apr 2019 15:53:49 GMT):
Has joined the channel.

PMoura (Mon, 15 Apr 2019 16:50:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=iRwC2miYEmFXvCGL9) Solved. https://docs.mongodb.com/manual/reference/limits/#naming-restrictions Restrictions on Field Names Field names can contain dots (i.e. .) and dollar signs (i.e. $). However, only nested field names may start with a dollar sign. For example, attempting to insert { "a" : { "$b": 1 } } will succeed but attempting to insert {"$a": 1} results in error.

qsmen (Tue, 16 Apr 2019 01:04:08 GMT):
hi experts here, I know system chaincodes can query ledger to get CA certificate. Now I want to use CA certificate in my application chaincode, how should I do? Thank you very much.

ranjan008 (Tue, 16 Apr 2019 04:58:40 GMT):
@muralisr I tried to implement the way it is given in sample example I am getting below error in the peer at the time of instantiating the chaincode

ranjan008 (Tue, 16 Apr 2019 04:59:12 GMT):
haincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/ext/statebased/statebasedimpl.go:14:2: cannot find package "github.com/hyperledger/fabric/common/cauthdsl" in any of: /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric/common/cauthdsl (vendor tree) /opt/go/src/github.com/hyperledger/fabric/common/cauthdsl (from $GOROOT) /chaincode/input/src/github.com/hyperledger/fabric/common/cauthdsl (from $GOPATH) /opt/gopath/src/github.com/hyperledger/fabric/common/cauthdsl

itg1996 (Tue, 16 Apr 2019 06:08:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qchgc2GgR2iCdDdBZ) @muralisr If I remove the *'* , the string passed is "$id", instead of the value of id

itg1996 (Tue, 16 Apr 2019 06:10:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5vAJrf4M9iNqquezt) this is working when the string stored in *id* doesn't have any spaces. when spaces are there , it gives error

yeousunn (Tue, 16 Apr 2019 07:13:15 GMT):
Has joined the channel.

rthatcher (Tue, 16 Apr 2019 08:29:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=KXYRrAD6dSdXmcCjQ) @qsmen If you are using the `fabric-contract-api` the `ClientIdentity` object is available to you via the stub in your chaincode and it includes the certificate. https://fabric-shim.github.io/release-1.4/fabric-shim.ClientIdentity.html

TommasoMartin (Tue, 16 Apr 2019 09:16:55 GMT):
Has joined the channel.

TommasoMartin (Tue, 16 Apr 2019 09:21:10 GMT):
Hi everyone, I'm trying to develop a solution using Java chaincode and everything works fine if I use Gradle. Now, I want to integrate it with another project where my team is using Maven for dependencies. It's easy to move from gradle to maven and everything seems to work fine, but when I try to start the network (after "mvn clean install" in the chaincode folder) I get this error: 2019-04-16 08:28:02.931 UTC [chaincode.platform.java] GenerateDockerBuild -> ERRO 03a Can't build java chaincode Error returned from build: 1 "Maven build [INFO] Scanning for projects... ... [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.640 s [INFO] Finished at: 2019-04-16T08:28:01Z [INFO] Final Memory: 22M/269M [INFO] ------------------------------------------------------------------------ cp: cannot stat 'target/chaincode.jar': No such file or directory " 2019-04-16 08:28:02.931 UTC [chaincode.platform] func1 -> ERRO 03b Failed to generate platform-specific docker build: Error returned from build: 1 "Maven build ... in the end: [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.640 s [INFO] Finished at: 2019-04-16T08:28:01Z [INFO] Final Memory: 22M/269M [INFO] ------------------------------------------------------------------------ cp: cannot stat 'target/chaincode.jar': No such file or directory " error starting container error starting container Thanks for the support!

TommasoMartin (Tue, 16 Apr 2019 12:12:05 GMT):
Solved, the problem was in the pom, it's necessary to specify: chaincode

muralisr (Tue, 16 Apr 2019 13:07:03 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vnukbXNGRvXJanBHP

muralisr (Tue, 16 Apr 2019 13:08:10 GMT):
`right, I just wanted to highlight the problem is likely associated with the embeddd '. ... can you escape the inner `'` thus ? `'{"function":"start","Args":["\'$id\'"]}'

muralisr (Tue, 16 Apr 2019 13:08:10 GMT):
right, I just wanted to highlight the problem is likely associated with the embeddd '. ... can you escape the inner `'` thus ? `'{"function":"start","Args":["\'$id\'"]}'

muralisr (Tue, 16 Apr 2019 13:08:10 GMT):
right, I just wanted to highlight the problem is likely associated with the embeddd '. ... can you escape the inner `'` thus ? `'{"function":"start","Args":["\'$id\'"]}'`

muralisr (Tue, 16 Apr 2019 13:12:05 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mCqmfksHP6yDYqaDS

Rajatsharma (Tue, 16 Apr 2019 13:12:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=SRwNDXTzirpoCoeMS) @muralisr Thanks Now It has worked !!! I had tried this as a demo but it's working perfectly fine. ``` proposal, _ := stub.GetSignedProposal() propBytes := proposal.GetProposalBytes() prop := &pb.Proposal{} proto.Unmarshal(propBytes, prop) propPayload := &pb.ChaincodeProposalPayload{} proto.Unmarshal(prop.Payload, propPayload) fmt.Println("payload", propPayload.Input) cis := &pb.ChaincodeInvocationSpec{} proto.Unmarshal(propPayload.Input, cis) fmt.Println(cis.ChaincodeSpec.ChaincodeId.Name) ```

muralisr (Tue, 16 Apr 2019 13:12:36 GMT):
ah good, glad it worked

Rajatsharma (Tue, 16 Apr 2019 13:12:46 GMT):
Yes Thanks a lot !!

muralisr (Tue, 16 Apr 2019 13:12:54 GMT):
anytime!

muralisr (Tue, 16 Apr 2019 13:14:55 GMT):
(the above is probably a quick/dirty test to check ... but you'll kikely add error check for Unmarshal ? ...while its unlikely to get an error, which would indicate something seriously wrong in the shim flow, its good to catch that than assume it'll always give you right result)

muralisr (Tue, 16 Apr 2019 13:15:43 GMT):
never mind the above pl. ... overlooked your comment ` I had tried this as a demo but it's working perfectly fine. `

SaphiraBjartskular (Tue, 16 Apr 2019 19:12:45 GMT):
can anyone point me to an example of handling the StateQueryIterator object return getstatebypartialkey? I keep getting errors trying to process the object

SaphiraBjartskular (Tue, 16 Apr 2019 19:32:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=GTrb2z9pgas6xnxcN) @davidkel let obj = {id: "foo", prop: "bar"} let keysarray = [obj.id, obj.bar]; let compKey = stub.createCompositeKey(FARMASSETTYPE, keysarray); //comp key becomes an object now

SaphiraBjartskular (Tue, 16 Apr 2019 21:17:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=q4afDZWmzdieYwJGg) Any help would be great

SaphiraBjartskular (Tue, 16 Apr 2019 21:17:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=q4afDZWmzdieYwJGg) Any help would be great, I keep getting Illegal buffer errors

qsmen (Wed, 17 Apr 2019 00:57:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DhZ6S4W6eeorPP65h) @rthatcher Thank you, Rthatcher. I read the link and find the function getX509Certificate may be the one. However, it return X509 certificate associated with the invoking identity. I do not know if the CA certificate will be returned too.

qsmen (Wed, 17 Apr 2019 00:57:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=DhZ6S4W6eeorPP65h) @rthatcher Thank you, Rthatcher. I read the link and find the function getX509Certificate may be the one. However, it return X509 certificate associated with the invoking identity. I do not know if the root CA certificate will be returned too.

florianc (Wed, 17 Apr 2019 06:44:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HumNiLfMZybbhN64k) @SaphiraBjartskular Here is one iterator I use. It is not in the same context but that might help you. Also there is a firefox documentation about that I beleive. let resultIterator = await stub.getQueryResult(query); let results = {}; var i = 0; let res = { done: false }; // The query returns an iterator. Loop while there is still a result in the queue while (!res.done) { i++; res = await resultIterator.next(); if (res && res.value && res.value.value) { let lowerValue = res.value.value.toString('utf8'); let key = res.value.key.toString('utf8'); if (lowerValue.length > 0) { let valueAsJson = JSON.parse(lowerValue); results[i - 1] = {}; results[i - 1]["key"] = key; results[i - 1]["data"] = valueAsJson; } } if (res && res.done) { try { resultIterator.close(); // Use the length property on client side to loop through the results results['length'] = i; } catch (err) { throw new Error(err); } } }

florianc (Wed, 17 Apr 2019 06:44:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=HumNiLfMZybbhN64k) @SaphiraBjartskular Here is one iterator I use. It is not in the same context but that might help you. Also there is a firefox documentation about that I beleive. ``` let resultIterator = await stub.getQueryResult(query); let results = {}; var i = 0; let res = { done: false }; // The query returns an iterator. Loop while there is still a result in the queue while (!res.done) { i++; res = await resultIterator.next(); if (res && res.value && res.value.value) { let lowerValue = res.value.value.toString('utf8'); let key = res.value.key.toString('utf8'); if (lowerValue.length > 0) { let valueAsJson = JSON.parse(lowerValue); results[i - 1] = {}; results[i - 1]["key"] = key; results[i - 1]["data"] = valueAsJson; } } if (res && res.done) { try { resultIterator.close(); // Use the length property on client side to loop through the results results['length'] = i; } catch (err) { throw new Error(err); } } } ```

SaphiraBjartskular (Wed, 17 Apr 2019 16:57:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=LNcSKKWXG2KmC284n) @florianc This is helpful, thank you

SaphiraBjartskular (Wed, 17 Apr 2019 17:09:19 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

SaphiraBjartskular (Wed, 17 Apr 2019 18:48:38 GMT):
There is no value attribute on the StateQueryIterator object according to my print statement- there is a response attr with a results array though..

diestrin (Thu, 18 Apr 2019 01:10:05 GMT):
Hey everyone, I'm trying to set up events using the nodejs sdk. The events are getting recognized properly, but they have no payload, although I can see in the chaincode container logs the event was emitted with a payload. Is there any special config on client to request the event payload?

diestrin (Thu, 18 Apr 2019 03:18:21 GMT):
So the solution was (in case someone has the same problem) passing `true` or `{full_block:true}` in the EventHub.connect method

Mayank017 (Thu, 18 Apr 2019 06:20:07 GMT):
Has joined the channel.

Mayank017 (Thu, 18 Apr 2019 06:23:35 GMT):
Hello everyone i tried to print the logs in my js smart contract but i am unable to view it . Can anyone please help me out how to achieve it

florianc (Thu, 18 Apr 2019 06:39:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Grf7m7YcAF8sTRZ9t) @Mayank017 Logs are in the chaincode or peer container (I can't remember which one though ><)

Mayank017 (Thu, 18 Apr 2019 06:41:26 GMT):
I check the logs of docker file of peer but nothing there

Mayank017 (Thu, 18 Apr 2019 06:53:10 GMT):
@florianc Can you let me know ?

florianc (Thu, 18 Apr 2019 06:53:42 GMT):
@Mayank017 Check the chaincode container logs

Mayank017 (Thu, 18 Apr 2019 06:57:22 GMT):
Thanks

Mayank017 (Thu, 18 Apr 2019 06:57:35 GMT):
@florianc Got it

florianc (Thu, 18 Apr 2019 07:01:03 GMT):
Yo uare welcome

Mayank017 (Thu, 18 Apr 2019 07:03:05 GMT):
Can I call one of my contract function inside other function of same contact , like I have two function getproductstatus and queryproduct inside the node js contract I want to call queryproduct inside of getproductstatus .Can this be done ? I tried to use

Mayank017 (Thu, 18 Apr 2019 07:03:07 GMT):
await ctx.stub.InvokeChaincode(this,"queryProduct","product_id);

Mayank017 (Thu, 18 Apr 2019 07:03:28 GMT):
But this didnt work said function doesnt exist

florianc (Thu, 18 Apr 2019 07:05:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=6QLLt3hDyTL4xzDP4) @Mayank017 I have never done this in this way. Bu I believe you can just call the function like a normal function, as it is in the same chaincode/file.

florianc (Thu, 18 Apr 2019 07:05:45 GMT):
So, something like: var result = await queryProduct(stub, args)

Mayank017 (Thu, 18 Apr 2019 07:06:40 GMT):
ok let me try I didnt use stub let me use stub keywprd threr

Mayank017 (Thu, 18 Apr 2019 07:06:40 GMT):
ok let me try I didnt use stub let me use stub keyword there

Mayank017 (Thu, 18 Apr 2019 07:09:13 GMT):
Sorry it diidnt woked

Mayank017 (Thu, 18 Apr 2019 07:09:33 GMT):
Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: ReferenceError: queryProduct is not defined"

florianc (Thu, 18 Apr 2019 07:09:39 GMT):
Can't help you much with so little information. We need to check your code.

Mayank017 (Thu, 18 Apr 2019 07:10:02 GMT):

hyperledgerecommercecode.png

Mayank017 (Thu, 18 Apr 2019 07:11:21 GMT):
ok let me share

Mayank017 (Thu, 18 Apr 2019 07:12:00 GMT):

hyperledgerEcommercecode.png

Mayank017 (Thu, 18 Apr 2019 07:12:53 GMT):

hyperledgerEcommerncecode1.png

Mayank017 (Thu, 18 Apr 2019 07:13:37 GMT):
Please have a look at the above screen shots they have code for both functions

Mayank017 (Thu, 18 Apr 2019 07:13:51 GMT):
@florianc

florianc (Thu, 18 Apr 2019 07:14:28 GMT):
You want to call queryProduct from getProductStatus rigth? @Mayank017

Mayank017 (Thu, 18 Apr 2019 07:14:43 GMT):
yes

Mayank017 (Thu, 18 Apr 2019 07:15:33 GMT):
@florianc

florianc (Thu, 18 Apr 2019 07:18:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ySrf9fzf42iTJHPNw) @Mayank017 It would be much easier for me if you share the full file. There is something I don't understand with your function prototypes

Mayank017 (Thu, 18 Apr 2019 07:19:45 GMT):
ok

Mayank017 (Thu, 18 Apr 2019 07:19:47 GMT):
let me share

Mayank017 (Thu, 18 Apr 2019 07:21:50 GMT):

my-contract.txt

Mayank017 (Thu, 18 Apr 2019 07:22:06 GMT):
@florianc please have a look at above file

florianc (Thu, 18 Apr 2019 07:24:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=QKyAPyaDssp8iqGc8) @Mayank017 This does not work? ``` async getProductStatus(ctx, product_id){ var ProdcutObtained = await queryProduct(ctx, product_id); console.info("Inside productStatus API ") console.info("status for product :",ProdcutObtained.status); return ProdcutObtained.status; } ```

florianc (Thu, 18 Apr 2019 07:24:34 GMT):
Also you use the fabric-contract-api and I am not familiar with it.

Mayank017 (Thu, 18 Apr 2019 07:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tywm3NJ5g6qY77Nv4) yes

Mayank017 (Thu, 18 Apr 2019 07:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=tywm3NJ5g6qY77Nv4) yes it diidnt worked

florianc (Thu, 18 Apr 2019 07:30:39 GMT):
What was the error?

Mayank017 (Thu, 18 Apr 2019 07:33:38 GMT):

Hyperldgerfunctioncallissue.png

Mayank017 (Thu, 18 Apr 2019 07:34:47 GMT):
@florianc

florianc (Thu, 18 Apr 2019 07:40:57 GMT):
I don't know why it says that.

Mayank017 (Thu, 18 Apr 2019 07:42:10 GMT):
its ok

Mayank017 (Thu, 18 Apr 2019 07:42:22 GMT):
no issue Thanks for help

davidkel (Thu, 18 Apr 2019 07:43:15 GMT):
@Mayank017 try ``` var ProdcutObtained = await this.queryProduct(ctx, product_id); ``` queryProduct is a method, not a function

florianc (Thu, 18 Apr 2019 07:45:13 GMT):
Wow, if this works, you would have taught me something today!

Mayank017 (Thu, 18 Apr 2019 07:52:33 GMT):
Ok let me try

Mayank017 (Thu, 18 Apr 2019 08:06:09 GMT):
@florianc did you deployed/tested the code ?

Mayank017 (Thu, 18 Apr 2019 08:06:25 GMT):
it shows me same error

Mayank017 (Thu, 18 Apr 2019 08:06:26 GMT):
Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: ReferenceError: queryProduct is not defined"

florianc (Thu, 18 Apr 2019 08:07:05 GMT):
No, I have nothing to test it on right now.

Mayank017 (Thu, 18 Apr 2019 08:08:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qaaKZ3zNqQ8u9PxWg) the above method is not working

Mayank017 (Thu, 18 Apr 2019 08:13:34 GMT):
let me try to work with API

Mayank017 (Thu, 18 Apr 2019 08:13:45 GMT):
and will check how it works

Mayank017 (Thu, 18 Apr 2019 08:13:53 GMT):
Thanks @florianc

Mayank017 (Thu, 18 Apr 2019 08:54:36 GMT):
@davidkel @florianc thanks to you all worked fine

Mayank017 (Thu, 18 Apr 2019 08:55:05 GMT):
there is a json issue which is showing error

zacpl (Thu, 18 Apr 2019 09:03:57 GMT):
Hi all - I'm trying to develop tests for a GO chaincode that uses Private Data Collections & found that they fail because mocking isn't supported for (for example) GetPrivateDataByPartialCompositeKey. Then I found this issue on jira that seems like it would sort me out: https://jira.hyperledger.org/browse/FAB-6717 But the issue was abandoned last June. Does anyone know why?

zacpl (Thu, 18 Apr 2019 09:17:14 GMT):
Just to clarify: of the mocks in the issue GetPrivateData & PutPrivateData work well - but GetPDByPartialCompositeKey fails. Wondering if anyone has had a similar issue & whether anything related was flagged during development.

JuanSuero (Thu, 18 Apr 2019 17:42:16 GMT):
i installed and joined the channel and installed chaincode but i get access denied on instantiation: ............. peer chaincode instantiate -o orderer0-example-com:7050 -C twoorgschannel -n mycc github.com/chaincode -v v0 -c '{"Args": ["a", "100"]}' 2019-04-18 17:33:52.238 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-04-18 17:33:52.246 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-04-18 17:33:52.255 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-04-18 17:33:52.255 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc Error: error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [twoorgschannel] creator org [Org1MSP]

tssandor (Thu, 18 Apr 2019 17:59:39 GMT):
Has joined the channel.

Rajatsharma (Thu, 18 Apr 2019 19:59:10 GMT):
Is there anyway I could generate documentation for my go chaincode ? Any tools or any go packages that could help me out in this ?

Rajatsharma (Thu, 18 Apr 2019 19:59:10 GMT):
Is there anyway I could generate documentation for my go system chaincode ? Any tools or any go packages that could help me out in this ?

WagnerCruz (Thu, 18 Apr 2019 20:12:33 GMT):
Has joined the channel.

PaulA (Fri, 19 Apr 2019 05:44:17 GMT):
Has joined the channel.

Rajatsharma (Fri, 19 Apr 2019 07:24:01 GMT):
godoc is not working for me.

Rajatsharma (Fri, 19 Apr 2019 08:13:44 GMT):
as package contains main() function

adityasingh177 (Sat, 20 Apr 2019 14:00:37 GMT):
Has joined the channel.

qsmen (Tue, 23 Apr 2019 02:40:28 GMT):
hi experts here, in developing application chaincode, is it possible to import fabric package, like fabric/msp package? Thanks

Kelvin_Moutet (Tue, 23 Apr 2019 08:14:43 GMT):
Has joined the channel.

Kelvin_Moutet (Tue, 23 Apr 2019 08:18:49 GMT):
Hello, ``` [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable ``` We can see this warning because of this https://github.com/hyperledger/fabric/blob/eca1b14b7e3453a5d32296af79cc7bad10c7673b/peer/chaincode/chaincode.go#L89:L97 and https://github.com/hyperledger/fabric/blob/a68166c2bb70a7f70693e727bf36a3f692b6fe78/core/chaincode/chaincode_support.go#L104 Anyone have an idea to get rid off those warning for the chaincode

Kelvin_Moutet (Tue, 23 Apr 2019 08:18:49 GMT):
Hello, ``` [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable ``` We can see this warning because of this https://github.com/hyperledger/fabric/blob/eca1b14b7e3453a5d32296af79cc7bad10c7673b/peer/chaincode/chaincode.go#L89:L97 and https://github.com/hyperledger/fabric/blob/a68166c2bb70a7f70693e727bf36a3f692b6fe78/core/chaincode/chaincode_support.go#L104 Anyone have an idea to get rid off those warning for the chaincode ?

Ashish_ydv (Tue, 23 Apr 2019 15:31:43 GMT):
Hi, I'm creating a chaincode in golang where my transaction need to read a file in order to complete. But when i try to read the file i get following error message: "no such file or directory". That path is added to the docker volumes. So anybody can please help why I'm getting this error even though the path is correct or do i need to add something in yaml file. Thanks

Kelvin_Moutet (Tue, 23 Apr 2019 15:33:17 GMT):
Has left the channel.

SaphiraBjartskular (Tue, 23 Apr 2019 15:35:11 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

SaphiraBjartskular (Tue, 23 Apr 2019 15:46:22 GMT):
https://stackoverflow.com/questions/55814941/chaincode-querying-chaincode-on-separate-channels

muellerdberlin (Wed, 24 Apr 2019 08:53:30 GMT):
Has joined the channel.

anjalinaik (Wed, 24 Apr 2019 09:24:01 GMT):
Hi Team, can anyone please help me understand how to test the golang chaincode file with sample examples

anjalinaik (Wed, 24 Apr 2019 09:24:55 GMT):
test

rohitkhatri (Wed, 24 Apr 2019 10:53:31 GMT):
Hey everyone, Is there a way to access transaction name while fetching history of particular key using `GetHisotryForKey`, It returns the payload but doesn't return `func` name.

rohitkhatri (Wed, 24 Apr 2019 10:53:31 GMT):
Hey everyone, Is there a way to access transaction name while fetching history of particular key using `GetHistoryForKey`, It returns the payload but doesn't return `func` name.

mahoney1 (Wed, 24 Apr 2019 12:21:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AnbeB32Sjis4wRQKj) @rohitkhatri tried using `getFunctionAndParameters()` ? https://fabric-shim.github.io/master/tutorial-using-chaincodeinterface.html and https://fabric-shim.github.io/master/fabric-shim.ChaincodeStub.html#getFunctionAndParameters__anchor

rohitkhatri (Wed, 24 Apr 2019 13:16:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eDPrcQY6M3QAJZLCR) @mahoney1 Thanks for your reply, but I'm not looking for current transaction, I want to get the `func` and `payload` for every item that is retrieved from `GetHistoryForKey`, but It only returns the state versions. What I'm trying to achieve is, I want to get the transaction history for a particular asset (`state`), hope this makes it a bit more clear.

rohitkhatri (Wed, 24 Apr 2019 13:16:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=eDPrcQY6M3QAJZLCR) @mahoney1 Thanks for your reply, but I'm not looking for current transaction, I want to get the `func` and `payload` for every item that is retrieved from `GetHistoryForKey`, but It only returns the state versions. What I'm trying to achieve is, I want to get the transaction history for a particular asset ( `state` ), hope this makes it a bit more clear.

Rajatsharma (Thu, 25 Apr 2019 09:41:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=AttLtG9ZCFb4W4pNY) @rohitkhatri These are the functions available https://godoc.org/github.com/hyperledger/fabric/protos/ledger/queryresult#KeyModification with `GetHistoryForKey`. So you can fetch the transactionID and that key's value for that transaction. And history associated to that key.

Rajatsharma (Thu, 25 Apr 2019 09:50:11 GMT):
Is there anyway we could get a iterator from current value instead of starting value while using `GetHistoryForKey`. Because for my use case I just want the value just before the current value but even for that I'll need to run a lot of iterations. That does not seem okay to me, normal logic-wise. Maybe I'm not aware about golang. Could anyone help me out.

Rajatsharma (Thu, 25 Apr 2019 09:52:28 GMT):
The thing is I'm writing a function to revert a key to it's previous version like a rollback. But using this function I have to run a lot of iterations which are of no use. moreover the number of iterations will increase as the writes on that key will increase. So this does not seem a feasible solution.

Rajatsharma (Thu, 25 Apr 2019 09:52:40 GMT):
Could anyone help me out with this.

sgaddam (Thu, 25 Apr 2019 11:30:52 GMT):
Has joined the channel.

sgaddam (Thu, 25 Apr 2019 11:32:55 GMT):
@muralisr can you please help me on the Private Data Reconciliation?

sgaddam (Thu, 25 Apr 2019 11:49:24 GMT):
Hi, *I am able to fetch the Private data in the initial setup 2Orgs 2 peers. However in the newly added peer i am unable to fetch the reconciled private data.* I will eloborate my work in Private Data Reconciliation. Please suggest me if i am doing wrong in my process. I have a blockchain network with 2 Orgs each with 2 Peers along with 1 Orderer. I have a channel for 2 Orgs. I tried like below.. - Initially the Org1Peer0 and Org2Peer0 have joined the Channel. After that, installed, instantiated, Invoked and Queried Private Data. Its working fine. - Later, the new peer Org1Peer1 joined to the channel. And also configured with the below options in the .bashrc file for Org1Peer0. But not added the below options in Peer0's of 2 Orgs. - export CORE_PEER_GOSSIP_PVTDATA_RECONCILIATIONENABLED=true - export CORE_PEER_GOSSIP_PVTDATA_RECONCILESLEEPINTERVAL=1m - After that i tried to query the reconciled private data. But i end up with errors. - To make simplify the process, i take only 1 Org with 2 peers to test the Privated Data Reconciliation. - I stopped Org1 Peer1 but Org1 Peer0 is already in running mode. I added the Reconciliation options in both the peers in a .bashrc file. - I installed new chaincode in Org1Peer0 and then instantiated, invoked couple of private data and then queryied the data. The private data is returning properly. - Now i started Org1Peer1 and installed the new chaincode in this node. Then i tried querying the reconciled data. But i end up with the same errors provided you earlier. Below is the collection config which i used for the 1 Org scenario. [ { "name": "collectionPurchaseOrders", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true }, { "name": "collectionPrivatePurchaseOrders", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":0, "memberOnlyRead": true } ] Can you please suggest me if i have anything wrong in the above steps or configurations?

sgaddam (Thu, 25 Apr 2019 11:49:47 GMT):
No Errors in Org1Peer0 while invoking. But, below is the error in Org1Peer1 while invoking the Private Data in Org1Peer0. Error in Org1Peer1 while Invoking in Org1Peer0 --------------------------------------------- 2019-04-25 09:55:38.088 UTC [gossip.privdata] reconcile -> ERRO 191f reconciliation error when trying to fetch missing items from different peers: Empty membership 2019-04-25 09:55:38.088 UTC [gossip.privdata] run -> ERRO 1920 Failed to reconcile missing private info, error: Empty membership 2019-04-25 09:55:38.536 UTC [gossip.privdata] fetchPrivateData -> WARN 1921 Do not know any peer in the channel( channeltest2 ) that matches the policies , aborting 2019-04-25 09:55:38.536 UTC [gossip.privdata] fetchFromPeers -> WARN 1922 Failed fetching private data for block 24 from peers: Empty membership 2019-04-25 09:55:39.537 UTC [gossip.privdata] fetchPrivateData -> WARN 1923 Do not know any peer in the channel( channeltest2 ) that matches the policies , aborting 2019-04-25 09:55:39.537 UTC [gossip.privdata] fetchFromPeers -> WARN 1924 Failed fetching private data for block 24 from peers: Empty membership 2019-04-25 09:55:40.537 UTC [gossip.privdata] StoreBlock -> WARN 1925 [channeltest2] Could not fetch all missing collection private write sets from remote peers. Will commit block [24] with missing private write sets:[txID: 03ece15b2ef5dcaa952cdf663a60292426e82aa838a0304d73b6cd1659711fb1, seq: 0, namespace: xyzchaincode, collection: collectionPrivatePurchaseOrders, hash: 34f6ade8fa9fa825797941777f170262a95bfaf217572660a2434677b31b97f8 txID: 03ece15b2ef5dcaa952cdf663a60292426e82aa838a0304d73b6cd1659711fb1, seq: 0, namespace: xyzchaincode, collection: collectionPurchaseOrders, hash: 50fe70b55805b8281669b7ddd9aa8ac78c02a42b6693cc2a96f0f601613253de ] 2019-04-25 09:55:40.553 UTC [kvledger] CommitWithPvtData -> INFO 1926 [channeltest2] Committed block [24] with 1 transaction(s) in 15ms (state_validation=0ms block_commit=9ms state_commit=3ms) Error in Org1Peer1 while querying in the same peer: ----------------------------------------------------- 2019-04-25 09:59:02.150 UTC [endorser] callChaincode -> INFO 1933 [channeltest2][651413f6] Entry chaincode: name:"xyzchaincode" 2019-04-25 09:59:02.152 UTC [chaincode] HandleTransaction -> ERRO 1934 [651413f6] Failed to handle GET_STATE. error: private data matching public hash version is not available. Public hash version = &version.Height{BlockNum:0x18, TxNum:0x0}, Private data version = (*version.Height)(nil) github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleGetState /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:640 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleGetState-fm /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:214 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:272 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 GET_STATE failed: transaction ID: 651413f6371f594722a6c0b8ee46793e9232b32acac463939b356896d3211624 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:276 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 2019-04-25 09:59:02.152 UTC [endorser] callChaincode -> INFO 1935 [channeltest2][651413f6] Exit chaincode: name:"xyzchaincode" (2ms) 2019-04-25 09:59:02.152 UTC [endorser] ProcessProposal -> ERRO 1936 [channeltest2][651413f6] simulateProposal() resulted in chaincode name:"xyzchaincode" response status 500 for txid: 651413f6371f594722a6c0b8ee46793e9232b32acac463939b356896d3211624 Please help me in this. Thank you.

muralisr (Thu, 25 Apr 2019 11:55:08 GMT):
@sgaddam tagging @dave.enyeart for help

akshay.lawange (Thu, 25 Apr 2019 12:25:09 GMT):
Hi, a quick question For chaincode event payloads, do we have any size limit for payloads we are sending through events? And if there is, where can we increase the size limit? Thanks.

akshay.lawange (Thu, 25 Apr 2019 12:26:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Y6ewBzThYDSTQ4APQ) @muralisr Thanks. it worked.

akshay.lawange (Thu, 25 Apr 2019 12:27:29 GMT):
Hi, quick question - For chaincode event payloads, do we have any size limit for payloads we are sending through events? And if there is, where can we increase the size limit? Thanks.

muralisr (Thu, 25 Apr 2019 12:30:13 GMT):
@akshay.lawange no limit other than upper limits on grpc payload sizes https://github.com/hyperledger/fabric/blob/release-1.4/core/comm/config.go#L22

akshay.lawange (Thu, 25 Apr 2019 12:33:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Ma9ac4q4uBJrhB3KZ) @muralisr ok..but we are facing an problem for sending say 1000 json payload through chaincode events to API

muralisr (Thu, 25 Apr 2019 12:39:48 GMT):
1k bytes ?

akshay.lawange (Thu, 25 Apr 2019 12:45:55 GMT):
132 kB

muralisr (Thu, 25 Apr 2019 15:06:08 GMT):
@akshay.lawange size should not be an issue there...

akshay.lawange (Thu, 25 Apr 2019 15:09:25 GMT):
okay thanks sir. Let me check the code again.

Fias (Fri, 26 Apr 2019 06:48:07 GMT):
Has joined the channel.

qsmen (Fri, 26 Apr 2019 08:38:59 GMT):
hi experts, I import fabric/msp in my application chaincode in order to use the function func (id *identity) Validate(). However, there are the following error when instantiating. How to solve it? Thank you.

qsmen (Fri, 26 Apr 2019 09:28:00 GMT):
hi experts here, in order to use identity.Validate function in application chaincode, I import fabric/msp/mgmt in application chaincode. The install is ok. in the instantiate, the following errors are reported:

qsmen (Fri, 26 Apr 2019 09:28:49 GMT):
root@9d8242d63afa:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n myccc -v 1.0 -c '{"Args":["init"]}' 2019-04-26 08:47:40.652 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2019-04-26 08:47:40.652 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2019-04-26 08:47:40.653 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-04-26 08:47:40.653 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2019-04-26 08:47:40.653 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled 2019-04-26 08:47:40.654 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AAB070A6708031A0C08AC8B8BE60510...69740A000A04657363630A0476736363 2019-04-26 08:47:40.654 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: B3C4160D3904F112AAF5470BAAB3F32AFD34C18A675C2786DF38210414E9B652 Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:21:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go:31:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/msp/idemixmsp.go:17:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/msp/idemixmsp.go:18:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:30:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:31:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:32:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/bccsp/pkcs11/conf.go:25:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:34:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/common/flogging/grpclogger.go:21:2: use of vendored package not allowed opt/gopath/src/github.com/hyperledger/fabric/msp/configbuilder.go:21:2: use of vendored package not allowed

qsmen (Fri, 26 Apr 2019 09:29:21 GMT):
how to solve this? thank you

gauravgiri (Fri, 26 Apr 2019 09:48:40 GMT):
On a windows machine, with Docker for Windows and Docker server/daemon setup as linux containers, get the following issue while installing a Node.js chain-code on Peer, while the GoLang chaincode installed and instantiated without any issue: Any pointers for the same? $ docker exec cli peer chaincode install -n example_chaincode02 -v 0 -p /opt/gopath/src/github.com/chaincode_example02/node -l node 2019-04-26 05:59:53.751 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-04-26 05:59:53.751 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xed634b] goroutine 1 [running]: github.com/hyperledger/fabric/core/container/util.WriteFolderToTarPackage.func1(0x7ffe0d931d66, 0x47, 0x0, 0x0, 0x18d62e0, 0xc000217fb0, 0x60, 0x16ed2c0) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:64 +0xcb path/filepath.Walk(0x7ffe0d931d66, 0x47, 0xc0001cf440, 0x0, 0x1) /opt/go/src/path/filepath/path.go:402 +0x6a github.com/hyperledger/fabric/core/container/util.WriteFolderToTarPackage(0xc0001c2a80, 0x7ffe0d931d66, 0x47, 0xc00049b920, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:136 +0x24a github.com/hyperledger/fabric/core/chaincode/platforms/node.(*Platform).GetDeploymentPayload(0x24c7b80, 0x7ffe0d931d66, 0x47, 0x4, 0xc0000e1738, 0x1774f01, 0x4, 0xc00049b9c0)

sgaddam (Fri, 26 Apr 2019 10:32:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) @qsmen Run the below commands in the place where the chaincode resides. Then try re-install the chaincode and instantiate govendor init govendor add +external

armandolf (Sat, 27 Apr 2019 00:12:42 GMT):
Has joined the channel.

armandolf (Sat, 27 Apr 2019 00:21:46 GMT):
Hi, quick question. I have a network with 4 organizations (A, B, C and D) each one of them own one peer connected to the same channel CH1. A transaction normally involves two organizations, my question is: Given my network architecture is there a way to only distribute a transaction to the participant peer nodes? Say for example B creates a transaction involving B and C so the transaction should only be distributed to peerB and peerC, peerA and peerD shouldn't have a copy of that transaction in their ledgers. Is there a way to do this without creating a second channel CH2 and joining peerB and peerC to it? I don't want to do this because it would become a mess creating and managing multiple channels for each organization combination (AB, AC, AD, BC, BD) and so on each time a new organization joins the network. Thanks!

walmon (Sat, 27 Apr 2019 00:58:44 GMT):
You could use channels @armandolf or you could use private data that is created specifically for that need! Here's an example: https://hackernoon.com/understanding-blockchain-private-data-a-hands-on-example-eacc3efe4ad6

pdintchev (Sat, 27 Apr 2019 17:38:51 GMT):
Has joined the channel.

qsmen (Sun, 28 Apr 2019 03:40:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=nXSygTtQjSYnztofM) @sgaddam Thank you very much, That works.

sejalpawar (Sun, 28 Apr 2019 14:23:12 GMT):
Has joined the channel.

sejalpawar (Sun, 28 Apr 2019 14:25:51 GMT):
Chaincode dev containers startup during instantiation and show UP status but show exited status after peer chaincode invoke

sejalpawar (Sun, 28 Apr 2019 14:26:02 GMT):
Log for peer0.org1.example.com:

sejalpawar (Sun, 28 Apr 2019 14:26:18 GMT):
2019-04-28 14:23:59.398 UTC [chaincode] ProcessStream -> ERRO 16a 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:427 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).HandleChaincodeStream /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:190 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Register /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:195 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:1124 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:1212 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 2019-04-28 14:24:29.352 UTC [endorser] callChaincode -> INFO 16b [mychannel][e1386dac] Exit chaincode: name:"mycc" (30000ms)

sejalpawar (Sun, 28 Apr 2019 14:26:48 GMT):
Log for dev-peer0.org1.example.com-mycc-1.0

sejalpawar (Sun, 28 Apr 2019 14:27:04 GMT):
Successfully init chaincode Start Invoke Invoked by: %s Org1MSP Stop Invoke panic: runtime error: index out of range panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x956d46] goroutine 27 [running]: github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).triggerNextState(0xc00048a420, 0x0, 0xc0004548a0) /chaincode/input/src/github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:35 +0x26 github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1.1(0xc00048a420, 0xc000479eb0, 0xc0004548a0) /chaincode/input/src/github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:247 +0x42 panic(0xaf1ec0, 0x133ec80) /opt/go/src/runtime/panic.go:513 +0x1b9 main.(*TransactionMap).Invoke(0x13b0440, 0xc72680, 0xc00044c210, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /chaincode/input/src/github.com/chaincode/src/exchg/bank.go:132 +0x1f4a github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc00048a420, 0xc0004548a0, 0xc000018300) /chaincode/input/src/github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:273 +0x4eb created by github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction /chaincode/input/src/github.com/chaincode/src/exchg/vendor/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:242 +0x53

gauravgiri (Mon, 29 Apr 2019 05:19:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Bfyfkmmo5iGrB4RSK) All, any pointers will be appreciated for the issue of peer chaincode install, for error: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xed634b] ?

RahulHundet (Mon, 29 Apr 2019 05:57:20 GMT):
Has joined the channel.

Aniket.1 (Mon, 29 Apr 2019 07:16:01 GMT):
Can anyone here provide some precious views on this : https://stackoverflow.com/questions/55898105/approach-to-pass-key-for-crypto-operations-on-chaincode-interaction

florianc (Mon, 29 Apr 2019 07:18:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=jyTXucG5875rqwStQ) @Aniket.1 Hi. Wouldn't it be better to sumbit this on the jira so that devs can give their opinion?

Aniket.1 (Mon, 29 Apr 2019 07:19:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=somqFShy5g5Y5SqWs) @florianc I thought about that but was not sure.

florianc (Mon, 29 Apr 2019 07:20:32 GMT):
Not sure either. But If it is no the place, they'll just close the ticket and we'll now for sure ^^

Aniket.1 (Mon, 29 Apr 2019 07:21:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ntqR6WrSaM7eAEYwb) @florianc seems reasonable :wink:

Aniket.1 (Mon, 29 Apr 2019 07:28:08 GMT):
done https://jira.hyperledger.org/browse/FABN-1218 @florianc

muralisr (Mon, 29 Apr 2019 13:03:42 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=3h5SmFxHYkPKLXxhq

muralisr (Mon, 29 Apr 2019 13:06:33 GMT):
Can you check the full stack to inspect the chaincode stack (the exception might be from that stack)

Fernando_Diaz_Luque (Wed, 01 May 2019 14:34:11 GMT):
Has joined the channel.

mahoney1 (Thu, 02 May 2019 11:33:59 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%3A+Community+Call - be great to hear from you later ! :-) regards Paul

SaphiraBjartskular (Thu, 02 May 2019 16:47:49 GMT):
At what point does the size of the composite key become an issue

jlau (Fri, 03 May 2019 01:05:30 GMT):
Has joined the channel.

Sreesha (Fri, 03 May 2019 06:46:34 GMT):
Has joined the channel.

Sreesha (Fri, 03 May 2019 06:47:33 GMT):
How to add key level endorsement in chaincode.Which key should be used, will it be the world state object name

Jayshree_Devan (Fri, 03 May 2019 08:53:17 GMT):
Has joined the channel.

mahoney1 (Fri, 03 May 2019 09:09:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ig9tKWcCuNgDyQps9) @Sreesha its using the key (State based endorsement just means that the endorsement policy can be specified explicitly for each key, and then to update the key or to change its endorsement policy you need to satisfy the endorsement policy) - there is an example (in Go) and description (README), in fabric samples https://github.com/hyperledger/fabric-samples/tree/release-1.4/interest_rate_swaps

miguelreisa (Fri, 03 May 2019 09:42:51 GMT):
Has joined the channel.

miguelreisa (Fri, 03 May 2019 09:43:38 GMT):
Hello, is it possible in a chaincode function to sign something (e.g. variable, certificate) using the endorser key pair?

Sreesha (Fri, 03 May 2019 11:22:26 GMT):
@mahoney1 thankyou very much

RahulHundet (Fri, 03 May 2019 13:02:38 GMT):
I am facing "chaincode registration failed" error while instantiating chaincode, this is in version 1.4.1, any suggestions?

DwayneAckers (Sat, 04 May 2019 12:23:17 GMT):
Has joined the channel.

DwayneAckers (Sat, 04 May 2019 12:25:17 GMT):
@RahulHundet I am facing the same - is anyone able to advise how to debug this further? i can't work out what the issue is from the peer and journalctl logs

DwayneAckers (Sat, 04 May 2019 14:44:28 GMT):
I reverted to 1.4.0 and the issue went away

davidkel (Sat, 04 May 2019 17:16:49 GMT):
@DwayneAckers Could you provide more detail about what chaincode you were trying to run ? It would help to understand if there was some sort of breaking change introduced

albert.lacambra (Sat, 04 May 2019 20:24:33 GMT):
i am getting the following error while running "peer lifecycle chaincode approveformyorg --channelID mychannel --name pc_0 --version 0.0.3 --package-id $CC_PACKAGE_ID --sequence 1 --waitForEvent" "Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': could not set defaults for chaincode definition in channel mychannel: Policy '/Channel/Application/Endorsement' must be defined for channel 'mychannel' before chaincode operations can be attempted" not sure what it exactly means with "backing implementation"

albert.lacambra (Sat, 04 May 2019 20:24:36 GMT):
some hint?

muralisr (Sat, 04 May 2019 20:51:09 GMT):
@albert.lacambra I think this refers to the change in configtx.yaml to have an endorsement policy...

muralisr (Sat, 04 May 2019 20:51:16 GMT):
hang on let me get the relevant lines

muralisr (Sat, 04 May 2019 20:52:17 GMT):
https://github.com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml#L233

muralisr (Sat, 04 May 2019 20:54:18 GMT):
I assume you have moved to latest (or alpha) 2.0. If so you'd need to use the latest configtx.yaml (in particular to the changes to channel configuration with respect to lifecycle)

albert.lacambra (Sat, 04 May 2019 20:54:31 GMT):
exactly what I was looking for :) Thanks @muralisr

muralisr (Sat, 04 May 2019 20:54:40 GMT):
you got it :-)

albert.lacambra (Sat, 04 May 2019 20:55:09 GMT):
yes, I am using version 2. I am trying to implement the java samplecode for the new programming model.

muralisr (Sat, 04 May 2019 20:55:16 GMT):
ok

albert.lacambra (Sat, 04 May 2019 20:56:38 GMT):

Clipboard - May 4, 2019 10:56 PM

albert.lacambra (Sat, 04 May 2019 20:56:57 GMT):
what's the difference between this two?

muralisr (Sat, 04 May 2019 20:58:24 GMT):
one has to do with endorsement needed for the "commit" phase and the other for the endorsement of the instantiation

muralisr (Sat, 04 May 2019 20:58:56 GMT):
the former was not there in the old model and the later defaulted to admin

muralisr (Sat, 04 May 2019 21:01:50 GMT):
in a sense this policy definition is core to the new LC model and the fact that we now can specifcy endorsement policy for instantiating the CC (just as we used to be able to do for invokes should give you the "aha" needed for understanding the new LC)

muralisr (Sat, 04 May 2019 21:01:50 GMT):
in a sense this policy definition is core to the new LC model and the fact that we now can specifcy endorsement policy for instantiating the CC (just as we used to be able to do for invokes) should give you the "aha" needed for understanding the new LC

albert.lacambra (Sat, 04 May 2019 21:02:30 GMT):
got it :) Thx!

albert.lacambra (Sat, 04 May 2019 21:02:44 GMT):
will rtry now

muralisr (Sat, 04 May 2019 21:02:48 GMT):
sure

muralisr (Sat, 04 May 2019 21:11:03 GMT):
about `LifecycleEndorsement` - https://hyperledger-fabric.readthedocs.io/en/master/chaincode4noah.html?highlight=LifecycleEndorsement#step-four-commit-the-chaincode-definition-to-the-channel

chifalcon (Sun, 05 May 2019 02:45:31 GMT):
Has joined the channel.

chifalcon (Sun, 05 May 2019 02:46:03 GMT):
Hi friends, I am thinking about calling an executable binary from my chaincode. I have searched widely and only found several similar discussions. But it seems fabric officially does not support the integration of pre-compiled executable in chaincode. Can you please providing some hints what I can do? The purpose is to protect the property right of a part of the chaincode. Thanks!

qsmen (Sun, 05 May 2019 02:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) continuing this topic. after the successful instantiation, the application chaincode including the following code runs timeout

qsmen (Sun, 05 May 2019 02:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) continuing this topic. after the successful instantiation, the application chaincode including the following code runs timeoutchannelID := stub.GetChannelID() creatorByte, _ := stub.GetCreator() mspObj := mspmgmt.GetIdentityDeserializer(channelID) creator, err := mspObj.DeserializeIdentity(creatorByte) err = creator.Validate() return shim.Error("[error] return:" + err.Error())

qsmen (Sun, 05 May 2019 02:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) continuing this topic. after the successful instantiation, the application chaincode including the following code runs timeoutchannelID := stub.GetChannelID() creatorByte, _ := stub.GetCreator() mspObj := mspmgmt.GetIdentityDeserializer(channelID) creator, err := mspObj.DeserializeIdentity(creatorByte) err = creator.Validate() return shim.Error("[error] return:" + err.Error())

qsmen (Sun, 05 May 2019 02:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) continuing this topic. after the successful instantiation, the application chaincode including the following code runs timeout\nchannelID := stub.GetChannelID() creatorByte, _ := stub.GetCreator() mspObj := mspmgmt.GetIdentityDeserializer(channelID) creator, err := mspObj.DeserializeIdentity(creatorByte) err = creator.Validate() return shim.Error("[error] return:" + err.Error())

qsmen (Sun, 05 May 2019 02:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=qjtgYQuzh4L7PkYsT) continuing this topic. after the successful instantiation, the application chaincode including the following code runs timeout: channelID := stub.GetChannelID() creatorByte, _ := stub.GetCreator() mspObj := mspmgmt.GetIdentityDeserializer(channelID) creator, err := mspObj.DeserializeIdentity(creatorByte) err = creator.Validate() return shim.Error("[error] return:" + err.Error())

qsmen (Sun, 05 May 2019 02:58:44 GMT):
channelID := stub.GetChannelID() creatorByte, _ := stub.GetCreator() mspObj := mspmgmt.GetIdentityDeserializer(channelID) creator, err := mspObj.DeserializeIdentity(creatorByte) err = creator.Validate() return shim.Error("[error] return:" + err.Error())

qsmen (Sun, 05 May 2019 03:04:37 GMT):
How to sovle this. Thank you.

qsmen (Sun, 05 May 2019 08:48:35 GMT):
it seems the mspOjb is not properly valued. However, the function mspmgmt.GetIDentityDeserializer(channelID) should be called this way.

Smithereens (Sun, 05 May 2019 09:14:09 GMT):
Has joined the channel.

qsmen (Sun, 05 May 2019 09:18:04 GMT):
the package is already imported and the parameter channelID is right.

qsmen (Sun, 05 May 2019 09:18:04 GMT):
the package mgmt is already imported and the parameter channelID is right.

Smithereens (Sun, 05 May 2019 09:31:05 GMT):
Hi,friends ! Do you know how to validate the client's certificate in my chaincode?

Smithereens (Sun, 05 May 2019 09:33:29 GMT):
Hi,friends! Do you know how to validate the client's certificates in my chaincode? Thank you for your answer!

muralisr (Sun, 05 May 2019 14:42:48 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=mvnTeoqDi2kioSei5

muralisr (Sun, 05 May 2019 14:44:49 GMT):
@chifalcon system chaincode plugins may be what you are looking for - https://hyperledger-fabric.readthedocs.io/en/release-1.4/systemchaincode.html

muralisr (Sun, 05 May 2019 14:45:12 GMT):
https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=vGvBPYeoBRyxhCeoR

muralisr (Sun, 05 May 2019 14:51:59 GMT):
@Smithereens `client certificate` needs to be qualified. If that;s an application level identity that's passed to chaincode via arguments then upto you to validate. I assume though you are referring to the the identity associated with the proposal sender. This context is available in each proposal call (Invoke) in the chaincode. golang chaincode provides a library to help with this. See `Chaincode access control` in https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html

Rajatsharma (Sun, 05 May 2019 20:38:42 GMT):
Could anyone explain what do we mean when we say that we register a user and enroll a user, in terms of fabric. I get the point that at registration the user is registered at Fabric-CA and we get the secret in return. And when we enroll we use that secret to process the request and we get the certificate in return. The thing is I wanted to get a bit more clear on this, because I'm getting a lots of questions. When are the certificates actually generated, and when we essentially follow up registration with enrollment, why are these 2 steps separate. So please if anyone could explain this to me a bit more, or help me gain clarity in this.

Rajatsharma (Sun, 05 May 2019 20:46:55 GMT):
The thing is I'm appending certain attributes with the user while registration, which I need when using the chaincode. But even after the user is registered and enrolled I want to add certain attributes, which I'll again use in my chaincode. I'm not able to do that as even when I use: ``` const caClient = fabricClient.getCertificateAuthority(); const identityService = await caClient.newIdentityService(); const identityService = await caClient.newIdentityService(); const adminUser = await fabricClient.getUserContext('admin', true); const reqObject = {attrs: [{"name": "Key", "value": userAttributes}]}; identityService.update(username, reqObject, adminUser); ``` The attributes get appended in the Fabric CA when I go and list them in that server. But when I use that user to call the chaincode these attributes don't appear. Probably there's some issue with the context. So if anyone could help me anywhere. Thanks !

muralisr (Sun, 05 May 2019 23:57:48 GMT):
@Rajatsharma the "client" side of fabric-ca docs expains client-side (the node SDK will have apis mapping to those) terms ... https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#fabric-ca-client

ahmad-raza (Mon, 06 May 2019 06:08:54 GMT):
Has joined the channel.

hengfun (Mon, 06 May 2019 13:39:51 GMT):
Has joined the channel.

qsmen (Tue, 07 May 2019 01:30:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=5zzAzXWSSq7fSJAGW) even mgmt is imported into chaincode, the creator.validate can't work because chaincoded can not access ledger directly and must through peers. However, the peers have no such interface to understand them. That is, it is imossible to use other api except stub api

chifalcon (Tue, 07 May 2019 03:38:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=zqxDgGRaLRzRNFAuK) @muralisr Thanks for the reply. It seems only source code can be plugined as system chaincode. I need to integrate an executable binary for hidding logics.

narayanprusty (Tue, 07 May 2019 07:44:05 GMT):
``` ```

narayanprusty (Tue, 07 May 2019 07:44:05 GMT):
``` ```

narayanprusty (Tue, 07 May 2019 07:44:46 GMT):
HI, is there any example of how to use stub.getTransient() in nodejs

narayanprusty (Tue, 07 May 2019 07:44:46 GMT):
HI, is there any example of how to use stub.getTransient() in nodejs chaincode

rthatcher (Tue, 07 May 2019 08:53:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=cnhxSgzA69Ga9TEgF) @Rajatsharma There are 2 possible problems you have: 1. After you update an identity, you need to enroll again to get the new certificate containing the new attributes. 2. You need to make sure that your attributes are included in the certificate. So in your code you need to include ecert: true e.g. `{name: "location",value: "London",ecert: true}`

AndresMartinezMelgar.itcl (Wed, 08 May 2019 07:19:41 GMT):
Hi, I'm creating my own chaincode written in GOLANG. My network is in 1.3v and I use couchdb. The problem is this: when I do an invoke of chaincode it returns a Status 200 (all correct) and it is reflected in the block (since it increases in 1 its depth) but when I make a query it tells me that the saved data does not exist

Rajatsharma (Wed, 08 May 2019 08:13:56 GMT):
Thanks !! This worked fine.

Aniket.1 (Wed, 08 May 2019 08:56:28 GMT):
How the chaincode container marked idle and resumed. As i see if there is no chaincode interaction request, chaincode container got disappeared from `docker ps`.

Rchauhan (Wed, 08 May 2019 12:17:37 GMT):
Has joined the channel.

Rchauhan (Wed, 08 May 2019 12:17:38 GMT):
Hello All, just want to understand is there any way to use hyperledger without docker ?

Shyam_Pratap_Singh (Wed, 08 May 2019 14:48:04 GMT):
Hi All, I just want to know that how ordering service verify that transaction proposal response (R,W Set )sent by client is same as proposal response sent by endorsement peer to client. Is there any possibility that client can modify R, W set in tx proposal response? It would be great to hear your view.

dave.enyeart (Wed, 08 May 2019 16:46:44 GMT):
@shyam 40 Each endorsing peer signs the proposal response. This ensures that the data was not tampered. Additionally, the proposal response must match across all N endorsing peers as specified in the endorsement policy. Note that these validations are performed by all peers at block validation/commit time (ordering service is only responsible for ordering transactions into blocks).

dave.enyeart (Wed, 08 May 2019 16:47:13 GMT):
Each endorsing peer signs the proposal response. This ensures that the data was not tampered. Additionally, the proposal response must match across all N endorsing peers as specified in the endorsement policy. Note that these validations are performed by all peers at block validation/commit time (ordering service is only responsible for ordering transactions into blocks).

SaphiraBjartskular (Wed, 08 May 2019 22:40:35 GMT):
Does anyone have an answer to this stack overflow post? https://stackoverflow.com/questions/56049949/error-invoking-chaincode-node-sdk-method-channel-sendtransactionproposal

Shyam_Pratap_Singh (Thu, 09 May 2019 06:26:43 GMT):
Thanks @dave.enyeart.

florianc (Thu, 09 May 2019 06:39:49 GMT):
Answered

chlsc (Thu, 09 May 2019 07:33:16 GMT):
Has joined the channel.

chlsc (Thu, 09 May 2019 07:33:17 GMT):
Can someone here please tell me if I can directly count using couchdb via chaincode?

florianc (Thu, 09 May 2019 08:01:38 GMT):
What do you mean count?

chlsc (Thu, 09 May 2019 08:03:41 GMT):
aggregation from queries. @florianc

chlsc (Thu, 09 May 2019 08:04:48 GMT):
count(*) instead of caching all the query result in memory and then count that

chlsc (Thu, 09 May 2019 08:25:55 GMT):
Can someone tell if aggregation/count is doable? If not, any work around is highly appreciated.

chlsc (Thu, 09 May 2019 09:17:13 GMT):
@dave.enyeart could you please have a look?

govindamble (Fri, 10 May 2019 11:11:08 GMT):
Has joined the channel.

govindamble (Fri, 10 May 2019 11:11:09 GMT):
Hi,

govindamble (Fri, 10 May 2019 11:11:09 GMT):
Hi, we have created an environment(hyperledger fabric + explorer) , during execution of fabcar code we are getting below exception. error: [FabricCAClientService.js]: Failed to enroll admin, error:%o message=Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054], stack=Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] at ClientRequest.request.on (/home/madhusudhana/Desktop/temp/Explorer/fabric-samples/fabcar/javascript/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:401:9) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:66:8) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) Failed to enroll admin user "admin": Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054] Please help me to resolve this issue.

mahoney1 (Fri, 10 May 2019 13:14:05 GMT):
@govindamble have you checked the status of your CA server (:7054 above) using `docker ps` to see if its down? Otherwise - if its up, you might want to see what IP its listening on by checking the logs using `docker logs ` etc.

tanguyracinet (Fri, 10 May 2019 15:35:59 GMT):
Hi there, I am having a mind-boggling issue with a simple fabric deployment setup. I have a fully dockerized deployment setup that does not behave in a similar fashion on different computers, which I do not understand. It works fine on one machine but fails on another. More specifically, it fails when instancing the chaincode. I could get a quick look at the logs in the half second that my dev-peer.. is up and the problem is with the chaincode itself apparently. I see that one of the js module is not loaded and is causing the entire thing to fail. I do not understand why it works on one computer and yet will not load that one specific file from the chaincode folder on another computer... Any idea whatsoever is very welcome

tanguyracinet (Fri, 10 May 2019 15:35:59 GMT):
Hi there, I am having a mind-boggling issue with a simple fabric deployment setup. I have a fully dockerized deployment setup that does not behave in a similar fashion on different computers, which I do not understand. It works fine on one machine but fails on another. More specifically, it fails when instancing the chaincode. I could get a quick look at the logs in the half-second that my `dev-peer..` is up and the problem is with the chaincode itself apparently. I see that one of the js modules is not loaded and is causing the entire thing to fail. I do not understand why it works on one computer and yet will not load that one specific file from the chaincode folder on another computer... Any idea whatsoever is very welcome

shrivastava.amit (Sat, 11 May 2019 09:35:54 GMT):
Has joined the channel.

shrivastava.amit (Sat, 11 May 2019 10:18:24 GMT):
Hi there,

shrivastava.amit (Sat, 11 May 2019 10:19:10 GMT):
Can we develop multiple chain codes and make them talk them with each other

shrivastava.amit (Sat, 11 May 2019 10:19:50 GMT):
for example if we have a chaincode which creates user and another chaincode which creates account.

shrivastava.amit (Sat, 11 May 2019 10:20:12 GMT):
I am using fabric java sdk

TharinduSandaruwan1 (Sat, 11 May 2019 10:21:24 GMT):
can someone help me with this question?https://stackoverflow.com/questions/56087988/chaincode-is-not-making-state-correctly

varunagarwal (Sat, 11 May 2019 10:31:42 GMT):
Yes channels may call chaincode in other channels in Fabric 1.4 (think this feature is from 1.3 onwards, not sure)

mastersingh24 (Sat, 11 May 2019 12:50:26 GMT):
Chaincode can call chaincode on another channel but it can only query the chaincode in the other channel

shrivastava.amit (Sat, 11 May 2019 13:03:07 GMT):
Can we do something like create an user on one chaincode and create associated account on another chaincode

shrivastava.amit (Sat, 11 May 2019 13:03:22 GMT):
but I want to invoke only one chaincode

shrivastava.amit (Sat, 11 May 2019 13:04:06 GMT):
for example AccountChainCode here

shrivastava.amit (Sat, 11 May 2019 13:07:45 GMT):
and the Accountchaincode should call the user chaincode to create the user

shrivastava.amit (Sat, 11 May 2019 13:07:46 GMT):
??

mauricio (Sun, 12 May 2019 03:53:57 GMT):
Has left the channel.

mastersingh24 (Sun, 12 May 2019 08:48:26 GMT):
Let me clarify: - on the same channel, chaincode calling chaincode can both query and invoke - across channels, chaincode can only query chaincode So in your scenario, if you are within a single channel things will work

krabradosty (Sun, 12 May 2019 09:47:41 GMT):
Hello. Can I get information (address, mspID) inside a chaincode about the peer running this chaincode?

krabradosty (Sun, 12 May 2019 09:47:41 GMT):
Hello. How can I get information (address, mspID) inside a chaincode about the peer running this chaincode?

GthmR (Sun, 12 May 2019 19:50:22 GMT):
Has joined the channel.

florianc (Mon, 13 May 2019 06:23:14 GMT):
I don't think you can. I don't know what you are trying to achieve, but if you want to make sure only certain peers can endorse transaction, you must work with endorsement policy.

Aniket.1 (Mon, 13 May 2019 06:39:10 GMT):
Is there a way to destroy/remove a chaincode on Blockchain which is no longer to use?

florianc (Mon, 13 May 2019 06:46:17 GMT):
You can manually destroy the container. Last time I asked about this, chaincode containers are not destroyed automatically.

Aniket.1 (Mon, 13 May 2019 07:22:22 GMT):
ok, they didn't get suspended too? I meam if they are running on some machine, they will be engaging the same level of resources for the lifetime until someone kill that container?

Aniket.1 (Mon, 13 May 2019 07:22:22 GMT):
ok, they didn't get suspend too? I meam if they are running on some machine, they will be engaging the same level of resources for the lifetime until someone kill that container?

florianc (Mon, 13 May 2019 07:22:57 GMT):
I don't know

Aniket.1 (Mon, 13 May 2019 07:23:26 GMT):
ohkay, thanks for your response. (y)

Aniket.1 (Mon, 13 May 2019 07:23:26 GMT):
ohkay, thanks for your response. :thumbsup:

varunagarwal (Mon, 13 May 2019 12:06:11 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

varunagarwal (Mon, 13 May 2019 12:07:05 GMT):
you can use `ClientIdentity` api to get info on the peer who signed the transaction, their x509 certificate and their mspId

varunagarwal (Mon, 13 May 2019 12:07:38 GMT):
it is part of the `fabric-client` API and can be accessed directly from it.

florianc (Mon, 13 May 2019 12:08:26 GMT):
He is asking inside the chaincode, not on the client side :S

varunagarwal (Mon, 13 May 2019 12:09:39 GMT):
yes inside the chaincode. Refer to this https://github.com/IBM/decentralized-energy-fabric-on-IBP20/blob/master/contract/lib/my-contract.js#L72-L85

varunagarwal (Mon, 13 May 2019 12:09:57 GMT):
sorry I meant fabric-shim API. Miswrote

florianc (Mon, 13 May 2019 12:10:30 GMT):
^^.

varunagarwal (Mon, 13 May 2019 12:11:40 GMT):
you can also refer to this question I just answered https://stackoverflow.com/questions/56097402/get-certificate-of-sender-by-a-transaction-id-in-hyperledger-fabric

florianc (Mon, 13 May 2019 12:12:46 GMT):
I think this is not what he is looking for. He whishes to know what is the current peer on which the chaincode is ran. Not who is the transaction sender. (unless I misunderstood)

varunagarwal (Mon, 13 May 2019 12:13:24 GMT):
ya I am a bit confused on that as well

varunagarwal (Mon, 13 May 2019 12:17:16 GMT):
@florianc Do you know about channels? I understood how to define and add them, but do all peers need to call initialize on them? Or can one peer call it and then the rest just join.

florianc (Mon, 13 May 2019 12:20:47 GMT):
If you talk about your previous question, I did not answer because I am not 100% sure, but from my understanding: When you install a chaincode on a peer and then instantiate it, all peers currently in the channel get the chaincode (well, not directly, it's a bit more complex than that, but to make it clear, lets say it like this). When you join a peer, the peer catches up with the channel state (basically, get all blocks from other peers, including configuration blocks), so you do not need (FROM MY UNDERSTANDING, I MAY BE WRONG) to init your chaincode again. (It would not make sens, as the init transaction is already somewhere in previous transactions)

varunagarwal (Mon, 13 May 2019 12:22:40 GMT):
Yes that is correct. But I am talking about when a channel is being created before adding chaincode. As per the `Channel` APIs over https://fabric-sdk-node.github.io/release-1.4/Channel.html I can't find a function called initialize(), but in https://github.com/IBM/build-blockchain-insurance-app/blob/master/web/www/blockchain/utils.js#L107 they are calling the function....

varunagarwal (Mon, 13 May 2019 12:23:14 GMT):
nvm sorry

florianc (Mon, 13 May 2019 12:24:16 GMT):
You found it?

varunagarwal (Mon, 13 May 2019 12:25:22 GMT):
Its this https://fabric-sdk-node.github.io/release-1.4/Channel.html#initialize__anchor but cant find info on whether all peers have to call it or not. In the example I posted IBM is calling it by all peers, but when I commented out the code and used only peer to call it, the app works

florianc (Mon, 13 May 2019 12:27:06 GMT):
Well, can't help you on that unfortunately, I don't know either :(

varunagarwal (Mon, 13 May 2019 12:27:38 GMT):
because for the chaincode they have used only one peer to call it, Which is as per the documentation. Well I will keep searching and testing it out.

mc (Mon, 13 May 2019 16:15:51 GMT):
hi all

mc (Mon, 13 May 2019 16:16:13 GMT):
is there a way to change the way the docker container works when installing or upgrading chaincode?

Taffies (Tue, 14 May 2019 01:59:37 GMT):
Hi! In the chaincode, is it possible to do a rich query on a key which is an array? For example, if I have `"key": [value1, value2, value3]` stored in the JSON object, is there anyway I am able to query for all the rows which has `value1` in "key"? Thank you in advance!

qsmen (Tue, 14 May 2019 07:48:43 GMT):
About obtaining org's root certificate, on jira, Fab12366 and Fab11602 suggest enabling chaincode to verify identity based on chnannel's msp last year. However, the progress is little and the tasks are not yet assigned. Could anyone give some advice on this?

HazimDikenli (Tue, 14 May 2019 09:27:00 GMT):
Hello, I have set up my hlf environment on golang with dep ensure my Gokpg.tml has the following constraint; [[constraint]] name = "github.com/hyperledger/fabric" version = "1.4.1" After dep ensure, my vendor directory is all set up but I get the following errors; vendor/github.com/hyperledger/fabric/idemix/util.go:60:11: too many arguments in call to E.ToBytes have ([]byte, bool) want ([]byte) vendor/github.com/hyperledger/fabric/idemix/util.go:66:11: too many arguments in call to E.ToBytes have ([]byte, bool) want ([]byte) Can anyone help with this?

TharinduSandaruwan1 (Tue, 14 May 2019 10:16:57 GMT):
What is wrong with this?

TharinduSandaruwan1 (Tue, 14 May 2019 10:17:04 GMT):
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; } };

TharinduSandaruwan1 (Tue, 14 May 2019 10:17:26 GMT):
It leaves me a error on invoking function

TharinduSandaruwan1 (Tue, 14 May 2019 10:17:39 GMT):
Error: Illegal value for queryvalue element of type string: object (not a string)

florianc (Tue, 14 May 2019 11:13:52 GMT):
Make sure all arguments are strings.

Rajatsharma (Wed, 15 May 2019 07:25:07 GMT):
I was trying to use `registerBlockEvent` while going through https://fabric-sdk-node.github.io/tutorial-channel-events.html. But it's not working for me. The code is not going into either of the callbacks. This might be a issue with javascript but could anyone help me out with this. I tried making some changes in the invoke.js file in fabcar but it's not running: ``` var Fabric_Client = require('fabric-client'); var path = require('path'); var util = require('util'); var os = require('os'); // var fabric_client = new Fabric_Client(); // setup the fabric network var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7081'); channel.addPeer(peer); var order = fabric_client.newOrderer('grpc://localhost:7080') channel.addOrderer(order); // var member_user = null; var store_path = path.join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; // 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); // get the enrolled user from persistence, this user will sign all requests return fabric_client.getUserContext('user_101', true); }).then((user_from_store) => { if (user_from_store && user_from_store.isEnrolled()) { console.log('Successfully loaded user_101 from persistence'); member_user = user_from_store; } else { throw new Error('Failed to get user_101.... run registerUser.js'); } // get a transaction id object based on the current user assigned to fabric client tx_id = fabric_client.newTransactionID(); console.log("Assigning transaction_id: ", tx_id._transaction_id); let event_hub = channel.newChannelEventHub(peer); return event_hub.registerBlockEvent((block) => { console.log('Successfully received the block event'); console.log("BLOCK:::::",block); return block; }, (error)=> { console.log('Failed to receive the block event ::'+error); return error; }); // console.log(block_reg); // createCar chaincode function - requires 5 args, ex: args: ['CAR12', 'Honda', 'Accord', 'Black', 'Tom'], // changeCarOwner chaincode function - requires 2 args , ex: args: ['CAR10', 'Dave'], // must send the proposal to endorsing peers }).then((data) => { console.log("Data after promise",data); // return true; }).catch((err) => { console.error('Failed to invoke successfully :: ' + err); }); ```

florianc (Wed, 15 May 2019 07:41:02 GMT):
You need this: ` event_hub.connect(true);` Pass true if you want unfiltered events, it is false by default (and then you won't get much info)

florianc (Wed, 15 May 2019 07:41:40 GMT):
And for this you should ask here #fabric-sdk-node ;)

zwartesokken (Wed, 15 May 2019 12:08:55 GMT):
Has joined the channel.

zwartesokken (Wed, 15 May 2019 12:10:12 GMT):
Hi All, is is it possible to call a function within the same chaincode? in javascript you can just do `this.otherFunction()` but for some reason I get undefined error back

mbwhite (Wed, 15 May 2019 12:15:22 GMT):
Yes you can... but check what context .. this might be undefined if you've not got a class for example..

zwartesokken (Wed, 15 May 2019 12:16:20 GMT):
I have a Chaincode class. Do you have an example. I'm not sure what you mean with context.

mbwhite (Wed, 15 May 2019 12:16:58 GMT):
Javascript context is what the `this` resolves to.

zwartesokken (Wed, 15 May 2019 12:18:51 GMT):
Ah you mean javascript context. in a 'normal es6 class' I can do this ``` class Whatever() { async func1() {} async func2(){ this.func1() } } ``` But this doesnt work with chaincode. It tells me the function is undefined

mbwhite (Wed, 15 May 2019 12:20:15 GMT):
yes; I know this works with the contract-api approach... are you using the init/invoke api?

zwartesokken (Wed, 15 May 2019 12:20:46 GMT):
yes, the init/invoke approach

mbwhite (Wed, 15 May 2019 12:21:52 GMT):
would have expected that to work really... what shim version have you got?

zwartesokken (Wed, 15 May 2019 12:22:32 GMT):
`1.4.0`

mbwhite (Wed, 15 May 2019 12:23:17 GMT):
I'd suggest doing a `util.inspect(this)` and see exactly what you get;

zwartesokken (Wed, 15 May 2019 12:43:48 GMT):
I did `console.log(util.inspect(this, { depth: null }));` and I get `undefined`, which is weird but also not unsurprising I guess. I think something else is going wrong

mbwhite (Wed, 15 May 2019 12:44:05 GMT):
indeed.

mbwhite (Wed, 15 May 2019 12:45:49 GMT):
you've got `shim.start(new Chaincode());` somewhere?

zwartesokken (Wed, 15 May 2019 12:46:55 GMT):
yes. I think i'm not passing the context or something

mbwhite (Wed, 15 May 2019 12:51:33 GMT):
not sure what's up I'm afraid without getting logs or trying to recreate..

Rajatsharma (Wed, 15 May 2019 13:03:33 GMT):
Thanks a lot !! This worked fine !! and I'll remember this from next time :p

florianc (Wed, 15 May 2019 13:54:25 GMT):
Your welcome. It's true that the documentation is not clear about that. The example does not show it.

florianc (Wed, 15 May 2019 13:54:25 GMT):
You are welcome. It's true that the documentation is not clear about that. The example does not show it.

Hezaveh (Wed, 15 May 2019 15:11:50 GMT):
Hello, I am trying to call libursa which is in rust from fabric chainode which is in go. Is anybody here tried it before?

lingzhiyu (Thu, 16 May 2019 07:38:41 GMT):
Has joined the channel.

mahoney1 (Thu, 16 May 2019 10:27: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 - be great to hear from you later ! 🙂 regards Paul

pankajcheema (Thu, 16 May 2019 13:12:44 GMT):
```Error: error sending transaction for invoke: could not send: EOF - proposal response: version:1 response: payload:"\n \342lSK \324\"\375\255\366\240\352\277\227Z\0042\366\000\357\346\333Qq8\260\333aD\275\016\204\022t\n`\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\002\022H\n\004mycc\022@\032>\n\0041234\0326{\"first_name\":\"pankaj\",\"last_name\":\"cheema\",\"roll\":23}\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: ```

pankajcheema (Thu, 16 May 2019 13:13:05 GMT):
getting this error at the time of invoke any idea . please suggest

Rajatsharma (Thu, 16 May 2019 14:38:13 GMT):
I had a running fabric network which was producing a lot of data from very long, but suddenly today I started encountering this error, in my orderer: ``` 2019-05-16 14:24:34.367 UTC [common/deliver] Handle -> WARN 100 Error reading from : rpc error: code = Canceled desc = context canceled 2019-05-16 14:24:54.380 UTC [common/deliver] deliverBlocks -> WARN 101 [channel: ] Rejecting deliver request for because of consenter error ``` The peer is giving Service unavailable. And Kafka is giving this error: ``` 019-05-16 11:21:14.990 UTC [orderer/consensus/kafka] processMessagesToBlocks -> WARN 0bd [channel: ] got right time-to-cut message (for block 25641), no pending requests though; this might indicate a bug ``` Can anyone help me out rectifying this. This is really urgent.

Rajatsharma (Thu, 16 May 2019 15:37:54 GMT):
I've tried restarting every permutation of the network, but I've still not found a workaround.

Jelle.Diet (Fri, 17 May 2019 06:26:45 GMT):
Has left the channel.

florianc (Fri, 17 May 2019 06:53:50 GMT):
Hello. I want to use dates in my chaincode but don't want to use a programmatically generated date in the chaincode (due to endorsement problems that might cause). In the signed proposal (https://fabric-shim.github.io/release-1.4/fabric-shim.SignedProposal.html), is there the date? If not, is there a way to find when the transaction has been proposed?

florianc (Fri, 17 May 2019 06:53:50 GMT):
Hello. I want to use dates in my chaincode but don't want to use a programmatically generated date in the chaincode (due to endorsement problems that might cause). In the signed proposal (https://fabric-shim.github.io/release-1.4/fabric-shim.SignedProposal.html), is there the date? If not, is there a way to find when the transaction has been proposed? (with nodejs fabric-shim)

florianc (Fri, 17 May 2019 07:07:03 GMT):
Nevermind, found a solution: getTxTimestamp() (https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getTxTimestamp__anchor)

florianc (Fri, 17 May 2019 07:41:31 GMT):
`console.log("TIMESTAMP " + stub.getTxTimestamp()); ` Returns `"TIMESTAMP .google.protobuf.Timestamp\n"` Is that normal?

sejalpawar (Fri, 17 May 2019 09:27:52 GMT):
Has left the channel.

Rchauhan (Sun, 19 May 2019 02:16:57 GMT):
hello Friends, can someone help me to track the issue- 2019-05-18T20:41:00.028Z - error: [Peer.js]: sendProposal - timed out after:60000 2019-05-18T20:41:00.038Z - error: [Peer.js]: sendProposal - timed out after:60000 [2019-05-19 02:11:00.042] [ERROR] instantiate-chaincode - instantiate proposal was bad [2019-05-19 02:11:00.053] [ERROR] instantiate-chaincode - instantiate proposal was bad [2019-05-19 02:11:00.053] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse

Rchauhan (Sun, 19 May 2019 02:17:06 GMT):
how can I resolve this

DVasin (Sun, 19 May 2019 11:18:37 GMT):
Has joined the channel.

DVasin (Sun, 19 May 2019 11:18:51 GMT):
Hi, guys. It it possible to use Java Frameworks (i.e. Spring) inside (!) Fabric 1.4 Java Chaincode? I want to use Spring State Machine to handle state transitions inside my contract, and it plays extremely well with Spring Framework for IoC and DI. Is there any examples how to integrate Spring IoC with HLF CC? Thanks in advance!

tommparekh (Sun, 19 May 2019 12:16:03 GMT):
Has joined the channel.

tommparekh (Sun, 19 May 2019 12:16:03 GMT):
Hi, I am working on a Voting app PoC on HLF 1.4. This is my first implementation. Can someone help with user registration approach? I know I could have used Composer to model the participants. But with HLF, how do I enroll candidates? Does users/participants need to be added explicitly as an entities in DB?

tommparekh (Sun, 19 May 2019 12:16:35 GMT):
also, how do I issue these users an identity to interact with the network?

muralisr (Sun, 19 May 2019 13:23:16 GMT):
@DVasin I haven't worked with Java CC recently but the goal of the chaincode model in general is to allow dev freedom at various levels...so I'd assume this is possible. In any case, I'll copy your question to #fabric-java-chaincode

muralisr (Sun, 19 May 2019 13:43:25 GMT):
@tommparekh re voting app.. basic consideration is based on the fact that fabric operates as a permissioned network with identities of the transactors (users sending proposals and transactions) known to the fabric as part of channel. If you consider a "vote" as a transaction on a channel, the user sending the tx has to be known to the network. Two main cases and everything stemming from that. (1) voters are members of the organization registered on the channel (2) voters are "outside of the organization" whose identities are not directly known to fabric and the registered orgnaization serves those external voters by acting as their proxy voter. In (1) you could use the fabric-ca to create and enroll candidates and have their identities known to fabric. In (2) the organization would manage the identities of the voters using traditional approaches outside of fabric and could pass it on as application (chaincode) level artifact to be saverd on the ledger (in this case you can also obscure the identities to preserve some degree of anonymithy but do so in a provable manner to maintain the integrity of blockchain - in this case, integrity of voting). As an aside I'd also look at fabric's idemix features and usecases and see if that offers more possibilities. Also I'd check in #fabric-crypto for guidance

muralisr (Sun, 19 May 2019 13:43:25 GMT):
@tommparekh re voting app.. basic consideration is based on the fact that fabric operates as a permissioned network with identities of the transactors (users sending proposals and transactions) known to the fabric as part of channel. If you consider a "vote" as a transaction on a channel, the user sending the tx has to be known to the network. Two main cases and everything stemming from that. (1) voters are members of the organization registered on the channel (2) voters are "outside the organization" whose identities are not directly known to fabric and the registered orgnaization serves those external voters by acting as their proxy voter. In (1) you could use the fabric-ca to create and enroll candidates and have their identities known to fabric. In (2) the organization would manage the identities of the voters using traditional approaches outside of fabric and could pass it on as application (chaincode) level artifact to be saverd on the ledger (in this case you can also obscure the identities to preserve some degree of anonymithy but do so in a provable manner to maintain the integrity of blockchain - in this case, integrity of voting). As an aside I'd also look at fabric's idemix features and usecases and see if that offers more possibilities. Also I'd check in #fabric-crypto for guidance

tommparekh (Sun, 19 May 2019 14:52:03 GMT):
@muralisr, thanks for your response. very helpful in clearing my doubt. Yes, my use case uses 2nd option ie voters are part of the org registered and have a node on a fabric network. Based on your suggestion I understood that voters can be managed by the respective orgs using their identity solution and blockchain only records 'reference identity' to ensure no duplicate voting and to trace if the voting was done by a user. With this approach, all the transaction would come from only 1 (org) user though right?

muralisr (Sun, 19 May 2019 16:21:59 GMT):
@tommparekh yes, in that approach the transaction woukld be initiated by the members of the org (the 1 user if you have configured it that way)

tommparekh (Sun, 19 May 2019 17:20:56 GMT):
@muralisr thank you.

tommparekh (Sun, 19 May 2019 23:41:45 GMT):
Suggestions on design - voting window will be usually a specific start and end date/time (say time to make it simple). Should open/close of voting window managed by blockchain layer or external application? Does HLF have any timer function to track certain events (like voter has not voted by mid of the window and hence an event can be generated)

tommparekh (Sun, 19 May 2019 23:42:40 GMT):
not sure if this (timer) question is a good fit into blockchain but just curious about ways to handle the use case

risc (Mon, 20 May 2019 01:58:55 GMT):
Has joined the channel.

florianc (Mon, 20 May 2019 08:02:26 GMT):
Hello: in nodejs shim, the function `stub.getTxTimestamp();` returns `.google.protobuf.Timestamp\n` with the "raw" result or when passed to `toString()`. Can someone explain how to get a readable information?

florianc (Mon, 20 May 2019 08:08:58 GMT):
May have found the solution here: https://gerrit.hyperledger.org/r/c/fabric-chaincode-node/+/15459/1/test/unit/stub.js

florianc (Mon, 20 May 2019 08:41:44 GMT):
Is the timestamp protobuf format already made available somewhere in the shim interface? If not, is there a source explaining how to "use it". There is no documentation about this on the nodejs shim doc.

mahoney1 (Mon, 20 May 2019 09:03:17 GMT):
@florianc - the answer here should be a useful 'explainer' concerning the protobuf format (albeit in Go) https://stackoverflow.com/questions/45412561/how-to-convert-stub-gettxtimestamp-to-type-string - the 3 lines [in this sample](https://github.com/mahoney1/animaltracking/blob/master/javascript/contract/lib/query.js#L114) can convert to a readable DateTime in Node JS if that helps

mahoney1 (Mon, 20 May 2019 09:03:17 GMT):
@florianc - the answer here should be a useful 'explainer' concerning the protobuf format (albeit in Go) https://stackoverflow.com/questions/45412561/how-to-convert-stub-gettxtimestamp-to-type-string - the 3 lines [in this sample](https://github.com/mahoney1/animaltracking/blob/master/javascript/contract/lib/query.js#L114) can convert to a readable DateTime in Node JS or [another example here](https://github.com/hyperledger/fabric-sdk-node/blob/release-1.4/fabric-client/lib/BlockDecoder.js#L1169) if that helps

florianc (Mon, 20 May 2019 09:06:09 GMT):
Thank you for the link!

florianc (Mon, 20 May 2019 09:06:09 GMT):
Thank you for the links!

florianc (Mon, 20 May 2019 09:48:39 GMT):
@mahoney1 Thank you for the links. Helped a lot. Did not understand everything but got something to work. I guess that'll make me something more to learn about :hearts:

chlsc (Mon, 20 May 2019 11:57:20 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}".

Vlad_Ivanov (Mon, 20 May 2019 12:09:09 GMT):
Has joined the channel.

Vlad_Ivanov (Mon, 20 May 2019 12:20:55 GMT):
Hello, mates! I'm running HLF network with the latest version. I have installed a chaincode to the default peer peer0.org1 and instantiated it to my channel. ``` Get instantiated chaincodes on channel mychannel: Name: mycc, Version: 1.0, Path: /opt/gopath/src/github.com/chaincode/demo/, Escc: escc, Vscc: vscc ``` I'm sure that my chaincode has a function called ```demoFunction``` without arguments, but when I tried to invoke it, the transaction returns with failure. ``` peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt -c ‘{“function”:“demoFunction”,“Args”:[]}’ ``` ``` DEBU 056 ESCC invoke result: response: Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: {\"name\":\"Error\",\"status\":400,\"message\":\"no function of name: demoFunction found\",\"stack\":\"Error: no function of name: demoFunction found\"}" ``` I will be grateful for some guidance, thanks!

Vlad_Ivanov (Mon, 20 May 2019 12:20:55 GMT):
Hello, mates! I'm running HLF network with the latest version. I have installed a chaincode to the default peer peer0.org1 and instantiated it to my channel. ``` Get instantiated chaincodes on channel mychannel: Name: mycc, Version: 1.0, Path: /opt/gopath/src/github.com/chaincode/demo/, Escc: escc, Vscc: vscc ``` I'm sure that my chaincode has a function called demoFunction without arguments, but when I tried to invoke it, the transaction returns with failure. ``` peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt -c ‘{“function”:“demoFunction”,“Args”:[]}’ ``` ``` DEBU 056 ESCC invoke result: response: Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: {\"name\":\"Error\",\"status\":400,\"message\":\"no function of name: demoFunction found\",\"stack\":\"Error: no function of name: demoFunction found\"}" ``` I will be grateful for some guidance, thanks!

Vlad_Ivanov (Mon, 20 May 2019 12:20:55 GMT):
Hello, mates! I'm running HLF network with the latest version. I have installed a chaincode to the default peer peer0.org1 and instantiated it to mychannel. ``` Get instantiated chaincodes on channel mychannel: Name: mycc, Version: 1.0, Path: /opt/gopath/src/github.com/chaincode/demo/, Escc: escc, Vscc: vscc ``` I'm sure that my chaincode has a function called demoFunction without arguments, but when I tried to invoke it, the transaction returns with failure. ``` peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt -c ‘{“function”:“demoFunction”,“Args”:[]}’ ``` ``` DEBU 056 ESCC invoke result: response: Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: {\"name\":\"Error\",\"status\":400,\"message\":\"no function of name: demoFunction found\",\"stack\":\"Error: no function of name: demoFunction found\"}" ``` I will be grateful for some guidance, thanks!

Antimttr (Mon, 20 May 2019 22:28:55 GMT):
When you're in a production environment, is it vitally important to keep all of the previous versions of your chaincode which have been used to build the current worldstate?

florianc (Tue, 21 May 2019 06:22:57 GMT):
From my understanding, now. The world state is built based on the transactions in the ledger, they contain read/write set. The chaincode is used only for endorsement purpose.

florianc (Tue, 21 May 2019 06:22:57 GMT):
From my understanding, no. The world state is built based on the transactions in the ledger, they contain read/write set. The chaincode is used only for endorsement purpose.

PyiTheinKyaw (Wed, 22 May 2019 06:19:33 GMT):
In Hyperledger Fabric Version 1.4.1 demonstrate the 'paper network' application tutorial development. In chiancode development, It use "Node.JS" language to develop chaincode. And it extends 'Contract class' (fabric-contract-api). My question is if I would like to develop chaincode with 'Golang', where can i refer 'Contract' api like 'fabric-contract-api' in node.js ? I refereed 'https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode' and it does not have 'Contract' class. In fabric document says 'Go' tutorial will be release later the sample. But I would like to know about current 'Go' api support the 'contract' or not. ?? With regards,

SashaPESIC (Wed, 22 May 2019 14:42:33 GMT):
Has joined the channel.

dan13 (Wed, 22 May 2019 17:34:38 GMT):
@PyiTheinKyaw AFAIK, not yet. Java SDK work to match Node SDK is also in-progress (https://jira.hyperledger.org/browse/FGJ-1). There should be a ticket for Go implementation in the Fabric Jira, but I could not locate one with a quick search.

chinmay213211 (Thu, 23 May 2019 07:04:02 GMT):
Has joined the channel.

mbwhite (Thu, 23 May 2019 10:15:06 GMT):
Hello; when we did the Node.js implementation, we also prototyped a golang version (https://github.com/awjh-ibm/fabric-go-developer-api). This is usable and there if you wish to try, but it is a prototype. Currently Java support is in progress. We certainly want to do golang - just a case of getting to it.

risc (Thu, 23 May 2019 13:53:55 GMT):
Hi All, anyone know if is possible (and how) a Channel / Peers REQUERIES that the chaincode Must be signed before install/instantiate ?

rthatcher (Thu, 23 May 2019 14:00:24 GMT):
There is a new Chaincode Lifecycle for Fabric 2.0 (in Alpha testing at the moment) it is described here: https://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html and here: https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html It covers how chaincodes are agreed and committed.

risc (Thu, 23 May 2019 14:02:07 GMT):
Thanks a lot.

cryptog (Thu, 23 May 2019 14:30:50 GMT):
Has joined the channel.

kn3118 (Thu, 23 May 2019 16:35:56 GMT):
Has joined the channel.

dereckluo (Thu, 23 May 2019 18:10:04 GMT):
Has joined the channel.

BhumitSheth (Thu, 23 May 2019 20:07:27 GMT):
Has joined the channel.

PyiTheinKyaw (Fri, 24 May 2019 10:58:14 GMT):
Dear team, Thanks for your supporting. Now my development will moving forward with Golang prototype api.

lucky114407 (Tue, 28 May 2019 09:08:35 GMT):
Hi all, I have set an event in Chaincode by using SetEvent() function after putstate, now is there a way to check whether the even has been created or not.

mahoney1 (Tue, 28 May 2019 09:16:37 GMT):
yes, there's an example of listening for chaincode events (see Chaincode event listener) in the docs -> https://fabric-sdk-node.github.io/tutorial-channel-events.html

Imoh (Tue, 28 May 2019 09:44:11 GMT):
Has joined the channel.

Imoh (Tue, 28 May 2019 09:44:11 GMT):
hi, I tried to invoke a chaincode from another chaincode, I'm using node. I'm getting the flowing error

Imoh (Tue, 28 May 2019 09:44:31 GMT):
``` Error: endorsement failure during invoke. response: status:500 message:"failed to execute transaction 679d8b3cd52a7e924aa8145cd39f61acb987968306e871ddc79a0354dea6feb2: error sending: timeout expired while executing transaction" ```

Imoh (Tue, 28 May 2019 09:45:16 GMT):
``` async callProgram(stub, args, thisClass) { const res = await stub.invokeChaincode('mycc', ['readProgram','0001'], 'mychannel'); return res; } ```

Imoh (Tue, 28 May 2019 09:45:34 GMT):
above is the function I invoked

Imoh (Tue, 28 May 2019 09:46:47 GMT):
I was able to directly query the 2nd chaincode, `peer chaincode query -C $CHANNEL_NAME -n mycc -c '{"Args":["readProgram","0001"]}'` and get the results.

Imoh (Tue, 28 May 2019 10:13:52 GMT):
@florianc

PyiTheinKyaw (Tue, 28 May 2019 11:01:41 GMT):
Allow me to ask some information which related with 'Private Data Collection'. While creating the 'PDCDefination.json' configuration file in 'Private Data Collection', there are a lot of valid attribute like 'name, policy, requiredPeerCount, maxPeerCount, blockToLive, memberOnlyRead' attribute. I refered 'https://hyperledger-fabric.readthedocs.io/en/release-1.4/private_data_tutorial.html#pd-read-write-private-data' In those, i confuse about 'blockToLive'. My Question is - If the time set up in 'blockToLive' is out, that private block data will be removed permentally or not. May be I misunderstanding upon this document. Please make me correct if was wrong. Best Regards, PTK

dave.enyeart (Tue, 28 May 2019 11:39:50 GMT):
Once the 'blockToLive' number of blocks have passed, the private data of a transaction will be removed from the private state database and will no long be accessible via chaincode on the peer. The hash of the private data is what is on the main blockchain, and this will remain forever as evidence that the private data existed, but it is not be possible to reconstruct the private data from the hash.

dave.enyeart (Tue, 28 May 2019 11:39:50 GMT):
Once the 'blockToLive' number of blocks have passed, the private data of a transaction will be removed from the private state database and will no long be accessible via chaincode on the peer. The hash of the private data is what is on the main blockchain, and this will remain forever as evidence that the private data existed, but it is not possible to reconstruct the private data from the hash.

nakulgr13 (Tue, 28 May 2019 12:28:11 GMT):
Has joined the channel.

nakulgr13 (Tue, 28 May 2019 12:28:16 GMT):
Hi All, How to communicate client application written in Node JS with existing Fabric network Fabric network configuration details: --> 3 organisation having indivisual peer --> Order Service --> Hyperledger explorer --> fabric-explorer-db

florianc (Tue, 28 May 2019 14:15:43 GMT):
https://fabric-sdk-node.github.io/release-1.4/index.html

florianc (Tue, 28 May 2019 14:15:43 GMT):
By using a SDK like https://fabric-sdk-node.github.io/release-1.4/index.html

sgaddam (Thu, 30 May 2019 05:51:42 GMT):
Hi Guys, I am getting the below error while installing the chaincode in the multinode network. Earlier it was working fine with the other chaincodes. Suddenly it stopped installing the chaincode and getting the below error. Your help will be greatly appreciated. Error: error getting chaincode code marblesp: error getting chaincode package bytes: Error obtaining imports: command : failed with error: "timed out after 1m0s"

donjon (Thu, 30 May 2019 09:40:50 GMT):
Has joined the channel.

javrevasandeep (Thu, 30 May 2019 12:40:49 GMT):
Has joined the channel.

javrevasandeep (Thu, 30 May 2019 12:40:50 GMT):
Hi Team, I am facing one strange issue with chaincode. I have one function in smart contract which gets asset record value from ledger based on asset key and based on the result, it create the asset record if it is not there and doesn't create the record if its already there and we have sub asset records for every asset record. The asset record data is coming from legacy systems one by one to blockchain ledger through invokation. What i found is that sometimes subsequent sub asset record is not getting stored for the asset record for which there is already at least one sub asset record for the same asset record stored on ledger in previous invokation request.

mahoney1 (Thu, 30 May 2019 15:51:33 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

Raumo0 (Thu, 30 May 2019 19:29:21 GMT):
Has joined the channel.

yuki-kon (Thu, 30 May 2019 19:57:02 GMT):
Hi experts. In the fabric-samples/commercial-paper, Chaincode uses classes “state” and “statelist” to put/get states. They generate composite keys, serialize/deserialize state, and call ChaincodeShim. These classes seem useful for many use cases because developers can focus on the business logic. I found some projects using the same classes in Github. Is there any plan to add these classes as a common library to fabric-contract-api?

Raumo0 (Thu, 30 May 2019 21:07:24 GMT):
Can someone tell me how to test identity attribute logic?

Raumo0 (Thu, 30 May 2019 21:07:24 GMT):
Can someone tell me how to test identity attribute logic? ``` const ClientIdentity = require('fabric-shim').ClientIdentity; async something(ctx, propertyId, data) { let cid = new ClientIdentity(ctx.stub); let role = cid.getAttributeValue('role'); if (role === 'myRole') { const asset = { 'data':data }; const buffer = Buffer.from(JSON.stringify(asset)); await ctx.stub.putState(propertyId, buffer); } } --------------------------------------- describe('#something', () => { it('should registrate a property', async () => { await contract.something(ctx, '1003', 'my_data'); ctx.stub.putState.should.have.been.calledOnceWithExactly('1003', Buffer.from('{"data":"my_data"}')); }); }); ctx = new TestContext(); class TestContext { constructor() { this.stub = sinon.createStubInstance(ChaincodeStub); this.clientIdentity = sinon.createStubInstance(ClientIdentity, { getAttributeValue: 'role' | 'myRole' }); } } const { ChaincodeStub, ClientIdentity } = require('fabric-shim'); ```

mahoney1 (Fri, 31 May 2019 08:41:27 GMT):
@Raumo0 this `chai.expect` cid unit test example should help you -> https://github.com/hyperledger/fabric-chaincode-node/blob/release-1.4/fabric-shim/test/unit/client-identity.js#L59

varunagarwal (Fri, 31 May 2019 08:52:55 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.

rthatcher (Fri, 31 May 2019 09:01:36 GMT):
If you are running your containers locally with Docker Compose, then the easiest way is to map the folder of the source chaincode into the container.

mahoney1 (Fri, 31 May 2019 09:19:48 GMT):
@yuki-kon good question? Certainly would be good to do something like that for common ledger/state tasks. I've created a JIRA issue https://jira.hyperledger.org/browse/FAB-15590 and linked it to the Programming model improvements epic (which you'll see in the above JIRA issue.

mahoney1 (Fri, 31 May 2019 09:19:48 GMT):
@yuki-kon good question.. Certainly would be good to do something like that for common ledger/state tasks. I've created a JIRA issue https://jira.hyperledger.org/browse/FAB-15590 and linked it to the Programming model improvements epic (which you'll see in the above JIRA issue.

mahoney1 (Fri, 31 May 2019 09:19:48 GMT):
@yuki-kon good question.. Certainly would be good to do something like that for common ledger/state tasks. I've created a JIRA issue https://jira.hyperledger.org/browse/FAB-15590 and linked it to the Programming model improvements epic (which you'll see in the above JIRA issue).

mbwhite (Fri, 31 May 2019 09:42:07 GMT):
I've had some early thoughts on this very topic; we put the statelist concept in the sample rather than in the programming model to see if it was a workable concept. So having this feedback is valuable.

varunagarwal (Fri, 31 May 2019 12:09:04 GMT):
I used the `/context` part in docker-compose.yaml file and worked it out. Now getting new issues :(

varunagarwal (Fri, 31 May 2019 12:19:39 GMT):
Running `docker exec -e "CORE_PEER_LOCALMSPID=AxOrgMSP" -e "CORE_PEER_MSPCONFIGPATH=/peer/crypto/msp" ax-peer peer channel create -o orderer0:7050 -c default -f /peer/channel.tx` on a peer. The certificates are in place, checked using `docker exec -t ax-peer bash`. Disabled TLS to make things simpler for me, but now getting `Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'default', 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`. Exact same error being shown in orderer docker logs. Just trying to make a 1 org, 1 peer run

varunagarwal (Fri, 31 May 2019 12:20:19 GMT):
the files were all put using cryptogen

Rajatsharma (Fri, 31 May 2019 12:37:58 GMT):
I'm using `GetQueryResultWithPagination()` function and I'm sending query `{"fields":[],,"selector":{"doc_type":"record","record_field":{"age":{"$eq":1}}}}` while this runs comfortably on couchdb mango query this is not running through the function `GetQueryResultWithPagination()`. As peer appends `"_id","~version","_id","~version"` in `field`. And I don't get ideally the data I should get from couchDB. I don't think this should be the expected behavior of this function.

Rajatsharma (Fri, 31 May 2019 12:37:58 GMT):
Moreover I've gone through the code at https://github.com/hyperledger/fabric/blob/f80f06953cf8eca38c9d428533f2547a953d983a/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go#L634, I don't understand why is it appending `"_id","~version"` 2 times.

Rajatsharma (Fri, 31 May 2019 13:22:04 GMT):
I was using `GetQueryResultWithPagination()` of the shim, and I had passed a query, `{"fields":[],,"selector":{"doc_type":"record","record_field":{"age":{"$eq":1}}}}`. While this query runs on the couchDB without any issues it's not running using `GetQueryResultWithPagination()`, as fabric appends `"_id","~version","_id","~version"` to the field attribute. Ideally I should get all the data displayed when I use that query but currently I'm getting empty JSON. This should not be the ideal behavior of this function.

Rajatsharma (Fri, 31 May 2019 13:23:35 GMT):
Moreover I've gone through https://github.com/hyperledger/fabric/blob/f80f06953cf8eca38c9d428533f2547a953d983a/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go#L634, I don't get why `"_id","~version"` is getting appended twice.

yuki-kon (Fri, 31 May 2019 16:19:01 GMT):
@mahoney1 Thanks! I will track the JIRA.

vb2605 (Sat, 01 Jun 2019 07:30:24 GMT):
Has joined the channel.

mrudav.shukla (Mon, 03 Jun 2019 06:52:23 GMT):
Has joined the channel.

mrudav.shukla (Mon, 03 Jun 2019 06:52:24 GMT):
Hi, Has anyone written unit tests for node smart contract?

jlcs (Mon, 03 Jun 2019 15:18:06 GMT):
Check this mock ChaincodeStub implementation for offline tests: https://www.npmjs.com/package/@theledger/fabric-mock-stub

jlcs (Mon, 03 Jun 2019 15:20:05 GMT):
Question: If during the chaincode execution you write a key, value pair with putState, and later, during the same execution you read it with getState, did the state change or it doesn't change until the transaction is validated and commited?

jlcs (Mon, 03 Jun 2019 15:22:12 GMT):
I think it is changed because of this test: https://github.com/hyperledger/fabric/blob/eca1b14b7e3453a5d32296af79cc7bad10c7673b/core/chaincode/shim/mockstub_test.go#L242

muralisr (Mon, 03 Jun 2019 19:18:00 GMT):
@jlcs chaincode operations do not allow "read your writes" in the same proposal call. So if the mock suggests that, I'd ignore it

anand.fast (Tue, 04 Jun 2019 01:18:34 GMT):
Has joined the channel.

Emiel 1 (Tue, 04 Jun 2019 09:06:17 GMT):
Has joined the channel.

Emiel 1 (Tue, 04 Jun 2019 09:06:55 GMT):
Hi, I'm currently developing a smart contract using the NodeJS chaincode sdk 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 🙂

mahoney1 (Tue, 04 Jun 2019 12:13:34 GMT):
Use the client Identity instance to get the cert (in Fabric 1.4 fabric-contract-api, its available from the transaction context `ctx`) - more info on ClientIdentity class methods -> https://fabric-shim.github.io/master/fabric-shim.ClientIdentity.html#getID__anchor ```// Use the Client Identity object to get the invoker/submitter info. let cid = ctx.clientIdentity; let cert = cid.getX509Certificate; let id = cid.getID(); // X509 Certificate invoker string let CN = id.substring(id.indexOf("CN=") + 3, id.lastIndexOf("::"));```

mahoney1 (Tue, 04 Jun 2019 12:13:34 GMT):
Use the client Identity instance to get the cert (in Fabric 1.4 fabric-contract-api, its available from the transaction context `ctx`) - more info on ClientIdentity class methods -> https://fabric-shim.github.io/master/fabric-shim.ClientIdentity.html#getID__anchor ```// Use the Client Identity object to get the invoker/submitter info. let cid = ctx.clientIdentity; let cert = cid.getX509Certificate(); let id = cid.getID(); // X509 Certificate invoker string let CN = id.substring(id.indexOf("CN=") + 3, id.lastIndexOf("::"));```

Emiel 1 (Tue, 04 Jun 2019 12:14:21 GMT):
A i see, thanks alot that will work

Emiel 1 (Tue, 04 Jun 2019 12:14:48 GMT):
though i was actually looking for the RSA public key, i know there is one since it can be found in the client's wallet

Emiel 1 (Tue, 04 Jun 2019 12:15:26 GMT):
is it possible to retrieve this public key from the transaction the same way as the above mentioned ID?

mahoney1 (Tue, 04 Jun 2019 12:16:27 GMT):
that's getting the cert from within the runtime transaction :-) - the one that was submitted by the blockchain user from the client app (outside the blockchain network)

mahoney1 (Tue, 04 Jun 2019 12:16:27 GMT):
that's getting the cert from within the runtime transaction :-) - the one that was submitted by the blockchain user from the client app (outside the blockchain network, ie the client app used the wallet)

mahoney1 (Tue, 04 Jun 2019 12:16:27 GMT):
no don't mean that - the cert is used to sign/submit the transaction - app retrieves X.509 certificate from user's wallet (client-side) - suggest to read https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure and https://fabric-shim.github.io/release-1.4/tutorial-deep-dive-contract-interface.html for further info

Emiel 1 (Tue, 04 Jun 2019 12:17:54 GMT):
hmm, i'm not sure i follow. could you ellaborate?

Emiel 1 (Tue, 04 Jun 2019 12:18:15 GMT):
do you mean that the public keys are only used in the enrolment of identities at MSP?

mahoney1 (Tue, 04 Jun 2019 12:24:21 GMT):
suggest to read https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure and this https://fabric-shim.github.io/release-1.4/tutorial-deep-dive-contract-interface.html (positioning of contracts, executed inside chaincode container but separate from clients).

mahoney1 (Tue, 04 Jun 2019 12:24:21 GMT):
no don't mean that - the cert is used to sign/submit the transaction - app retrieves X.509 certificate from user's wallet (client-side) - suggest to read https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure and https://fabric-shim.github.io/release-1.4/tutorial-deep-dive-contract-interface.html for further info

Emiel 1 (Tue, 04 Jun 2019 12:26:20 GMT):
I will, thx

jlcs (Tue, 04 Jun 2019 13:20:34 GMT):
Thank you! I will open a Jira issue so it is addressed in the test.

SaphiraBjartskular (Tue, 04 Jun 2019 21:17:18 GMT):
Hi everyone, how do you add anchor peers to a channel using node?

Emiel 1 (Wed, 05 Jun 2019 15:34:13 GMT):
Hi, does anyone know how i can get the complete world state using `getStateByRange(startKey, endKey)`?

Emiel 1 (Wed, 05 Jun 2019 15:35:03 GMT):
I've tried with just 2 empty strings however it consistently seems to not include a certain state in the iterator result.

Emiel 1 (Wed, 05 Jun 2019 15:35:03 GMT):
I've tried with just 2 empty strings however it always seems to exclude one of the states

alokkv (Thu, 06 Jun 2019 08:51:47 GMT):
hi friends, i have two assets with same key and two different doctype.say for example marble and plate. my question is is this two asset different because i have used same key for both assets but both are two different asset.can anyone please help what this doctype is?.can i use this Doctype to create assets just like in composer.please help

alokkv (Thu, 06 Jun 2019 08:51:47 GMT):
hi friends, i have two assets with same key and two different doctype.say for example marble and plate. my question is is this two asset different because i have used same key for both assets but both are two different asset.can anyone please help what this doctype is?.can i use this Doctype to create assets just like in composer.please help.also can anyone please suggest the best way to create two assets with same key without any problem

rthatcher (Thu, 06 Jun 2019 09:24:06 GMT):
If you have the exact same Key - then your plate will overwrite your marble when you putState() - the answer for you may be to use *Composite Keys* There are methods createCompositeKey(), splitCompositeKey() and getStateByPartialCompositeKey() - described here: https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html

alokkv (Thu, 06 Jun 2019 09:33:40 GMT):
thank you for the replay.so this doctype will not put my two assets in different layers?can you explain me what is this doctype

rthatcher (Thu, 06 Jun 2019 10:16:49 GMT):
With the Marbles Sample - the Doctype is just an attribute the same as Owner so it does not form part of the key. Having just checked the Marbles sample does use Composite Keys already: https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/node/marbles_chaincode.js#L109 You could include the Doctype in the composite key to allow both "types" (plate and marble) to be stored with the same duplicate colour, name, index number. The Commercial Paper sample has a method of storing multiple types by using a namespace (although I think it only stores 1 type!) . - this section of the Developing Applications document explains how it works: https://hyperledger-fabric.readthedocs.io/en/latest/developapps/architecture.html#

Javi (Thu, 06 Jun 2019 10:48:40 GMT):
Has joined the channel.

Javi (Thu, 06 Jun 2019 10:48:53 GMT):
Hi people!

Javi (Thu, 06 Jun 2019 10:50:06 GMT):
Anyone knows why I'm getting this error when I try to upgrade my chaincode? `could not assemble transaction, err proposal response was not successful, error code 500, msg cannot get package for chaincode (Contract:0.2.0)`

Javi (Thu, 06 Jun 2019 10:51:52 GMT):
If I check if the chaincode is installed in the peer, it exists: ``` root@a36d3d12190f:/opt/gopath/src# peer chaincode list --installed Name: Contract, Version: 0.1.0, Path: github.com/chaincode, Id: ab278462f184623ec4d21572376c49c22870a7e2b83d32f91ce7ec84be9f0971 ``` I'm executing this command to uprgade the chaincode: `peer chaincode upgrade -o orderer.example.com:7050 -C mychannel -n Contract -v 0.2.0 -c '{"Args":[]}' -p github.com/chaincode/`. Thanks in advance!

Javi (Thu, 06 Jun 2019 10:53:45 GMT):
also, chaincode is instantiated in the channel: ``` Get instantiated chaincodes on channel mychannel: Name: OdeoContract, Version: 0.1.0, Path: github.com/chaincode, Escc: escc, Vscc: vscc ```

Javi (Thu, 06 Jun 2019 10:53:45 GMT):
also, chaincode is instantiated in the channel: ``` Get instantiated chaincodes on channel mychannel: Name: Contract, Version: 0.1.0, Path: github.com/chaincode, Escc: escc, Vscc: vscc ```

Javi (Thu, 06 Jun 2019 11:06:17 GMT):
ok, problem solved. I forgot to install the new chaincode first :sweat_smile:

root10 (Fri, 07 Jun 2019 08:39:20 GMT):
Has joined the channel.

root10 (Fri, 07 Jun 2019 08:39:21 GMT):
Good morning. I'm developing a chaincode that insert struct in blockchain. I have to call many (like 100.000) inserts with goroutine. How can I develop chaincode and network su manage all this transactions without crash? thanks

varunagarwal (Fri, 07 Jun 2019 10:23:33 GMT):
@root10 https://github.com/hyperledger/fabric-samples/tree/release-1.4/high-throughput This is the best way to manage it

root10 (Fri, 07 Jun 2019 10:27:36 GMT):
I've read it, and it's not my case

root10 (Fri, 07 Jun 2019 10:29:25 GMT):
For two reason: first, it manages a value, so it can increase/decrease it, while I have a struct, so I fill the key and the value. And second, I have a lot of insert, not so many update

root10 (Fri, 07 Jun 2019 10:29:25 GMT):
For two reason: first, it manages a value, so it can increases/decreases it, while I have a struct, so I fill the key and the value. And second, I have a lot of insert, not so many update

varunagarwal (Fri, 07 Jun 2019 10:33:13 GMT):
well afaik if it is inserts and not updates to differet keys then it shouldnt be an issue. Given fabric tx/s it will take some time to process that much. Better wait for someone more experienced though.

Abrara (Fri, 07 Jun 2019 12:57:15 GMT):
Has joined the channel.

muralisr (Fri, 07 Jun 2019 13:01:32 GMT):
@root10 ` How can I develop chaincode and network su manage all this transactions without crash? ` --- why would it crash ?

Abrara (Fri, 07 Jun 2019 13:05:01 GMT):
Hello, I'm having a cannot find package error when importing the lib cid into my chaincode as shown in https://github.com/hyperledger/fabric/tree/release-1.4/core/chaincode/shim/ext/cid I tried the proposed solution here https://stackoverflow.com/questions/49560104/cannot-find-package-cid-in-goroot-or-gopath but it doesn't change a thing. I tried to just just declare it as `"github.com/hyperledger/fabric/core/chaincode/shim/ext/cid"` but it doesn't work

root10 (Fri, 07 Jun 2019 13:24:06 GMT):
@muralisr because it crash. This is my code: ```go ```

root10 (Fri, 07 Jun 2019 13:24:06 GMT):
@muralisr because it crash. This is my code: ```go for n := 0; n < number; n++ { go func(wg *sync.WaitGroup, item *Item) { defer wg.Done() _, err := contract.Insert(item) errorChannel <- err }(&wg, &itemWrap) } ```

root10 (Fri, 07 Jun 2019 13:24:06 GMT):
@muralisr because it crash. This is my code: ```go for n := 0; n < number; n++ { go func(wg *sync.WaitGroup, item *Item) { defer wg.Done() _, err := contract.Insert(item) errorChannel <- err }(&wg, &itemWrap) } ``` with number = 25.000 for example

root10 (Fri, 07 Jun 2019 13:25:35 GMT):
This are some errors in peer log: ```bash 2019-06-06 13:27:52.711 UTC [chaincode] HandleTransaction -> ERRO 28e8e [5803343e] Failed to handle PUT_STATE. error: no ledger context github.com/hyperledger/fabric/core/chaincode.(*Handler).isValidTxSim /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:545 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:259 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 PUT_STATE failed: transaction ID: 5803343ead5d8c64f26a3a98f08cd214c47236c5c23cf9be69d562e2cd477431 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:276 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 ``` ```bash 2019-06-06 13:25:34.840 UTC [chaincode] HandleTransaction -> ERRO 24328 [7e618958] Failed to handle GET_STATE. error: no ledger context github.com/hyperledger/fabric/core/chaincode.(*Handler).isValidTxSim /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:545 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:259 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 GET_STATE failed: transaction ID: 7e6189587bb77a72ab9e911402de1a46f0b2653e00280072ed2719a0b43a6c48 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:276 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 ``` ```bash error sending failed to execute transaction 56efc78ac84f99c44d79dc43441ff4b2b88434b27775f3f2f003e209a4555592 github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:244 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:239 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:147 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:142 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 ```

muralisr (Fri, 07 Jun 2019 13:25:52 GMT):
` Failed to handle GET_STATE. error: no ledger context`

muralisr (Fri, 07 Jun 2019 13:26:29 GMT):
that typically means the proposal you sent timed out and removed context while the chaincode was still working on stuff

muralisr (Fri, 07 Jun 2019 13:26:49 GMT):
increasing the timeout would likely take care of it

muralisr (Fri, 07 Jun 2019 13:28:40 GMT):
try setting `CORE_CHAINCODE_EXECUTETIMOUT=s` (default is 30s)

muralisr (Fri, 07 Jun 2019 13:28:40 GMT):
try setting `CORE_CHAINCODE_EXECUTETIMOUT=s` (default is `30s`) on the peer

root10 (Fri, 07 Jun 2019 13:31:12 GMT):
Where I set it?

muralisr (Fri, 07 Jun 2019 13:34:31 GMT):
its an enviroment variable on the peer

muralisr (Fri, 07 Jun 2019 13:34:50 GMT):
or you can directly modify core.yaml (look for "executetimeout")

root10 (Fri, 07 Jun 2019 13:35:40 GMT):
Ah ok, I'll try it

root10 (Fri, 07 Jun 2019 13:35:55 GMT):
Do you suggest me to change something else in core.yaml?

muralisr (Fri, 07 Jun 2019 13:36:04 GMT):
not really

muralisr (Fri, 07 Jun 2019 13:36:17 GMT):
how are you running your peer ?

muralisr (Fri, 07 Jun 2019 13:36:42 GMT):
from docker/docker-composes/k8s ?

muralisr (Fri, 07 Jun 2019 13:36:47 GMT):
or directly from command line

muralisr (Fri, 07 Jun 2019 13:37:12 GMT):
in general easier to add as env var

root10 (Fri, 07 Jun 2019 13:38:15 GMT):
docker-compose, 2 peers, 1 org

root10 (Fri, 07 Jun 2019 13:38:45 GMT):
I've wrote a backend in go, so I'm using fabric-sdk-go

root10 (Fri, 07 Jun 2019 13:40:40 GMT):
Or in general, have I to set up the network in some way to manage this amount of data?

muralisr (Fri, 07 Jun 2019 14:27:49 GMT):
ok. so setting CORE_CHAINCODE_EXECUTETIMOUT env on peer containers in the docker-compose would be the simplest

root10 (Fri, 07 Jun 2019 14:30:13 GMT):
Time suggested?

mahoney1 (Fri, 07 Jun 2019 14:36:28 GMT):
@root10 try 120s ? see example here -> https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/dockerenv/docker-compose.yaml#L114 the variable is `CORE_CHAINCODE_EXECUTETIMEOUT` fyi

muralisr (Fri, 07 Jun 2019 14:47:56 GMT):
you can make it as large as uyou like @root10 ... its an upper limit for waiting for completion,

muralisr (Fri, 07 Jun 2019 14:48:52 GMT):
once you get a feel for actual time taken can reduce it appropriately so yiu don;'t wait long for a misbehaving execution

mtng (Mon, 10 Jun 2019 08:40:12 GMT):
Has joined the channel.

Rchauhan (Mon, 10 Jun 2019 09:55:06 GMT):
Hey Friends, Is there any way to create a channel and peers in a running environment ??

Javi (Mon, 10 Jun 2019 14:24:14 GMT):
Hi people! I created a chaincode that saves a struct of 6 integers, and I developed a middleware in java using the fabric sdk to write data to the ledger using spring, each request takes ~2 sec to complete, is this normal? how I can reduce this time? I'm using tls on all conections, but 2 seconds in much time for a simple write of 6 values... any idea?

Javi (Mon, 10 Jun 2019 14:24:14 GMT):
Hi people! I created a chaincode that saves a struct of 6 integers, and I developed a middleware in java using the fabric sdk to write data to the ledger using spring, each request takes ~2 sec to complete, is this normal? how I can reduce this time? I'm using tls on all conections, but 2 seconds is much time for a simple write of 6 values... any idea?

mahoney1 (Tue, 11 Jun 2019 12:19:59 GMT):
yes you can, quite normal use case, to add a channel to an existing blockchain network. Depending on the context of what you're wanting to achieve (eg. a new org joined the network, but will need to do some smart contract execution on a separate channel, eg with other org(s) etc etc), you should read the docs here -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/network/network.html?highlight=channel#adding-a-new-channel for more insights and context.

yigitpolat (Tue, 11 Jun 2019 12:25:39 GMT):
Hello Everybody ! Does anybody know how to create primary key in state db? I would like to do auto increment key for the put states. Thanks in advance

mahoney1 (Tue, 11 Jun 2019 12:47:08 GMT):
no, not 'normal' per se, but it could be your batch timeout setting (see https://hyperledger-fabric.readthedocs.io/en/release-1.4/config_update.html 'Batch Timeout' for more info). And how many peers are endorsing? I suggest to raise a [Stack Overflow](https://stackoverflow.com/questions/tagged/hyperledger-fabric) with details of your environment/setup, code, architecture brief (where your spring app using the sdk is in relation to peer on the n/work etc), what version of Fabric, OS, memory, CPU spec etc.), you could also examine latency in your env, using tools like lagscope etc.

yigitpolat (Tue, 11 Jun 2019 13:34:47 GMT):
I solved by using transaction id as key. If you have any other ideas please let me know

Swhit210 (Tue, 11 Jun 2019 17:05:52 GMT):
Has joined the channel.

Rajatsharma (Tue, 11 Jun 2019 18:12:24 GMT):
In my running network suddenly orderer has stopped delivering blocks to peer, my transactions are getting processed from SDK externally as it's getting commited from the orderer. The peer syncs all the blocks when I restart the container. There's probably a very small issue. Could anyone please help me out with this ?

florianc (Wed, 12 Jun 2019 08:09:53 GMT):
Hello. Is there a way to query all states stored in the world state? If getStateByRange is the only solution, what should be the start and the end key? (and basically, how does this work internally?)

HLFPOC (Wed, 12 Jun 2019 08:45:06 GMT):
Not sure about the internal working, but you can pass empty string for start and end keys which implies unbounded range query on start or end. You can refer this for more details : https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/interfaces.go#L107

YassineAmor (Wed, 12 Jun 2019 10:09:02 GMT):
Has joined the channel.

rthatcher (Thu, 13 Jun 2019 15:02:18 GMT):
Reminder that the Fabric Developer Community call starts in approximately 60mins : 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

MeSSeRz (Fri, 14 Jun 2019 05:01:51 GMT):
Has joined the channel.

MeSSeRz (Fri, 14 Jun 2019 05:14:11 GMT):
Hi all. Is there any way to run `dev-*` docker containres manually? I have a network with 2 orgs and each org have 2 peers. When I install/instantiate my chaincodes, it finishes sucessfully. But `dev-*` peers runs only for Org1 and when I am trying to invoke a chaincode, I get `ENDORSEMENT_POLICY_FAILURE` error because endorsing peer is not running for Org2. Also I tried to instantiate chaincodes for Org2 too, but got an error saying `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg version already exists for chaincode with name 'mycc'`. Btw, sometime everything goes well and `dev` peers start successfully for both orgs, but it happens very rarely

mrudav.shukla (Fri, 14 Jun 2019 12:29:28 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:33 GMT):
Worked it out. If any one is stuck on this, references: https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/838

ahmad-raza (Fri, 14 Jun 2019 14:38:30 GMT):
Hello all, can any one suggest a way to convert "chaincodeInterface" chaincode in .cds format? OR is it necessary the chaincode must be in "contractInterface" created and packaged by ibm blockchain vs code extension? Because to install chaincode on IBM Blockchain Service 2.0 it must be in .cds format?

davidkel (Fri, 14 Jun 2019 14:45:51 GMT):
The IBM Blockchain extension for vscode can package any chaincode type into a .cds file, so you shouldn't have to do anything to your chaincode implementation

ahmad-raza (Fri, 14 Jun 2019 18:15:56 GMT):
sure thanks for answer i'll try

HaricharanBole (Sat, 15 Jun 2019 13:33:09 GMT):
Has joined the channel.

GKumar (Sun, 16 Jun 2019 18:24:26 GMT):
I am using private data collection for private transactions. But for any new collection creation i am forced to create and instantiate chaincode with the configuration of the new collection. This is completely contradicting the privacy because now every org need to accept the new collection configuration change and which is private and accessible only between some orgs!!!. Is there anyway to creation new collection as part of the chaincode dynamically and get instantiated only for certain orgs

Meghna18 (Mon, 17 Jun 2019 10:27:50 GMT):
Has joined the channel.

Meghna18 (Mon, 17 Jun 2019 10:28:09 GMT):
i want to connect to different instances of couchdb present in different peers in hyperledger fabric network. Please let me know the command to get the same.

ahmad-raza (Mon, 17 Jun 2019 14:03:06 GMT):
Hi @davidkel , can you please help to open CouchDB web interface (Fauxton) like "http://localhost:5984/_utils" in ibm blockchain 2.0 because i want to create indexes in db. i had tried "my-network-address:5984/_utils" but page did not open. i have looked in peer pod's .yaml file where address of couchdb is written as localhost:5984

ahmad-raza (Mon, 17 Jun 2019 14:03:22 GMT):

Screenshot from 2019-06-17 19-03-26.png

davidkel (Mon, 17 Jun 2019 14:10:56 GMT):
Indexes should be deployed as part of your chaincode see https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#cdb-add-index

ahmad-raza (Mon, 17 Jun 2019 14:13:05 GMT):
thanks for quick answer

ahmad-raza (Mon, 17 Jun 2019 14:35:17 GMT):
chaincode in IBP 2.0 is installed through console so , how to include indexes in chaincode? Do we have to add same folder structure and file name to added to couchdb or anything else ? Secondly, if i have already installed chaincode, is upgrading chaincode and re installing make indexes?

davidkel (Mon, 17 Jun 2019 15:13:50 GMT):

Clipboard - June 17, 2019 4:13 PM

davidkel (Mon, 17 Jun 2019 15:13:56 GMT):
Your indexes are in the directory structure described in the link. These files are included with your chaincode package so would be stored within the .cds file. An example of my project is shown above

ahmad-raza (Mon, 17 Jun 2019 19:18:18 GMT):
thanks :thumbsup:

ahmad-raza (Tue, 18 Jun 2019 09:38:43 GMT):
@davidkel when i changed browser and open IBP 2.0 instance. consloe ask to join channel by peers and also smart contracts are not visible there. I have imported OrgMSPs in wallet but still it asks to join channel whats wrong there?

davidkel (Tue, 18 Jun 2019 09:45:34 GMT):
@ahmad-raza Suggest you raise a support ticket with IBM

ahmad-raza (Tue, 18 Jun 2019 09:46:14 GMT):
is it a known issue?

davidkel (Tue, 18 Jun 2019 09:46:23 GMT):
Sorry I have no idea

Rajatsharma (Tue, 18 Jun 2019 10:02:55 GMT):
I was trying to configure peer operation metrics withprometheus and grafana, but there's not dashboard. Is anyone aware about any dashboard that I could use for grafana?

Rajatsharma (Tue, 18 Jun 2019 10:02:55 GMT):
I was trying to configure peer operation metrics with prometheus and grafana, but there's not dashboard. Is anyone aware about any dashboard that I could use for grafana?

florianc (Tue, 18 Jun 2019 12:46:08 GMT):
Hello. I have a contract with two functions: A and B. B performs a rich query on the world state (getQueryResult(selector)) and I would like to invoke it from A. But I am not able to do it. `var resByNamesAsArray = JSON.parse(await this.richQuery(stub, nameQuery).toString());` Fails. This is with fabric shim 1.2.0 in nodejs.

florianc (Tue, 18 Jun 2019 12:46:41 GMT):
Error: `Cannot read property 'richQuery' of undefined`

ahmad-raza (Tue, 18 Jun 2019 14:02:58 GMT):
can we access org-ca's sqlite file in ibp2.0 OR kubernatees cluster?

deenario (Wed, 19 Jun 2019 06:48:06 GMT):
Hey guys i have to write a chaincode in which i have 3 structures. I have states and every state has a dist . Now to create a realtion between them. In relational DB i could make a relation. What is its equivalent for Fabric using couchdb ?

kynguyen910 (Wed, 19 Jun 2019 08:18:59 GMT):
Has joined the channel.

BrajeshKumar (Wed, 19 Jun 2019 08:56:03 GMT):
Has joined the channel.

haardikkk (Thu, 20 Jun 2019 00:52:23 GMT):
can I use the CA for authentication in some way? If we have 2 different object types representing users on the chain, namely `Client` and `Agent` -- is it possible to issue them x509 certificates when they're registered and verify they are who they are when calling functions on the API which uses the Fabric SDK Go to talk to the blockchain?

haardikkk (Thu, 20 Jun 2019 00:53:06 GMT):
Also, `Client`s and `Agent`s are not techies, how can I have them manage their certificates and somehow add a process to recover their identity if they lose their cert? Im thinking something like the Bitcoin/Ethereum mnemonics for private keys, but im not sure how

haardikkk (Thu, 20 Jun 2019 02:42:33 GMT):
==========================+ Second question: If I create a composite key for `Client` for one of their fields, let's say `City`, if the object is updated later using a function in the chaincode which may change the City, do I need to recreate the composite keys or will they still work?

florianc (Thu, 20 Jun 2019 05:53:04 GMT):
Having clients managing their keys is never, according to me, a good idea, for the issues you provided above, and because they may not understand their importance and thus transfer it to someone else. Can't you just make it that it that they just see a password, but internally you use it for certificates/others (if that's possible)?

Kelvin_Moutet (Thu, 20 Jun 2019 09:50:01 GMT):
Has joined the channel.

Kelvin_Moutet (Thu, 20 Jun 2019 09:50:01 GMT):
Hello, is there a way to get the current value Chaincode Endorsement Policy of a chaincode instantiated ?

alchmeina (Thu, 20 Jun 2019 11:43:13 GMT):
Has joined the channel.

alchmeina (Thu, 20 Jun 2019 11:43:15 GMT):
Does having our chaincodes spread across different channels help in higher throughput?

ahmad-raza (Thu, 20 Jun 2019 11:51:28 GMT):
@davidkel how can we use environment variable like "FABRIC_CA_SERVER_SIGNING_DEFAULT_EXPIRY" in IBP 2.0 and kubernatees cluster? means want to change value

davidkel (Thu, 20 Jun 2019 12:09:03 GMT):
Sorry you really need to raise a support ticket with IBM to get answers about the IBM provided service.

Rajatsharma (Fri, 21 Jun 2019 10:03:09 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:05:08 GMT):
What I could do to mark the old certificates invalid?

mlohr (Fri, 21 Jun 2019 11:52:21 GMT):
What exactly happens on "chaincode install"? Why to I have to provide a path here? Is this the parse according to the calling container or according to the called container?

florianc (Fri, 21 Jun 2019 13:08:53 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/network/network.html#installing-a-smart-contract

mlohr (Fri, 21 Jun 2019 13:36:38 GMT):
Thanks for your reply, but that does not really answer my question.

mlohr (Fri, 21 Jun 2019 13:36:54 GMT):
What happens in the background?

muralisr (Fri, 21 Jun 2019 14:53:27 GMT):
@mlohr chaincode's original implementation was just golang and fabric was involved in assembiling the chaincode package from GOPATH (which was the original "path"). The "path" became reused for other languages.

muralisr (Fri, 21 Jun 2019 14:53:27 GMT):
@mlohr chaincode's original implementation was just golang and fabric was involved in assembiling the chaincode package from GOPATH (which was the original "path"). The "path" became reused for other languages. ` Is this the parse according to the calling container or according to the called container?` --- the fully assembled package with all requisites is used to construct the binary to be used in the container running the chaincode

mlohr (Fri, 21 Jun 2019 14:54:49 GMT):
So... fabric is doing the compiling?

muralisr (Fri, 21 Jun 2019 14:55:42 GMT):
yes, using the assemebed package

mlohr (Fri, 21 Jun 2019 14:56:08 GMT):
assembled package = compiled go executable or is there "more"?

muralisr (Fri, 21 Jun 2019 14:56:55 GMT):
note that the CLI's "install" command has an option to take a fully assembed package (so fabric does not need to package) from user ... this would not require the path option

muralisr (Fri, 21 Jun 2019 14:57:26 GMT):
assembled package == go files with all depencies (in the case of GO chaincode)

muralisr (Fri, 21 Jun 2019 14:57:42 GMT):
ie, install does not construct the binary

mlohr (Fri, 21 Jun 2019 14:58:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=xHMTXMWEjq6mxaj7x) But it's still source code?

muralisr (Fri, 21 Jun 2019 14:58:18 GMT):
it is

mlohr (Fri, 21 Jun 2019 14:59:36 GMT):
Ah! So let me try to explain what I understood: peer chaincode install packs my source directory and sends it somehow to the defined peer. The defined peer will try to start a new docker container for the chaincode, puts the package there, compiles and starts it?

muralisr (Fri, 21 Jun 2019 14:59:52 GMT):
correct

muralisr (Fri, 21 Jun 2019 15:00:12 GMT):
`The defined peer will try to start a new docker container for the chaincode, puts the package there, compiles and starts it?` -- will happen when there's a need to access the chaincode

muralisr (Fri, 21 Jun 2019 15:00:25 GMT):
(if not already started)

mlohr (Fri, 21 Jun 2019 15:00:30 GMT):
Are you contributing to the hyperledger project? If yes, please put this sentence to the documentation xD I know some people really struggeling with that :D

muralisr (Fri, 21 Jun 2019 15:01:01 GMT):
been contributing to the project for a while now ... :-)

mlohr (Fri, 21 Jun 2019 15:01:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=XWHh7DLrbuBc3aELF) e.g. on instantiate?

muralisr (Fri, 21 Jun 2019 15:01:16 GMT):
right

muralisr (Fri, 21 Jun 2019 15:01:49 GMT):
also in other cases ... say chaincode dies or you restart the peer.

muralisr (Fri, 21 Jun 2019 15:02:00 GMT):
chaincode is not restarted automatically

muralisr (Fri, 21 Jun 2019 15:02:21 GMT):
but when an invoke for the chaincode comes in it will start the chaincode

muralisr (Fri, 21 Jun 2019 15:02:27 GMT):
ie, on demand

muralisr (Fri, 21 Jun 2019 15:03:45 GMT):
do take a look at the `peer chaincode package` and `peer chaincode install ` as well which gives you a bit more flexibility on assembling package

mlohr (Fri, 21 Jun 2019 15:04:45 GMT):
Ok, obviously, there's something not working as I thought it might work. I just did a "peer chaincode install" with not errors (without doing peer chaincode package previously). I understood, that this command will "copy" the chaincode to the peer, right?

muralisr (Fri, 21 Jun 2019 15:04:59 GMT):
right

mlohr (Fri, 21 Jun 2019 15:05:35 GMT):
My chaincode directory ($GOPATH) has a certain size, ~250MB. But /var/hyperledger/production on peers side only 1,6M...

mlohr (Fri, 21 Jun 2019 15:05:49 GMT):
What did I get wrong here?

muralisr (Fri, 21 Jun 2019 15:05:51 GMT):
I assume you did something like `peer chaincode install -p -n -v ` ?

mlohr (Fri, 21 Jun 2019 15:05:56 GMT):
Right

muralisr (Fri, 21 Jun 2019 15:05:59 GMT):
ok

muralisr (Fri, 21 Jun 2019 15:06:37 GMT):
the install will only copy the go files ... perhaps you have other files ?

mlohr (Fri, 21 Jun 2019 15:07:06 GMT):
My other files are typical go dependencies

muralisr (Fri, 21 Jun 2019 15:10:11 GMT):
i don't want to mislead not knowing what you have completely... if instantiate succeeds you probably have what you need in the package

muralisr (Fri, 21 Jun 2019 15:10:41 GMT):
if it fails the peer log will indicate why (typically you may have to vendor dependencies to help the packaging)

mlohr (Fri, 21 Jun 2019 15:10:48 GMT):
Didn't succeed yet, but currently it is doing "something".. propably compiling

muralisr (Fri, 21 Jun 2019 15:10:53 GMT):
ok

mlohr (Fri, 21 Jun 2019 15:11:10 GMT):
Yeah!! Worked! :)

muralisr (Fri, 21 Jun 2019 15:11:15 GMT):
oh good

muralisr (Fri, 21 Jun 2019 15:11:29 GMT):
`docker ps` shows the chaincoide ?

mlohr (Fri, 21 Jun 2019 15:12:01 GMT):
Yep, it does. There's a new container. Thank you so much!! :)

muralisr (Fri, 21 Jun 2019 15:12:06 GMT):
you got it

mlohr (Fri, 21 Jun 2019 15:12:14 GMT):
Only with your help

mlohr (Fri, 21 Jun 2019 15:12:27 GMT):
I struggled on this for like... 4 weeks?

muralisr (Fri, 21 Jun 2019 15:12:34 GMT):
watch out in the chaincode space ... things are happening to make the experienace better and more control to user

muralisr (Fri, 21 Jun 2019 15:12:51 GMT):
not just here but in cloud space as well

muralisr (Fri, 21 Jun 2019 15:12:54 GMT):
sorry to hear that

muralisr (Fri, 21 Jun 2019 15:13:09 GMT):
did you ping earlier and didnt get answers ?

mlohr (Fri, 21 Jun 2019 15:13:56 GMT):
When I did my very first try, yes, but that's month(s) ago. Then I took a brake and tried something with ethereum, now I'm back on hyperledger

muralisr (Fri, 21 Jun 2019 15:14:03 GMT):
cool

mlohr (Fri, 21 Jun 2019 15:15:02 GMT):
The part what I'm missing in the documentation is the "data flow" when installing chaincodes. After you explained it it was quite clear

muralisr (Fri, 21 Jun 2019 15:15:25 GMT):
good feedback... will take a look and feed it back to docs folks

mlohr (Fri, 21 Jun 2019 15:15:34 GMT):
Thanks

mlohr (Fri, 21 Jun 2019 15:17:27 GMT):
Other possibilities, how you could understand it (without any previous knowledge of fabric): "They use docker containers. How do I put my chaincode into a docker container?", "peer chaincode install only copies the compiled binary", "The peer needs the volume mounted where the chaincode files reside, how else could it access them" and so on... my misleading thoughts :D

muralisr (Fri, 21 Jun 2019 15:17:49 GMT):
got it

muralisr (Fri, 21 Jun 2019 15:18:20 GMT):
quite reasonable .. actually I'm surprised such basics are missing...I wonder if they are just scattered

muralisr (Fri, 21 Jun 2019 15:20:10 GMT):
here's a suggestion ... if you like open a doc JIRA so this can get qued. If its already explained they may just point you to right doc

mlohr (Fri, 21 Jun 2019 15:20:26 GMT):
So, if you still have time, I have the next question: Now, I have the "production" environment with chaincode in docker containers. Now let's talk about the dev mode. If I understood correctly, at the end, I can just start the chaincode binary from my developer pc. There is this command line setting "--peer-chaincodedev=true" and also the chaincode.mode setting in core.yml. How to they correlate to each other?

mlohr (Fri, 21 Jun 2019 15:20:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=csxFzNmZ7aYxY83Bg) Sure! Will check

muralisr (Fri, 21 Jun 2019 15:21:06 GMT):
`. If I understood correctly, at the end, I can just start the chaincode binary from my developer pc. ` -- that's correct

muralisr (Fri, 21 Jun 2019 15:21:23 GMT):
but note that this is purely for dev convenience

muralisr (Fri, 21 Jun 2019 15:21:48 GMT):
install, invoke, debug is timeconsuming

muralisr (Fri, 21 Jun 2019 15:22:23 GMT):
so this is to help just with turnround (still thinking "debugging") during dev

muralisr (Fri, 21 Jun 2019 15:22:36 GMT):
this has nothhing to do with "production"

muralisr (Fri, 21 Jun 2019 15:23:09 GMT):
non-intutilvely, you'll still have to do "install" once just so the system knows about the chaincode

muralisr (Fri, 21 Jun 2019 15:24:12 GMT):
but once that's done, you can just set `--peer-chaincodedev=true` and start the chaincode as you would any other go binary (basically do the `go build`)

mlohr (Fri, 21 Jun 2019 15:25:37 GMT):
So far, that's understood (in theory, will try out after I have the full picture - ie you stop writing :D)

muralisr (Fri, 21 Jun 2019 15:25:51 GMT):
deal :-)

muralisr (Fri, 21 Jun 2019 15:26:35 GMT):
good luck.. have to break now

mlohr (Fri, 21 Jun 2019 15:26:59 GMT):
Oh ok

mlohr (Fri, 21 Jun 2019 15:27:02 GMT):
Thank you very much!

mlohr (Fri, 21 Jun 2019 15:27:12 GMT):
Jira ticket: Just in the backlog?

muralisr (Fri, 21 Jun 2019 15:29:50 GMT):
if you choose "Create" and Documentation field and choose release 1.4 you shoukd be all set

mlohr (Fri, 21 Jun 2019 15:29:55 GMT):
And, if you have the time: the difference between --peer-chaincodedev and core.yml:chaincode.mode=dev/net?

muralisr (Fri, 21 Jun 2019 15:29:58 GMT):
or 2.0

mlohr (Fri, 21 Jun 2019 15:30:02 GMT):
Ok

mlohr (Fri, 21 Jun 2019 15:30:05 GMT):
Will do

muralisr (Fri, 21 Jun 2019 15:31:55 GMT):
the --peer-chaincodedev just tokggels chaincode,mode to dev

muralisr (Fri, 21 Jun 2019 15:31:59 GMT):
its a convenience

muralisr (Fri, 21 Jun 2019 15:32:18 GMT):
I'd stick with `--peer-chaincodedev` and not modify core.yaml:chaincode.mode

muralisr (Fri, 21 Jun 2019 15:32:37 GMT):
later..

mlohr (Fri, 21 Jun 2019 15:34:52 GMT):
I tried CORE_CHAINCODE_MODE=dev, but didn't seem to work

mlohr (Fri, 21 Jun 2019 15:35:08 GMT):
But thanks anyways. Will give it another try now :)

mlohr (Fri, 21 Jun 2019 15:52:14 GMT):
Mh. Even in dev mode: peer always starts a container when I try to access the chaincode....

Antimttr (Fri, 21 Jun 2019 15:55:58 GMT):
yeah, that's what i've observed too

Antimttr (Fri, 21 Jun 2019 15:56:06 GMT):
peer node starts the chaincode node

mlohr (Fri, 21 Jun 2019 15:56:57 GMT):
Any idea how to solve that?

Antimttr (Fri, 21 Jun 2019 15:57:48 GMT):
nothing to solve, i believe that is the desired behavior

mlohr (Fri, 21 Jun 2019 15:59:23 GMT):
But where is the actual call executed?

Antimttr (Fri, 21 Jun 2019 16:00:00 GMT):
well the chaincode executes in the chaincode container, then the peer delivers results back to the client, as i understand it

mlohr (Fri, 21 Jun 2019 16:01:13 GMT):
yeah, but when I'm in dev mode, I want my manually started chaincode file execute things

mlohr (Fri, 21 Jun 2019 16:01:16 GMT):
not the container

Antimttr (Fri, 21 Jun 2019 16:02:17 GMT):
afaik hlf runs in docker containers only not natively on the host system

mlohr (Fri, 21 Jun 2019 16:15:13 GMT):
Read the message from @muralisr ~1h ago... for dev purposes it's possible

mlohr (Fri, 21 Jun 2019 16:15:25 GMT):
At least... that's what I understood

Antimttr (Fri, 21 Jun 2019 17:47:45 GMT):
yeah, i havent actually used that dev mode for developing chaincode but perhaps in that mode it doesnt use docker at all

muralisr (Fri, 21 Jun 2019 20:58:41 GMT):
@mlohr with `--peer-chaincodedev=true` peer should not try to spin up chaincode at all

muralisr (Fri, 21 Jun 2019 20:58:41 GMT):
@mlohr with `--peer-chaincodedev=true` peer should not try to spin up chaincode-in-container at all

muralisr (Fri, 21 Jun 2019 20:59:31 GMT):
assuming you have installed `peer chaincode install -p -n mycc -v 1.0`

muralisr (Fri, 21 Jun 2019 20:59:31 GMT):
assuming you have installed chaincode with `peer chaincode install -p -n mycc -v 1.0`

muralisr (Fri, 21 Jun 2019 20:59:40 GMT):
I'd expect the following to work

muralisr (Fri, 21 Jun 2019 21:02:37 GMT):
``` window 1 - peer node start --peer-chaincodedev=true window 2 - CORE_PEER_ADDRESS=127.0.0.1:7052 CORE_CHAINCODE_ID_NAME=mycc:1.0 ./mychaincodexe window 3 - peer chaincode instantiate -n mycc -v 1.0 ... ```

muralisr (Fri, 21 Jun 2019 21:02:37 GMT):
``` window 1 - peer node start --peer-chaincodedev=true window 2 - CORE_PEER_ADDRESS=127.0.0.1:7052 CORE_CHAINCODE_ID_NAME=mycc:1.0 ./mychaincodexe window 3 - peer chaincode instantiate -n mycc -v 1.0 ..... ```

muralisr (Fri, 21 Jun 2019 21:02:37 GMT):
``` window 1 - peer node start --peer-chaincodedev=true window 2 - CORE_PEER_ADDRESS= CORE_CHAINCODE_ID_NAME=mycc:1.0 ./mychaincodexe window 3 - peer chaincode instantiate -n mycc -v 1.0 ..... ```

muralisr (Fri, 21 Jun 2019 21:02:37 GMT):
``` window 1 - peer node start --peer-chaincodedev=true window 2 - CORE_PEER_ADDRESS= CORE_CHAINCODE_ID_NAME=mycc:1.0 ./mychaincodexe or CORE_CHAINCODE_ID_NAME=mycc:1.0 ./mychaincodexe --peer.address=:7052 window 3 - peer chaincode instantiate -n mycc -v 1.0 ..... ```

muralisr (Fri, 21 Jun 2019 21:04:25 GMT):
(I;m assuming you have created / joined channel etc)

muralisr (Fri, 21 Jun 2019 21:05:48 GMT):
the instantiate shoukd flow to the chaincode in window 2

muralisr (Fri, 21 Jun 2019 21:19:53 GMT):
to find ipaddress 7052 is running on the peer, do `netstat -an | grep 7052 | grep LISTEN`

PabloLalloni (Fri, 21 Jun 2019 21:48:05 GMT):
Has joined the channel.

PabloLalloni (Fri, 21 Jun 2019 21:48:06 GMT):
hello everyone!

PabloLalloni (Fri, 21 Jun 2019 21:50:04 GMT):
is there a way to get the block number corresponding to a (commited) txid from inside a chaincode? (I've got it working using qscc.GetBlockByTxID but that implies getting the whole block through grpc :flushed:)

blevy (Sat, 22 Jun 2019 12:42:02 GMT):
Has joined the channel.

blevy (Sat, 22 Jun 2019 12:42:04 GMT):
vscode

florianc (Mon, 24 Jun 2019 05:41:53 GMT):
I think not. I have not found a different way than the one you described.

Tzu (Mon, 24 Jun 2019 08:45:47 GMT):
Has joined the channel.

Kevin_Ko (Mon, 24 Jun 2019 15:08:26 GMT):
Has joined the channel.

Raumo0 (Wed, 26 Jun 2019 10:49:27 GMT):
How can I identify a user from the chaincode? I made the role mechanism, but I also want to get the user ID. Tell me please.

florianc (Wed, 26 Jun 2019 11:02:03 GMT):
Are you looking for this: https://fabric-shim.github.io/release-1.4/fabric-shim.ClientIdentity.html#getID__anchor ?

Raumo0 (Wed, 26 Jun 2019 20:04:15 GMT):
Thank you! From the result of the getID query, I can do the parsing and get the username. This is what I need.

handy (Thu, 27 Jun 2019 08:19:47 GMT):
Has joined the channel.

mahoney1 (Thu, 27 Jun 2019 10:40:58 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

mahoney1 (Thu, 27 Jun 2019 10:40:58 GMT):
reminder that the Fabric Developer Community call is in 8mins @ 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

tballast (Thu, 27 Jun 2019 11:41:10 GMT):
Are there any docs on how to run Java chaincode in devmode? I'm using java and maven. I've created the peer container and the chaincode container, however if I try to build using maven then it just says maven isn't installed in the container. Maybe it's just a matter of pulling all the tools i need in, however I'm wondering if anything like this is documented somewhere?

rthatcher (Thu, 27 Jun 2019 12:51:26 GMT):
I think it works using VS Code and the IBM Blockchain Platform extension - not tried devmode outside VS Code with Java.

mahoney1 (Thu, 27 Jun 2019 17:04:41 GMT):
recording from today's Fabric Developer community call (0627 zip) has been posted here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

sanket (Fri, 28 Jun 2019 05:03:19 GMT):
Has joined the channel.

NilsPe (Fri, 28 Jun 2019 14:34:17 GMT):
Hi everyone, I am struggling with dependency management in go... I try to use the queryresult package, but there is always a mistmatch between the package I vendored and the one hyperledger uses, e.g. cannot use *keyMod (type "github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification) as type "mycc/vendor/github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification in append How can I deal with this?

KartikChauhan (Fri, 28 Jun 2019 19:47:37 GMT):
I'm running a Fabric 1.4.1 network with one peer and one orderer. I'm using Prometheus to monitor them. The targets are up and Prometheus is able to scrape the metrics. But I think I'm not getting all the metrics that are listed on https://hyperledger-fabric.readthedocs.io/en/latest/metrics_reference.html Plus many of the metrics names look different than the ones mentioned in the list. This probably could be because the documentation is of version 1.4 and I'm running a network of 1.4.1. Just want to confirm if this is the sole reason or if there could be any other reason as well.

Rchauhan (Sat, 29 Jun 2019 11:52:48 GMT):
Hello Friends

Rchauhan (Sat, 29 Jun 2019 11:52:53 GMT):
Need a small help please, I am doing some changes in my chaincode and deploying it with same version v0, after complete network restart but its not picking my new method which I have added in chaincode file of node js. for this I am changing chaincode version number and deploying it with version v1 and its working fine, but after multiple changes when I am deploying my chaincode with v3 its throwing some error as below. {"success":false,"message":"Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: chaincode registration failed: container exited with 1"}

Aniket.1 (Mon, 01 Jul 2019 05:26:58 GMT):
@Rchauhan Seems there is some problem with chaincode. Also you cannot deploy two chaincode with same name and same version. For this error, check the peer logs and also ensure that code in your init function is perfect

incredible5 (Mon, 01 Jul 2019 08:27:31 GMT):
Has joined the channel.

incredible5 (Mon, 01 Jul 2019 08:27:32 GMT):
hey there, I want to know if there is a detailed descriptive tutorial on endorsement in hyperledger fabric apart from the hyperledger fabric documents. I am planning to make a network in which an admin must approve the transaction to proceed

vaibhavr2709 (Mon, 01 Jul 2019 11:53:30 GMT):
Has joined the channel.

Raumo0 (Mon, 01 Jul 2019 13:36:55 GMT):
Can someone explain to me what a bookmark is? Is it an offset parameter? I cannot set a bookmark as a number or key. What should be in this parameter? ``` func (stub *ChaincodeStub) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) ```

florianc (Mon, 01 Jul 2019 14:15:07 GMT):
I unfortunately don't have the answer to your question. Here are some links that talk about it, hopefully it can help you: https://docs.couchdb.org/en/2.2.0/api/database/find.html#db-find (check the bookmark param) https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getQueryResultWithPagination__anchor The equivalent function in nodejs. It ight have more information about it that the go one.

RodrigoAcosta (Mon, 01 Jul 2019 22:18:38 GMT):
hello everyone, someone around and online with experience on IBM Visual Studio Code plugin? trying to deploy to my IBM cloud blockchain a package that has become too big.

davidkel (Mon, 01 Jul 2019 22:31:41 GMT):
If it's to the IBM Blockchain platform you might want to consider raising a support ticket ?

davidkel (Mon, 01 Jul 2019 22:31:41 GMT):
If it's to the IBM Blockchain platform you might want to consider raising a support ticket with IBM ?

RodrigoAcosta (Mon, 01 Jul 2019 22:31:59 GMT):
yes, I already have. Thanks

davidkel (Mon, 01 Jul 2019 22:33:57 GMT):
I guess the only thing else to check would be to make sure that the cds file contains only what is required and isn't including stuff you don't need.

RodrigoAcosta (Mon, 01 Jul 2019 22:35:08 GMT):
but do we have control of what goes into the cds file? file went from 2.9 Mb to 11Mb and now it is at 137 Mb. I have added some new functions to the chaincode, but not that much to have a cds package sooo big

davidkel (Mon, 01 Jul 2019 22:38:08 GMT):
what language ?

RodrigoAcosta (Mon, 01 Jul 2019 22:38:29 GMT):
node js

davidkel (Mon, 01 Jul 2019 22:41:06 GMT):
Make sure you aren't including the node_modules directory. You control what is packaged using the .npm_ignore file so if you don't have one you need to create it in the same dir as your package.json file

davidkel (Mon, 01 Jul 2019 22:41:06 GMT):
Make sure you aren't including the node_modules directory. You control what is packaged using the .npmignore file so if you don't have one you need to create it in the same dir as your package.json file

davidkel (Mon, 01 Jul 2019 22:41:06 GMT):
I wonder if it's including the node_modules directory. You control what is packaged using the .npmignore file so if you don't have one you need to create it in the same dir as your package.json file

davidkel (Mon, 01 Jul 2019 22:41:35 GMT):
at the least add the line ``` node_modules ``` into it

davidkel (Mon, 01 Jul 2019 22:41:35 GMT):
try adding the line ``` node_modules ``` into it

RodrigoAcosta (Mon, 01 Jul 2019 22:41:41 GMT):
mmm, interesting.. let me check

davidkel (Mon, 01 Jul 2019 22:42:40 GMT):
Just corrected the name of the file as I typed it wrong `.npmignore`

davidkel (Mon, 01 Jul 2019 22:42:40 GMT):
Just corrected the name of the file as I typed it wrong `.npmignore` is the correct name

RodrigoAcosta (Mon, 01 Jul 2019 22:43:25 GMT):
yes, just added node_modules at the end and re packaging now. this is how it looks now ``` # # SPDX-License-Identifier: Apache-2.0 # # don't package the connection details local_fabric # don't package the tests test functionalTests # don't package config files .vscode .editorconfig .eslintignore .eslintrc.js .gitignore .npmignore .nyc_output coverage # don't package the node_modules dir node_modules ```

RodrigoAcosta (Mon, 01 Jul 2019 22:56:03 GMT):
thanks @davidkel ...this helped to reduce the size. Is still a bit big, but smaller now

RodrigoAcosta (Mon, 01 Jul 2019 22:56:19 GMT):
reduced to 66Mb

davidkel (Tue, 02 Jul 2019 02:54:22 GMT):
that's interesting as it should exclude node_modules by default. Is there anything else in your project directory that shouldn't be packaged but is because it isn't listed in the .npmignore file ? eg log files, or even old .cds files for example ?

davidkel (Tue, 02 Jul 2019 02:54:22 GMT):
that's interesting as it should exclude node_modules by default. Is there anything else in your project directory that shouldn't be packaged but is because it isn't listed in the .npmignore file ? eg log files, or even old .cds files for example ? What platform are you running on ?

davidkel (Tue, 02 Jul 2019 02:54:22 GMT):
that's interesting as it should exclude node_modules by default. Is there anything else in your project directory that shouldn't be packaged but is because it isn't listed in the .npmignore file ? eg log files, or even old .cds files for example ? What platform are you running on ? what does your project directory structure look like ?

RodrigoAcosta (Tue, 02 Jul 2019 03:51:18 GMT):
yes it is. I was saving each package on a release folder. so for example, one packager of 19 Mb was been included in all new packages I was doing. Then also some smaller files like connection profiles and allocation files for transient and private data handling. I included those directories and managed to reduce it a bit. However, the size is still big, but reduced a lot.

RodrigoAcosta (Tue, 02 Jul 2019 03:51:28 GMT):
Im on MAC

davidkel (Tue, 02 Jul 2019 08:15:26 GMT):
There is a very well hidden feature of the extension. When you package your chaincode it will output a list of files that have been packaged. You need to look in the `Output` tab in the view section of the ide. (you can get to it if you select Output from the view dropdown menu). Then there is a downdown selection menu and you can select `Blockchain` from that menu. That window should have output into it the list of files that have been packaged.

RodrigoAcosta (Tue, 02 Jul 2019 13:56:17 GMT):
hey, good morning. got it I have a huge list of these: ``` [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/4f/aea62cc909ed98119decd924da349020f2b9a9 [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/50/08ddfcf53c02e82d7eee2e57c38e5672ef89f6 [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/50/fe7c9ae65e61c74a2b8e82a8fae276a6e99274 [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/52/26fd2970e9188c93435816ed8b9e7e98ee24bf [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/54/51fd23d40d56a09de34f6b145f95c518370a1a [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/57/0f5a2fa8e445b4df3228df697f2d321bff4b5c [7/2/2019 1:08:15 AM] [INFO] - src/.git/objects/57/d97eaae0a3b07c53c85b7a1367857bf5b34fb0 ```

RodrigoAcosta (Tue, 02 Jul 2019 14:05:56 GMT):
if I add .git to the .npmignore file, size is reduced to 55Kb. now I need to figure out if it will work when I deploy.

davidkel (Tue, 02 Jul 2019 14:07:08 GMT):
You should be able to test that against the local fabric in vs-code. You definitely won't be wanting anything in the `.git` directory or infact any directory starting with a `.`

RodrigoAcosta (Tue, 02 Jul 2019 14:08:34 GMT):
yes, installing and instantiating now. will run all my set of tests

RodrigoAcosta (Tue, 02 Jul 2019 14:14:19 GMT):
looks good man.

RodrigoAcosta (Tue, 02 Jul 2019 14:14:23 GMT):
you are a life saver

RodrigoAcosta (Tue, 02 Jul 2019 14:14:46 GMT):
from 137 Mb to 55Kb

RodrigoAcosta (Tue, 02 Jul 2019 14:15:55 GMT):
now will try installing on ibm cloud

davidkel (Tue, 02 Jul 2019 14:19:39 GMT):
:thumbsup:

RodrigoAcosta (Tue, 02 Jul 2019 14:33:04 GMT):
yep, deployed beautifully. Thanks again man

dannym11 (Tue, 02 Jul 2019 16:27:45 GMT):
Has joined the channel.

dannym11 (Tue, 02 Jul 2019 16:30:54 GMT):
Hey guys, is there a limitation on the `contractName` for Go? I am trying to pass the optional parameter `name` const contract = await network.getContract(‘chaincodeID’, ‘main’); `public getContract(chaincodeId: string, name?: string): Contract;` https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/contractname.html

dkushagra (Wed, 03 Jul 2019 08:58:36 GMT):
Has joined the channel.

DeeptimanPattnaik (Thu, 04 Jul 2019 20:09:38 GMT):
Has joined the channel.

DeeptimanPattnaik (Thu, 04 Jul 2019 20:09:43 GMT):
Hi Everyone, I need help , currently facing an error saying: ENDORSEMENT_POLICY_FAILURE. Description: received invalid transaction posted this issue at stackoverflow : https://stackoverflow.com/questions/56892753/endorsement-policy-failure-description-received-invalid-transaction but no answer yet, please kindly suggest me some solution. Thanks

DeeptimanPattnaik (Thu, 04 Jul 2019 22:24:49 GMT):
can anybody really help me out with this? i have a kind request

alek (Fri, 05 Jul 2019 08:00:49 GMT):
Hi guys, do you know what are plans regarding java 11 support as a chaincode ? I can see that Fabric 1.4.1 by default has installed openJdk 1.8. WIll Java 11 be supported in next release ?

mallikarjunasai995 (Fri, 05 Jul 2019 11:14:18 GMT):
anybody facing the same issue __

mallikarjunasai995 (Fri, 05 Jul 2019 11:14:19 GMT):
docker exec -e "CORE _PEER_ADDRESS=peer1.peerorg1:7051" cli peer chaincode invoke -C accelerator -n p ing -c '{"Fucntion":"pong","Args":['10']}' -o orderer1.ordererorg1:7050

mallikarjunasai995 (Fri, 05 Jul 2019 11:14:27 GMT):
after this i am getting the below error

mallikarjunasai995 (Fri, 05 Jul 2019 11:14:47 GMT):
non-empty JSON chaincode parameters must contain the following keys: 'Arg s' or 'Function' and 'Args'

mallikarjunasai995 (Fri, 05 Jul 2019 11:15:05 GMT):
but i have args and function both parameters

florianc (Fri, 05 Jul 2019 11:15:57 GMT):
@malik

florianc (Fri, 05 Jul 2019 11:15:57 GMT):
@mallikarjunasai995

florianc (Fri, 05 Jul 2019 11:15:59 GMT):
"Fucntion"

florianc (Fri, 05 Jul 2019 11:16:07 GMT):
=> "Function"

handy (Fri, 05 Jul 2019 11:17:05 GMT):
@mallikarjunasai995, it should be like this: `-c '{"Args":["pong","10"]}'`

mallikarjunasai995 (Fri, 05 Jul 2019 11:17:35 GMT):
@handy thanks i will check

mallikarjunasai995 (Fri, 05 Jul 2019 11:19:26 GMT):
Error: endorsement failure during invoke. response: status:500 message:"Failed to unmarshal request"............ this means i have to send correct number of arguments right ?

handy (Fri, 05 Jul 2019 11:23:17 GMT):
I think so `-c '{"Args":["FUNCTION_NAME","ARG1","ARG2","ARG3","ARGN"]}'`

mallikarjunasai995 (Fri, 05 Jul 2019 12:12:22 GMT):
okay thanks ..even though am sending correct number of arguments am getting below error endorsement failure during invoke. response: status:500 message:"Failed to unmarshal request"...

mallikarjunasai995 (Fri, 05 Jul 2019 12:13:34 GMT):
ohh thanks ..but no luck am getting below error endorsement failure during invoke. response: status:500 message:"Failed to unmarshal request"...

florianc (Fri, 05 Jul 2019 12:14:29 GMT):
This is likely because a parameter in your arguments list does not match accepted types.

mallikarjunasai995 (Fri, 05 Jul 2019 12:17:09 GMT):
yes , but these were the parameters --- if err := stub.PutState(args[0], []byte(args[1])); for this am sending ---- args[0] - "50" , args[1]- "38"

mallikarjunasai995 (Fri, 05 Jul 2019 12:17:30 GMT):
is this okay since they are expecting some string ...

mallikarjunasai995 (Fri, 05 Jul 2019 12:18:39 GMT):
yes , but these were the parameters --- if err := stub.PutState(args[0], []byte(args[1])); for this am sending ---- args[0] - "50" , args[1]- "38" is this okay since they are expecting some string ...

florianc (Fri, 05 Jul 2019 14:00:47 GMT):
Hi. Using invoke chaincode with the nodejs shim 1.4.1 fails with the following: ``` const badgeCreatorQuery = [ 'query', creatorId ]; await ctx.stub.invokeChaincode('identity', badgeCreatorQuery, 'defaultchannel'); ``` Error returned: `Error: transaction returned with failure: Error: TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object` I can't figure out what's wrong with my code. Any idea?

Raumo0 (Fri, 05 Jul 2019 16:20:24 GMT):
Can someone explain me the parameters of calling contracts? I added a contract to my project for this example: https://github.com/grepruby/ERC20-Token-On-Hyperledger When I do instantiate (via the IBM Blockchain Platform extention on VSCode), I specify the function to be called: "init", and the arguments: `["{\"name\":\"Simple Token\",\"symbol\":\"SMT\"}"]`. When I start, I get the error: `Error instantiating smart contract: chaincode registration failed: container exited with 1`. Is this error related to my wrong arguments or not? I look at the logs, but did not figure it out.

muralisr (Sun, 07 Jul 2019 21:33:06 GMT):
@Raumo0 suggest looking at the chaincode container log and the peer log to debug. ... the arguments are interpreted by the chaincode and not by fabric (I see some instruction in the above github link on looking at logs..)

deenario (Mon, 08 Jul 2019 12:15:10 GMT):
My chaincode struct has two values. --- > Id and Deptt. eptt can have repeated values.

deenario (Mon, 08 Jul 2019 12:15:10 GMT):
My chaincode struct has two values. --- > Id and Deptt. Deptt can have repeated values. The problem is that it only returns the last posted value.

DeeptimanPattnaik (Tue, 09 Jul 2019 01:13:03 GMT):
Hi, How do i know, which Peer did the Transaction in Hyperledger Fabric Go? asked at Stackoverflow : https://stackoverflow.com/questions/56944097/how-do-i-know-which-peer-did-the-transaction-in-hyperledger-fabric-go please suggest me some solution

deenario (Tue, 09 Jul 2019 05:02:09 GMT):
@DeeptimanPattnaik If you are using the invoke.js file for Fabric node SDK, then open the invoke.js and you will see the peer name and port there. Or the other way is to do "docker ps" and then docker logs [CONTAINER ID THAT IS RUNNING THE PEER].

DeeptimanPattnaik (Tue, 09 Jul 2019 14:55:09 GMT):
yes from logs, i can see but in Fabric Go SDK, which API to use it

DeeptimanPattnaik (Tue, 09 Jul 2019 23:44:11 GMT):
Hi, How to read Block data received by transaction id in Hyperledger Fabric Go? asked at Stackoverflow : https://stackoverflow.com/questions/56961434/how-to-read-block-data-received-by-transaction-id-in-hyperledger-fabric-go

DeeptimanPattnaik (Tue, 09 Jul 2019 23:44:19 GMT):
please suggest me solution

Amjadnz (Wed, 10 Jul 2019 00:02:28 GMT):
Ok - Things are looking a bit different in v1.4 (Migrating my existing 1.0.3 Fabric Chaincodes to 1.4). For logging - I'm currently using the shim.NewLogger function but when I'm trying ti instantiate the chaincode getting the following error from the logs of PEER. ` undefined: shim.NewLogger`

Amjadnz (Wed, 10 Jul 2019 00:02:28 GMT):
Ok - Things are looking a bit different in v1.4 (Migrating my existing 1.0.3 Fabric Chaincodes to 1.4). For logging - I'm currently using the shim.NewLogger function but when I'm trying ti instantiate the chaincode getting the following error from the logs of PEER. ` undefined: shim.NewLogger` Can someone shed some light on it?

Amjadnz (Wed, 10 Jul 2019 01:06:27 GMT):
Ok - this item was due to the wrong hyperledger vendor folder. Once govendored it is fine now. I have another minor stumbling block. The transactions are getting committed: but when I do a smart query it is not fetching the results ```{ "Query":"{\"selector\":{\"AccountNumber\":\"ACCT911\"}}" } ``` And the output in the NODEJS service is as follows: ```2019-07-10 01:03:47.537 UTC [statecouchdb] ExecuteQueryWithMetadata -> ERRO 081 Error calling applyAdditionalQueryOptions(): unexpected EOF 2019-07-10 01:03:47.537 UTC [chaincode] HandleTransaction -> ERRO 082 [7ba44ae1] Failed to handle GET_QUERY_RESULT. error: unexpected EOF github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleGetQueryResult /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:865 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleGetQueryResult-fm /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:218 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:272 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 GET_QUERY_RESULT failed: transaction ID: 7ba44ae1364385c160c11fad3b9820c58f6ce02657e98294b106a593d6020876 github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:276 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333```

Amjadnz (Wed, 10 Jul 2019 01:11:01 GMT):
And this is in my `couchdb` container: `[notice] 2019-07-10T01:03:02.716251Z nonode@nohost <0.24575.0> 279dffbb09 couchdb_sca01:5984 172.31.0.23 undefined GET /agmchannel_agmaccounts/001-ACCT911?attachments=true 200 ok 10`

yeousunn (Wed, 10 Jul 2019 02:05:02 GMT):
Hi, can anyone explain why I get `Error: could not unmarshal chaincode package to CDS or SignedCDS` when installing a chaincode? I am using the following command ``` peer chaincode install -n clpi -v 1.0 github.com/chaincode/clpi/go/ ```

donjohnny (Wed, 10 Jul 2019 08:50:37 GMT):
Hi All, I like that in the 2.0 alpha the chaincode lifecycle is changing, however, the current way of installing a chaincode still requires the peer to communicate with the dockersock and this is a problem from a security perspective. Are there initiatives to address the way a chaincode container is started?

Root-man (Wed, 10 Jul 2019 09:54:05 GMT):
Has joined the channel.

Root-man (Wed, 10 Jul 2019 11:02:54 GMT):
Hello, does anyone know if it's possible to deploy go chaincodes with subpackages based on go modules? I am trying to deploy it using fabric-tools 1.4.1 with command `cli peer chaincode upgrade`, and I get the following error each time: ``` server > Error: error getting chaincode code kyc-chaincode: error getting chaincode package bytes: Error obtaining dependencies for github.com/Root-man/kyc-chaincode/cert: command : failed with error: "exit status 1" server > can't load package: package github.com/Root-man/kyc-chaincode/cert: cannot find package "github.com/Root-man/kyc-chaincode/cert" in any of: server > /opt/go/src/github.com/Root-man/kyc-chaincode/cert (from $GOROOT) server > /opt/gopath/src/github.com/Root-man/kyc-chaincode/cert (from $GOPATH) ```

mmulji (Wed, 10 Jul 2019 14:04:17 GMT):
Has joined the channel.

muralisr (Wed, 10 Jul 2019 17:32:07 GMT):
@donjohnny yes, https://gerrit.hyperledger.org/r/#/c/fabric/+/30990/ batch of CRs implement https://jira.hyperledger.org/browse/FAB-13582 and offer a radical alternative to current chaincode "launch" model where the fabric no longer manages the chaincode container launch.

muralisr (Wed, 10 Jul 2019 17:36:10 GMT):
@Root-man I haven't tried to deploy chaincodes with go-module dependencies,,, but I suspect that wont work (interesting coincidence... these are the kinds of things the above mentioned work in the CR batch https://gerrit.hyperledger.org/r/#/c/fabric/+/30990/ helps)

DeeptimanPattnaik (Wed, 10 Jul 2019 23:36:51 GMT):
how to add collection config in Fabric SDK Go?

DeeptimanPattnaik (Thu, 11 Jul 2019 00:09:39 GMT):
asked at stackoverflow : https://stackoverflow.com/questions/56980085/how-to-add-collection-config-in-fabric-sdk-go please check and kindly suggest me solution

mahoney1 (Thu, 11 Jul 2019 09:19:25 GMT):
hi, I've answered the S/O: basically the tutorial steps at https://hyperledger-fabric.readthedocs.io/en/release-1.4/private_data_tutorial.html#instantiate-the-chaincode-on-the-channel should help you

donjohnny (Thu, 11 Jul 2019 10:14:55 GMT):
Dear community, currently Fabric does not comply to security rules due to the way chaincode containers are created. There is a change to free the chaincode from the peer (see https://gerrit.hyperledger.org/r/#/c/fabric/+/30990/), would it be possible to add support for Java CC?

heenas06 (Thu, 11 Jul 2019 10:35:10 GMT):
Has joined the channel.

mahoney1 (Thu, 11 Jul 2019 10:39:03 GMT):
hi, I've answered the S/O FYI

mahoney1 (Thu, 11 Jul 2019 10:40:02 GMT):
hi, I've answered the S/O fyi

mahoney1 (Thu, 11 Jul 2019 11:51:51 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

DeeptimanPattnaik (Thu, 11 Jul 2019 15:55:29 GMT):
Thanks, i have checked , and it really worked

muralisr (Fri, 12 Jul 2019 11:18:25 GMT):
@donjohnny initial support is for GO ... will look into it to check what it;d take to add the support

RyanOuyang (Fri, 12 Jul 2019 15:53:22 GMT):
Has joined the channel.

RyanOuyang (Fri, 12 Jul 2019 15:53:23 GMT):
Hey everyone! I'm wondering how I would be able to recreate the private data hashes that are located in the "collection_hashed_rwset" that can be seen when a block is decoded to JSON. I know this is a hashed version of the private data read write set, but what does that set look like? Does anyone have a example of data written + hash stored in the block? In my case, I am using couchDB private collections and Fabric 1.4. Thanks all!

RyanOuyang (Fri, 12 Jul 2019 15:56:42 GMT):
there's the "hashed_rwset", as well as the "pvt_rwset_hash" - If anyone could explain the difference and/or how to recreate these let me know!

Psingh (Fri, 12 Jul 2019 16:03:40 GMT):
Has joined the channel.

PMoura (Fri, 12 Jul 2019 17:10:06 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

PMoura (Fri, 12 Jul 2019 17:10:06 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

invaliduser (Sat, 13 Jul 2019 13:28:09 GMT):
Has joined the channel.

PMoura (Sat, 13 Jul 2019 18:13:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=TEpEghxm7mQsobyaX) 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.

krabradosty (Sun, 14 Jul 2019 12:18:44 GMT):
Hello folks. Sometimes my chaincodes containers fail with error: ``` fatal error: concurrent map writes ``` Full log output: https://pastebin.com/Bhh4a6T9 Any ideas what can cause this problem?

mastersingh24 (Sun, 14 Jul 2019 23:17:20 GMT):
hard to debug w/o seeing your actual chaincode itself, but are you trying to change the log level in multiple places?

Jelle.Diet (Mon, 15 Jul 2019 07:48:58 GMT):
Has joined the channel.

Jelle.Diet (Mon, 15 Jul 2019 07:48:59 GMT):
I'm trying to use private data with a collections config json file, but when trying to install the file I get the error : Error upgrading smart contract: Invalid policy, missing the "identities" property. My policy looks like this: "policy": "OR('Org1MSP.member')". Is there something I'm missing? Does member need to be defined somewhere in the network? All the examples seem to use this .member property without issues

MatteoLinear (Mon, 15 Jul 2019 07:53:01 GMT):
Has joined the channel.

florianc (Mon, 15 Jul 2019 08:01:52 GMT):
According to this documentation (https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html), you are missing quite a lot in your policies.

Jelle.Diet (Mon, 15 Jul 2019 08:09:53 GMT):
That did the trick thank you, I must have been looking at outdated documentation

donjohnny (Mon, 15 Jul 2019 11:51:57 GMT):
Thanks a lot, keep me posted please!

SilambarasanMadhappan (Tue, 16 Jul 2019 04:01:23 GMT):
Has joined the channel.

SilambarasanMadhappan (Tue, 16 Jul 2019 04:01:27 GMT):
Hi ..

SilambarasanMadhappan (Tue, 16 Jul 2019 04:01:52 GMT):
Am getting below error while issuing npm install for fabcar example

SilambarasanMadhappan (Tue, 16 Jul 2019 04:01:57 GMT):
pls help me on this

SilambarasanMadhappan (Tue, 16 Jul 2019 04:02:07 GMT):
root@adcubuntu:/usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript# npm install npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. > @ampretia/x509@0.4.0 install /usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript/node_modules/@ampretia/x509 > node-gyp rebuild make: Entering directory '/usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript/node_modules/@ampretia/x509/build' CXX(target) Release/obj.target/x509/src/addon.o In file included from ../include/x509.h:6:0, from ../src/addon.cc:5: ../../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local)’: ../../../nan/nan.h:1081:101: error: no matching function for call to ‘v8::String::WriteUtf8(v8::Isolate*, char*&, int, int, const int&)’ length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_, static_cast(len), 0, flags); ^ In file included from /root/.node-gyp/10.5.0/include/node/node.h:63:0, from ../include/addon.h:4, from ../src/addon.cc:4: /root/.node-gyp/10.5.0/include/node/v8.h:2622:7: note: candidate: int v8::String::WriteUtf8(char*, int, int*, int) const int WriteUtf8(char* buffer, ^ /root/.node-gyp/10.5.0/include/node/v8.h:2622:7: note: candidate expects 4 arguments, 5 provided x509.target.mk:102: recipe for target 'Release/obj.target/x509/src/addon.o' failed make: *** [Release/obj.target/x509/src/addon.o] Error 1 make: Leaving directory '/usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript/node_modules/@ampretia/x509/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Linux 4.4.0-134-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript/node_modules/@ampretia/x509 gyp ERR! node -v v10.5.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN fabcar@1.0.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ampretia/x509@0.4.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ampretia/x509@0.4.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: npm ERR! /root/.npm/_logs/2019-07-16T03_38_50_004Z-debug.log root@adcubuntu:/usr/local/fabric/fabric-samples-release-1.4/chaincode/fabcar/javascript#

mahoney1 (Tue, 16 Jul 2019 10:36:07 GMT):
are you using Fabric 1.4 docker images (per `docker ps`) or earlier ? Also, would advise to use the supported Node/npm levels for H/L Fabric see https://hyperledger-fabric.readthedocs.io/en/release-1.4/prereqs.html#node-js-runtime-and-npm and as a non-root user (npm advisory, see last 2 answers [here](https://stackoverflow.com/questions/4938592/how-why-does-npm-recommend-not-running-as-root))

AjayKalola (Wed, 17 Jul 2019 02:52:47 GMT):
Has joined the channel.

hengfun (Wed, 17 Jul 2019 07:03:42 GMT):
hengfun

Javi (Wed, 17 Jul 2019 07:15:04 GMT):
Hi everyone! how I can re-deploy a chaincode container after a peer restart? I'm trying to instantiate again, but it fails, maybe I need to update it instead of instantiate?

Javi (Wed, 17 Jul 2019 07:15:51 GMT):
should the chaincode container be re-deployed when a peer is restarted? for me, its the expected behavior

davidkel (Wed, 17 Jul 2019 07:48:42 GMT):
When you send a proposal to that peer it will start the chaincode container if it's not already started.

Javi (Wed, 17 Jul 2019 09:34:07 GMT):
ok, thanks!

theDweeb (Wed, 17 Jul 2019 12:06:33 GMT):
Has joined the channel.

muralisr (Wed, 17 Jul 2019 12:37:45 GMT):
@Javi to add to @davidkel response, instantiate is a one time operation to get the chaincode registerd on the channel in question. You cannot use that to "restart" the container... if that was the intent

Utsav_Solanki (Thu, 18 Jul 2019 13:55:43 GMT):
Has joined the channel.

Utsav_Solanki (Thu, 18 Jul 2019 13:55:44 GMT):
why every time HLF chaincode upgrade create new docker container, any idea / suggestion ?

Utsav_Solanki (Thu, 18 Jul 2019 13:55:44 GMT):
i found this warninig in HLF fabric peer0 docker logs [UTC [gossip.comm] createConnection -> WARN 89eddsc Remote endpoint claims to be a different peer, expected djslkflsdfndskjfla but got fnldfnsdfnlsdf ] , can any one have solution / idea for why its happening

florianc (Thu, 18 Jul 2019 14:09:18 GMT):
I asked this question once. If I remember well, it is because the peer might be using the previous version of the chaincode on another channel.

rhall9090 (Thu, 18 Jul 2019 14:09:49 GMT):
Does anyone have experience with chaincode scanning tools? Something that would look for security vulnerabilities on HLF chaincode files

Utsav_Solanki (Thu, 18 Jul 2019 14:10:44 GMT):
ohh i got, thank you

Utsav_Solanki (Thu, 18 Jul 2019 14:12:36 GMT):
exact peer logs are 2019-07-15 11:29:06.186 UTC [gossip.comm] createConnection -> WARN 16e4f6 Remote endpoint claims to be a different peer, expected asdsafsdfdf6dfs6cb6f809ae3436 but got 4d1f0f020429089928b5f36f5c7e1b9fc19b23f521aaa6161f33c7be4a0f5c53 2019-07-15 11:29:06.186 UTC [gossip.comm] sendToEndpoint -> WARN 16e4f7 Failed obtaining connection for ip:port, PKIid:asdsafsdfdf6dfs6cb6f809ae3436 reason: authentication failure 2019-07-15 11:29:06.186 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4f8 Entering [asdsafsdfdf6dfs6cb6f809ae3436] 2019-07-15 11:29:06.186 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4f9 Closing connection to Endpoint: ip:port, InternalEndpoint: , PKI-ID: asdsafsdfdf6dfs6cb6f809ae3436, Metadata: 2019-07-15 11:29:06.187 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4fb Exiting

Utsav_Solanki (Thu, 18 Jul 2019 14:12:48 GMT):
does peers change their certificate automatically because NONE OF KEY / CERTS I AM USING AS PKIid:asdsafsdfdf6dfs6cb6f809ae3436 and Entering [1bc2a17b1e8b6fa32311c9b5fce3255cb6f809ae34365bf25a1391bd277cff0b] BUT STILL IN LOGS ITS COMING THESE PKI AND ENTERING

Utsav_Solanki (Thu, 18 Jul 2019 14:14:01 GMT):
i found this warninig in HLF fabric peer0 docker logs [UTC [gossip.comm] createConnection -> WARN 89eddsc Remote endpoint claims to be a different peer, expected djslkflsdfndskjfla but got fnldfnsdfnlsdf ] , can any one have solution / idea for why its happening

Utsav_Solanki (Thu, 18 Jul 2019 14:15:04 GMT):
i got thank you

Utsav_Solanki (Thu, 18 Jul 2019 14:15:50 GMT):
exact peer logs are 2019-07-15 11:29:06.186 UTC [gossip.comm] createConnection -> WARN 16e4f6 Remote endpoint claims to be a different peer, expected asdsafsdfdf6dfs6cb6f809ae3436 but got 4d1f0f020429089928b5f36f5c7e1b9fc19b23f521aaa6161f33c7be4a0f5c53 2019-07-15 11:29:06.186 UTC [gossip.comm] sendToEndpoint -> WARN 16e4f7 Failed obtaining connection for ip:port, PKIid:asdsafsdfdf6dfs6cb6f809ae3436 reason: authentication failure 2019-07-15 11:29:06.186 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4f8 Entering [asdsafsdfdf6dfs6cb6f809ae3436] 2019-07-15 11:29:06.186 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4f9 Closing connection to Endpoint: ip:port, InternalEndpoint: , PKI-ID: asdsafsdfdf6dfs6cb6f809ae3436, Metadata: 2019-07-15 11:29:06.187 UTC [gossip.discovery] expireDeadMembers -> WARN 16e4fb Exiting

SatheeshNehru (Mon, 22 Jul 2019 07:56:49 GMT):
Has joined the channel.

SatheeshNehru (Mon, 22 Jul 2019 07:59:04 GMT):
what is the purpose of chaincode container when chaincode is instantiated on peers?

mahoney1 (Mon, 22 Jul 2019 10:00:33 GMT):
generally speaking, the purpose of the chaincode container is to ensure isolation of the smart contract's execution from the peer itself, so that a smart contract (chaincode) cannot crash or even access the peer because of an error or malicious code (Chaincode runs in a secured container isolated from the endorsing peer process). An `instantiate` transaction invokes the lifecycle System Chaincode (LSCC) to create and initialize a chaincode on a channel. This is a chaincode-channel binding process: a chaincode may be bound to any number of channels and operate on each channel individually and independently.

akoenig (Mon, 22 Jul 2019 13:10:58 GMT):
Hi, is there a way to dynamicly change the endorsment of a chaincode? For example: We have 4 Orgs in one channel. One time we need the endorsment of company 1 AND 2 because they are doing something together. In the next time we want to get sure the endormsent is with company 3 and 4

akoenig (Mon, 22 Jul 2019 13:27:18 GMT):
Or do we have to create a new channel for each combination of the orgs?

rthatcher (Mon, 22 Jul 2019 13:43:55 GMT):
Using separate channels gives isolation to use a separate "chaincode-level endorsement policy", and if set up correctly it is also a security isolation. So this is appropriate for some use-cases. The "Chaincode-level endorsement policy" can't be changed other than by upgrading the chaincode but there is a feature for "key-level endorsement" which may help you. https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html (I don't think it is much used so check it out in detail before committing too many project resources to it)

akoenig (Mon, 22 Jul 2019 13:53:00 GMT):
Hm okay, this could be helpfull... I will have a look there

akoenig (Mon, 22 Jul 2019 13:53:00 GMT):
Hm okay, this could be helpfull... I will have a look there. It seems not so generic, but maybe it could do the thing. Because all combinations of orgs used in a different channel would be to much.

SatheeshNehru (Tue, 23 Jul 2019 05:20:31 GMT):
where will be the chaincode located in chaincode container?

mahoney1 (Tue, 23 Jul 2019 09:36:12 GMT):
usually somewhere like `/var/hyperledger/production/chaincodes` - see https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html?highlight=chaincodes#stop-and-start

ownspies (Tue, 23 Jul 2019 15:20:46 GMT):
Has joined the channel.

javapriyan (Wed, 24 Jul 2019 08:17:36 GMT):
I am basically looking to find the reference of an ID in my chaincode. Is there a way to see whether if a document exists for given composite key w/o getting the whole doc using the getstate API ?

dimkouv (Wed, 24 Jul 2019 08:51:52 GMT):
Has joined the channel.

MatteoLinear (Wed, 24 Jul 2019 10:20:10 GMT):
Is there a way for an endorse policy to be only for a specific function instead of all the chaincode?

rthatcher (Wed, 24 Jul 2019 10:36:04 GMT):
I've only seen getState used to verify the existence of a key. (Queries also return the whole doc)

javapriyan (Wed, 24 Jul 2019 10:38:57 GMT):
You can have one for key level

javapriyan (Wed, 24 Jul 2019 10:38:57 GMT):
You can have one at the key level

javapriyan (Wed, 24 Jul 2019 10:40:12 GMT):
refer here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/endorsement-policies.html#setting-key-level-endorsement-policies

rthatcher (Wed, 24 Jul 2019 10:40:24 GMT):
Endorsement Policies policies apply to the whole Smart Contract (chaincode) - but also see this thread from a couple of days ago: https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=2KXcy8XnacYyy8PqP

javapriyan (Wed, 24 Jul 2019 10:43:20 GMT):
@akoenig I am curious to know the use case of such endorsement policy. Why would you do that ? Can you brief it ?

Javi (Wed, 24 Jul 2019 11:36:17 GMT):
hi all, I'm reading this article https://medium.com/@jushuspace/hyperledger-fabric-couchdb-security-risk-7210664fb244

Javi (Wed, 24 Jul 2019 11:36:52 GMT):
how this is possible? I think that no endorsment policy is applied to the chaincode

Javi (Wed, 24 Jul 2019 11:37:19 GMT):
and if no endorsment policy exists, then we can maipulate data, is this correct?

MatteoLinear (Wed, 24 Jul 2019 14:24:06 GMT):
For example in my case, i have a function that can be invoked only by peer0 and another that can be invoked only by peer1(same organization for simplicity)

sanket1211 (Thu, 25 Jul 2019 07:12:17 GMT):
instantiate proposal resulted in an error :: Error: transaction returned with failure: Expecting integer value for asset holding

sanket1211 (Thu, 25 Jul 2019 07:12:34 GMT):
2019-07-25 07:07:10.935 UTC [endorser] SimulateProposal -> ERRO 057 [mychannel][e7e399c4] failed to invoke chaincode name:"lscc" , error: transaction returned with failure: Expecting integer value for asset holding github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:266 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:234 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:183 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500 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/core/comm.(*Throttle).UnaryServerIntercptor /opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54 github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor-fm /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:228 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/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

sanket1211 (Thu, 25 Jul 2019 07:12:55 GMT):
could u plz try to rectify this error???

sanket1211 (Thu, 25 Jul 2019 07:20:49 GMT):
Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: failed to execute transaction 19fc3d2ded9c3199191e56e2a652cbc6e70a4c1e7f67fe621609ad4c01409960: error sending: timeout expired while executing transaction

mahoney1 (Thu, 25 Jul 2019 14:31:45 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

bereal (Fri, 26 Jul 2019 06:02:12 GMT):
Has joined the channel.

bereal (Fri, 26 Jul 2019 06:02:14 GMT):
Hi, trying to write chaincode in TypeScript for a change, it fails to import `fabric-contract-api` (works in JS). Do I miss any extra step?

bereal (Fri, 26 Jul 2019 06:02:21 GMT):
`src/main.ts(1,39): error TS2307: Cannot find module 'fabric-contract-api'.`

bereal (Fri, 26 Jul 2019 07:31:02 GMT):
(Ok, adding `fabric-contract-api` and `fabric-shim` to the `tsconfig.json` types helped.)

ShefaliMittal (Fri, 26 Jul 2019 07:55:31 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:35:47 GMT):
Has joined the channel.

bereal (Fri, 26 Jul 2019 11:48:45 GMT):
When I instantiate a contract-based chaincode (`{"start": "fabric-chaincode-node start"}`), instantiation times out, and the logs in the chaincode container say that `fabric-chaincode-node` is not found. `fabric-shim` is in `package.json`. What's wrong?

Raumo0 (Fri, 26 Jul 2019 12:05:15 GMT):
Is it possible to make methods private so that they can only be called from other methods? Also, is it possible to somehow limit the chaincode, where can this method be called from?

Raumo0 (Fri, 26 Jul 2019 12:05:15 GMT):
Is it possible to make methods private so that they can only be called from other methods? Also, is it possible to somehow limit the chaincode, where can this method be called from? I need to implement logic in which one chaincode can cause a method of the current chaincode, and the second chaincode cannot.

mahoney1 (Fri, 26 Jul 2019 15:05:55 GMT):
depends on which language to an extent, eg private functions in the chaincode can be defined in Typescript, Java etc. On 'calling chaincode' see the discussion [here](https://stackoverflow.com/questions/51782788/get-chaincode-caller-id-from-the-function-invokechaincode-in-hyperledger-fabri)

mahoney1 (Fri, 26 Jul 2019 15:07:04 GMT):
depends on which language to an extent, eg private functions in the chaincode can be defined in Typescript, Java etc. On 'calling chaincode' see the discussion [here](https://stackoverflow.com/questions/51782788/get-chaincode-caller-id-from-the-function-invokechaincode-in-hyperledger-fabri)

mahoney1 (Fri, 26 Jul 2019 15:09:44 GMT):
difficult to know, might suggest to post to Stack Overflow (env, node version, package.json, Fabric version used, docker ps -a, logs, whether behind a network proxy etc etc. What happens if you try to install a fabric sample eg. [here](https://github.com/hyperledger/fabric-samples/blob/release-1.4/commercial-paper/organization/magnetocorp/contract/package.json) does that fail too?

mahoney1 (Fri, 26 Jul 2019 15:11:14 GMT):
see this thread for resp FYI https://chat.hyperledger.org/channel/fabric-sdk-node?msg=gnM7JxP6awcK9dpFN

Tfabric (Fri, 26 Jul 2019 16:22:06 GMT):
Hi I am trying to instantiate chaincode on a channel but geeting error `could not assemble transaction, err proposal response was not successfull error code 500 msg chaincode registration failed`

Tfabric (Fri, 26 Jul 2019 16:22:10 GMT):
please help

javapriyan (Sat, 27 Jul 2019 15:09:15 GMT):
@Tfabric Try this: https://stackoverflow.com/questions/56226062/hyperledger-fabric-error-could-not-assemble-transaction-msg-chaincode-regist Please provide appropriate system config and scenarios so that community can give your a quick response the issue.

hengfun (Sun, 28 Jul 2019 10:23:08 GMT):
Hi all does anyone know how to change to fabric orderer to the BFT orderer?

muralisr (Sun, 28 Jul 2019 13:46:00 GMT):
@hengfun fabric doesn't support BFT yet.

Abrara (Mon, 29 Jul 2019 08:57:58 GMT):
Hello, I developed a chaincode using [cid](https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid) but to make it work I had to vendor stuff. I did it quick and dirty by copying all the fabric directory, but **what is the good way of doing it**? Right now my vendor is 106MB which is not really acceptable. TIA

deepaks (Mon, 29 Jul 2019 14:40:42 GMT):
Hi everyone, Can anyone please suggest how to change fabric config on the fly without restarting the service?

dijaa (Mon, 29 Jul 2019 15:33:47 GMT):
Has joined the channel.

dijaa (Mon, 29 Jul 2019 15:33:51 GMT):
Can anyone here plz, tell me how can i install my chancode with node not go?

Tfabric (Mon, 29 Jul 2019 16:17:16 GMT):
Thanks

javapriyan (Mon, 29 Jul 2019 17:11:29 GMT):
You can mention the -l node flag

javapriyan (Mon, 29 Jul 2019 17:19:41 GMT):
@Abrara Longback I came across this post. This might be helpful. https://stackoverflow.com/questions/50126581/why-does-hyperledger-fabric-install-chaincode-by-compiling-source-code-rather-th If you come across different thoughts/ opinions please enlighten me

Tfabric (Mon, 29 Jul 2019 17:45:11 GMT):
Following advise from @javapriyan , I am still having same problem. I am following instreuctions from https://hyperledger-fabric.readthedocs.io/en/v1.0.5/build_network.html and created a network with `.sh` file. But the manually installing and instantiating chaincode(remove installation and instantiation code from `./byfn.sh` file)

dijaa (Mon, 29 Jul 2019 19:25:59 GMT):
i mention it but still the problem of path

cody588 (Tue, 30 Jul 2019 07:12:34 GMT):
Has joined the channel.

tballast (Tue, 30 Jul 2019 07:34:39 GMT):
What is the problem with the path? Make sure that the path you are giving it lines up with the path of the chaincode inside the container.

Abrara (Tue, 30 Jul 2019 08:38:49 GMT):
Mmh, that's interesting, but doesn't really delve into the vendor problem I have.

Psingh (Tue, 30 Jul 2019 09:20:55 GMT):
Can anyone plese help me with below question? https://stackoverflow.com/questions/57267647/getting-runtime-error-invalid-memory-address-or-nil-pointer-dereference-when

javapriyan (Tue, 30 Jul 2019 09:35:54 GMT):
HI @Tfabric , #1 This is the latest doc: https://hyperledger-fabric.readthedocs.io/en/release-1.4/ #2 Your system configs ? #3 What is your fabric versions ? #3 Further logs from chaincode containers would be helpful.

dijaa (Tue, 30 Jul 2019 10:47:02 GMT):
Yeah the path is the same and it's correct, but the error still

dijaa (Tue, 30 Jul 2019 11:32:14 GMT):
Error: error getting chaincode code fabtrans: path to chaincode does not exist: github.com/chaincode/fabcar/javascript/lib

dijaa (Tue, 30 Jul 2019 11:32:55 GMT):
i run this command: peer chaincode install -n fabtrans -v 1.0 -l node -p github.com/chaincode/fabcar/javascript/lib

dijaa (Tue, 30 Jul 2019 11:34:20 GMT):
the chaincode in my file system is on: /home/projet/fabric-proj/chaincode/fabcar/javascript/lib

dijaa (Tue, 30 Jul 2019 11:34:20 GMT):
when i run this command: CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.network.com/users/Admin@org2.network.com/msp CORE_PEER_ADDRESS=peer0.org2.network.com:9051 CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.network.com/peers/peer0.org2.network.com/tls/ca.crt peer chaincode instantiate -o orderer.network.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/network.com/orderers/orderer.network.com/msp/tlscacerts/tlsca.network.com-cert.pem -C $CHANNEL_NAME -n fabtrans -v 1.0 -l node -c '{"Args":[""]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" i get that error:Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 254

mahoney1 (Tue, 30 Jul 2019 12:14:30 GMT):
suggest to check out the `fabcar` sample https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/startFabric.sh#L23 or check out the docs https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html?highlight=peer%20chaincode%20install#installing-chaincode - another possibility is to use the [IBP VS Code extension](https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform) to manage your chaincode installs / instantiation if you want it for a dev environment etc.

tballast (Tue, 30 Jul 2019 12:16:55 GMT):
@dijaa have you tried using the whole path, and not just a relative one? Also, make sure that the path is relevant to the container it's running in. Like, maybe on your filesystem it's in /home/proj... however, in the container it might be something like /opt/gopath/github.com...

dijaa (Tue, 30 Jul 2019 13:43:11 GMT):
Can anyone tell me how to fiw that error, i got it when i run this command: peer chaincode instantiate -o orderer.network.com:7050 -n fabtrans -v 0 -l node -c '{"Args":[""]}' -C mychannel3 :Error: could not assemble transaction, err proposal response was not successful, error code 500, msg cannot get package for chaincode (fabtrans:0)

ibanfi (Tue, 30 Jul 2019 15:37:35 GMT):
Has joined the channel.

ibanfi (Tue, 30 Jul 2019 15:38:30 GMT):
@dijaa did you try to instantiate your chaincode WITHOUT the -l node parameter?

ibanfi (Tue, 30 Jul 2019 15:38:30 GMT):
@dijaa did you try to instantiate your chaincode WITHOUT the -l node parameter? It can be problem, you have an instantiated chaincode in go (by default) and it has't been reinstantiated in node even you set the -l node switch.

dijaa (Tue, 30 Jul 2019 17:12:53 GMT):
Hi, when i run this command: CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.network.com/users/Admin@org2.network.com/msp CORE_PEER_ADDRESS=peer0.org2.network.com:9051 CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.network.com/peers/peer0.org2.network.com/tls/ca.crt peer chaincode instantiate -o orderer.network.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/network.com/orderers/orderer.network.com/msp/tlscacerts/tlsca.network.com-cert.pem -C $CHANNEL_NAME -n fabtrans -v 1.0 -l node -c '{"Args":[""]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" i get that error:Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 254

dijaa (Tue, 30 Jul 2019 17:13:07 GMT):
Can anyone tell me how to fix it plz

liuqi (Wed, 31 Jul 2019 03:01:45 GMT):
Has joined the channel.

liuqi (Wed, 31 Jul 2019 03:01:46 GMT):
Hi, everyone ! Is there any documentation or suggestions for developing java chaincode ?

YashGupta (Wed, 31 Jul 2019 07:09:08 GMT):
Has joined the channel.

YashGupta (Wed, 31 Jul 2019 07:09:09 GMT):
Hey, I am getting "ENDORSEMENT_POLICY_FAILURE" while committing concurrent transactions. And if I commit transaction one by one they are committing successfully. can anybody help me, why I am getting this error.

metadata (Wed, 31 Jul 2019 08:24:13 GMT):
Has joined the channel.

ibanfi (Wed, 31 Jul 2019 08:55:01 GMT):
Hi all, I try to call a chaincode method from chaincode. The channel is the same but different contract. I use this: `await ctx.stub.invokeChaincode("pps", ["transfer", JSON.stringify(_txn01)], "");` However I cannot reach the method itself, I got a message: ``` Error: INVOKE_CHAINCODE failed: transaction ID: c248368119783e9fb6349eac523cb797ab6cf2d0a696cc6270c9a7cb671d5ac7: execute failed: error sending: txid: c248368119783e9fb6349eac523cb797ab6cf2d0a696cc6270c9a7cb671d5ac7(general) exists ```

dijaa (Wed, 31 Jul 2019 10:08:19 GMT):
Can anyone know how to solve this error:Error: could not assemble transaction, err proposal response was not successful, error code 500, msg transaction returned with failure: Error: You've asked to invoke a function that does not exist:

Rajatsharma (Wed, 31 Jul 2019 10:48:50 GMT):
Can we create test files for a chaincode, if we're creating chaincode in golang,

Rajatsharma (Wed, 31 Jul 2019 10:49:19 GMT):
My chaincode is really very big and I need a way to test it.

javapriyan (Wed, 31 Jul 2019 14:03:45 GMT):
Yes you can. Make use of stub.MokeInvoke API. Please check this reference: https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/mockstub.go#L136

javapriyan (Wed, 31 Jul 2019 14:05:04 GMT):
Yes you can. Make use of stub.mockInvoke API refer this: https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/mockstub.go#L136

javapriyan (Wed, 31 Jul 2019 14:06:09 GMT):
It is obvious you are trying to invoke a wrong method as the error says, Kindly check your input

javapriyan (Wed, 31 Jul 2019 14:08:53 GMT):
Parallel transactions

Tfabric (Wed, 31 Jul 2019 14:27:45 GMT):
Thanks,

Tfabric (Wed, 31 Jul 2019 14:28:06 GMT):
Thanks 1. I have used this same version 2. I am installing on ubuntu

Tfabric (Wed, 31 Jul 2019 14:28:45 GMT):
ubuntu 18.04

mbwhite (Wed, 31 Jul 2019 15:48:34 GMT):
Indeed I just posted this...

mbwhite (Wed, 31 Jul 2019 15:48:34 GMT):
Indeed I just posted this... http://proterra.me.uk/nx01/programming/2019/07/31/201/

mbwhite (Wed, 31 Jul 2019 15:48:34 GMT):
http://proterra.me.uk/nx01/programming/2019/07/31/201/

mbwhite (Wed, 31 Jul 2019 15:48:34 GMT):
Hello; the updated programming model for Contracts was released in Node.js earlier this year... to announce that it's also in Java http://proterra.me.uk/nx01/programming/2019/07/31/201/

Rajatsharma (Thu, 01 Aug 2019 09:45:09 GMT):
I've created a system chaincode can I manage logging level for the logger of my system chaincode: my chaincode ``` var logger = shim.NewLogger("myscc") func (cc *SCC) Init(stub shim.ChaincodeStubInterface) pb.Response { logger.Infof("Init infof") logger.Info("Init infof") logger.Debugf("Init debugf") logger.Noticef("Init Noticef") logger.Warningf("Init Warning") logger.Criticalf("Init CRIC") return shim.Success(nil) } ``` I've tried many things but only I get in logs ``` 2019-08-01 09:39:55.437 UTC [myscc] Infof -> INFO 03d Init infof 2019-08-01 09:39:55.437 UTC [myscc] Info -> INFO 03e Init infof 2019-08-01 09:39:55.437 UTC [myscc] Noticef -> NOTI 03f Init Noticef 2019-08-01 09:39:55.437 UTC [myscc] Warningf -> WARN 040 Init Warning 2019-08-01 09:39:55.437 UTC [myscc] Criticalf -> CRIT 041 Init CRIC ```

ianco (Thu, 01 Aug 2019 20:23:45 GMT):
Has left the channel.

dijaa (Sat, 03 Aug 2019 13:55:47 GMT):
Hi, Can anyone tell me plz how to fix that issue: i have the status of containers of my two peers "exited"

hectordufau (Mon, 05 Aug 2019 01:30:09 GMT):
Has joined the channel.

mania06 (Mon, 05 Aug 2019 09:22:57 GMT):
Has joined the channel.

mania06 (Mon, 05 Aug 2019 09:23:00 GMT):
Hello, i'm trying to instantiate a NodeJS chaincode which use the `Contract` class of `fabric-contract-api`. It is installed correctly but at instantiation, i get this error: ```Error: transaction returned with failure: Error: You've asked to invoke a function that does not exist: init ``` I understand it tries to call an `Init` method on my contract but there isn't any. Shouldn't the `Contract` class of `fabric-contract-api` have an `Init` function, just like the `Chaincode` one ? I suppose i'm exepected to implement one ? Or is there a way to not call anything at instantiate time ?

sstone1 (Mon, 05 Aug 2019 09:56:23 GMT):
@mania06 how are you calling instantiate?

sstone1 (Mon, 05 Aug 2019 09:56:32 GMT):
are you using one of the SDKs, or the CLI?

mania06 (Mon, 05 Aug 2019 10:00:45 GMT):
I'm using the node sdk

mania06 (Mon, 05 Aug 2019 10:00:45 GMT):
I'm using the Node sdk

mania06 (Mon, 05 Aug 2019 10:00:45 GMT):
I'm using the Node SDK

sstone1 (Mon, 05 Aug 2019 10:06:05 GMT):
https://fabric-sdk-node.github.io/release-1.4/global.html#ChaincodeInstantiateUpgradeRequest

sstone1 (Mon, 05 Aug 2019 10:06:18 GMT):
pass in an `fcn` of `null`

sstone1 (Mon, 05 Aug 2019 10:06:27 GMT):
then nothing will get called at instantiate time

sstone1 (Mon, 05 Aug 2019 10:06:57 GMT):
if you want to call something at instantiate time, define a function with any name in your contract (e.g. `initLedger`), and pass in the name via `fcn`

mania06 (Mon, 05 Aug 2019 10:10:05 GMT):
Oh, thanks !

dijaa (Mon, 05 Aug 2019 10:47:14 GMT):
Hello, did anyone know how to fixe that error:Failed to enroll admin user "admin": TypeError: Cannot read property 'url' of undefined

dijaa (Mon, 05 Aug 2019 10:48:45 GMT):
sorry this: Failed to enroll admin user "admin": Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]

mahoney1 (Mon, 05 Aug 2019 11:35:40 GMT):
need more info: are you using the [Fabcar](https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/javascript/enrollAdmin.js) sample or following a tutorial? Have you got a Fabric up and running (check using `docker ps`)

mania06 (Mon, 05 Aug 2019 12:05:42 GMT):
On a side note @sstone1 , with strict Typescript typing, fcn cannot be `null`. The only way for me to make it work is to use an empty string

dijaa (Mon, 05 Aug 2019 12:41:44 GMT):
it's fabcar example, yes all the containers are running

sstone1 (Mon, 05 Aug 2019 12:57:49 GMT):
doh, will raise a JIRA for that!

sstone1 (Mon, 05 Aug 2019 12:59:14 GMT):
https://jira.hyperledger.org/browse/FABN-1338

mahoney1 (Mon, 05 Aug 2019 13:34:57 GMT):
@dijaa - at first glance it seems it can't resolve the CA node, suggest to raise a Stack Overflow posting there the output of `docker ps`, `docker logs <_CA container id_>` - as well as your node/npm version, steps leading up to the point of error. In 1.4 FYI Fabcar now uses the BYFN `first-network` and looks for the Org1 CA in the corresponding connection profile `connection-org1.json`

rokoko (Wed, 07 Aug 2019 05:24:59 GMT):
Has joined the channel.

rokoko (Wed, 07 Aug 2019 05:25:01 GMT):
I was using the javascript (high level api) to write chaincodes. I wanted to call one function from another function in the same chaincode. When in the chaincode I call *getCars* from *getDates*, I get this error `Error: endorsement failure during invoke. response: status:500 message:"transaction returned with failure: ReferenceError: getCars is not defined`. Anyone here has seen the error?

rokoko (Wed, 07 Aug 2019 05:28:21 GMT):
Even though, getCars works fine individually. I cannot call it from another function, It seems.

rokoko (Wed, 07 Aug 2019 05:40:27 GMT):
Can I call one of my contract function inside other function of same contact , like I have two function getproductstatus and queryproduct i

davidkel (Wed, 07 Aug 2019 06:19:27 GMT):
@rokoko if you want to call another transaction function then you would do something like ``` await this.getCars(); ``` the getCars is a method on the contract object

Utsav_Solanki (Wed, 07 Aug 2019 06:22:28 GMT):
in CLI TOOL i am doing like this peer chaincode instantiate -o ORDERER_NAME:7050 -C abc -n new opt/github,com -v v0 -l node -c '{"Args":[]}' -P "OR('Org1MSP.member', 'Org2MSP.member')" --cafile ORDERER_CA 2019-08-07 04:51:19.985 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-08-07 04:51:19.985 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 i got this error

rokoko (Wed, 07 Aug 2019 07:14:58 GMT):
Thanks a lot. It works.

javapriyan (Wed, 07 Aug 2019 07:15:23 GMT):
@Utsav_Solanki Can check the peer logs for more information ?

javapriyan (Wed, 07 Aug 2019 07:15:57 GMT):
btw, ```opt/github,com ``` isn't it suppose to opt/github.com - dot com ?

hanubc7743 (Wed, 07 Aug 2019 09:13:05 GMT):
Has joined the channel.

rthatcher (Wed, 07 Aug 2019 10:40:48 GMT):
(Assuming the `install` command worked OK?) looking at this part `-n new opt/github,com` "new" is the name and " opt/github,com" looks like a typo left over from the install command.

rthatcher (Wed, 07 Aug 2019 10:40:48 GMT):
(Assuming the `install` command worked OK?) looking at this part `-n new opt/github,com` "new" is the name and " opt/github,com" looks like a typo left over from the install command. You can use this command to check that the install was OK and that you have the right name and version: `peer chaincode list --installed`

jambonrose (Wed, 07 Aug 2019 15:46:59 GMT):
Has joined the channel.

mahoney1 (Wed, 07 Aug 2019 17:25:57 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

paranjan (Thu, 08 Aug 2019 15:13:06 GMT):
Has joined the channel.

AlbertCL (Fri, 09 Aug 2019 07:14:49 GMT):
Hi! I want to use fabric-samples to test my chaincodes, but I have a problem: - Download fabric-samples - cd chaincode-docker-devmode - docker-compose -f docker-compose-simple.yaml up All nodes start correctly but peer throws: fatal error: unexpected signal during runtime execution and a long log with different goroutines like: goroutine 211 [syscall] I have to configure something to start correctly the environment?

yeousunn (Fri, 09 Aug 2019 09:13:36 GMT):
Is there a way to get all the function names written in a chaincode?

Abrara (Fri, 09 Aug 2019 09:41:28 GMT):
which function? and get them where? You can print them in the logs of the chaincode container for example, or you can build your response to be whatever you want

rthatcher (Fri, 09 Aug 2019 09:45:54 GMT):
There is a system function to retrieve all the functions - `org.hyperledger.fabric:GetMetadata` you can invoke it on the command line like this: ` peer chaincode invoke -o orderer.example.com:7050 -C mychannel -c '{"Args":["org.hyperledger.fabric:GetMetadata"]}' -n fcnstest ` and it returns you a JSON structure that includes the transactions/functions

rthatcher (Fri, 09 Aug 2019 09:45:54 GMT):
Assuming your chaincode uses the new model i.e. fabric-contract-api then there is a system function to retrieve all the functions - `org.hyperledger.fabric:GetMetadata` you can invoke it on the command line like this: ` peer chaincode invoke -o orderer.example.com:7050 -C mychannel -c '{"Args":["org.hyperledger.fabric:GetMetadata"]}' -n fcnstest ` and it returns you a JSON structure that includes the transactions/functions

ahmad-raza (Fri, 09 Aug 2019 10:09:41 GMT):
Two ways to develop Chaincode 1. Chaincode Interface 2. Smartcontract Interface Which is better and production ready?

paranjan (Fri, 09 Aug 2019 10:25:01 GMT):
Which language? Java/Node/Go?

ahmad-raza (Fri, 09 Aug 2019 10:25:21 GMT):
Node

paranjan (Fri, 09 Aug 2019 10:26:13 GMT):
You might like to ask this question in #fabric-sdk-node

ahmad-raza (Fri, 09 Aug 2019 10:26:50 GMT):
okay

AlbertCL (Fri, 09 Aug 2019 11:17:07 GMT):
Maybe the question is: What is your procedure to test a chaincode in a dev environment?

mahoney1 (Fri, 09 Aug 2019 12:11:14 GMT):
its possible,https://jira.hyperledger.org/browse/FAB-13419?focusedCommentId=61520&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-61520 you're running into this issue (see comments there)

mahoney1 (Fri, 09 Aug 2019 12:11:14 GMT):
its possible you're running into this issue: https://jira.hyperledger.org/browse/FAB-13419?focusedCommentId=61520&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-61520 (see comments there)

paranjan (Fri, 09 Aug 2019 12:26:12 GMT):
@AlbertCL You can also try out this visual studio extension to easily setup local network and execute chaincode: https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform This extension simplifies local blockchain network setup and execution.

javapriyan (Sat, 10 Aug 2019 02:26:47 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8PNhwtDTNJ4QqTz9w

javapriyan (Sat, 10 Aug 2019 02:26:47 GMT):
Any help ? https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8PNhwtDTNJ4QqTz9w

javapriyan (Sat, 10 Aug 2019 05:20:34 GMT):
```TxStatus event: could not create client conn: server URL not specified```

yeousunn (Mon, 12 Aug 2019 00:46:49 GMT):
@Abrara @rthatcher Thank you for reply. @rthatcher Yes, I am looking to list all the function so users don't have to remember each of them. I'll check that out. Is it supported in version 1.4?

mahoney1 (Mon, 12 Aug 2019 09:24:25 GMT):
yes it is.

mahoney1 (Mon, 12 Aug 2019 09:24:25 GMT):
@yeousunn yes it is.

GuillaumeCisco (Tue, 13 Aug 2019 13:41:08 GMT):
Has joined the channel.

GuillaumeCisco (Tue, 13 Aug 2019 13:41:09 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:41:09 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

sstone1 (Tue, 13 Aug 2019 14:16:15 GMT):
No - only in Node.js and Java at the moment. We are looking at starting work on bringing the new programming model to Go in 2H19.

GuillaumeCisco (Tue, 13 Aug 2019 15:41:58 GMT):
Thanks :) What 2H19 means?

silliman (Tue, 13 Aug 2019 17:20:53 GMT):
2H19 == second half of 2019

huxd (Wed, 14 Aug 2019 01:02:04 GMT):
Has joined the channel.

harishreddy 1 (Wed, 14 Aug 2019 04:57:32 GMT):
Has joined the channel.

harishreddy 1 (Wed, 14 Aug 2019 04:57:34 GMT):
Hi Team, I have created an network which has 2 peers. Now , I am trying to store text file into the blockchain . Can you help me to store text file and chaincode? . Thanks in advance

yeousunn (Wed, 14 Aug 2019 06:27:47 GMT):
Hi @rthatcher do you know the equivalent of fabric-contract-api for chaincode written in golang?

rthatcher (Wed, 14 Aug 2019 08:23:39 GMT):
There is no equivalent in Go at the moment, but it is in the plans for later in 2019.

yeousunn (Wed, 14 Aug 2019 08:30:26 GMT):
thank you for the info. :relaxed: :ok_hand:

adineshreddy1 (Fri, 16 Aug 2019 11:41:36 GMT):
Has joined the channel.

JiTian0225 (Sat, 17 Aug 2019 08:27:15 GMT):
Has joined the channel.

deepaks (Mon, 19 Aug 2019 08:38:50 GMT):
Hi everyone, If we change the bootstrap identity of running fabric CA, would that affect existing certificates ?

ajmeraharsh (Mon, 19 Aug 2019 10:18:42 GMT):
Hi all, Is there a way to get the list of `all private collections` or to check if a `specific private collection` exists within a chaincode ?

saurabhsingh121 (Mon, 19 Aug 2019 10:35:27 GMT):
Has joined the channel.

rthatcher (Mon, 19 Aug 2019 13:48:40 GMT):
What change are you planning to make? If you change the properties of an Identity in the CA, they are not reflected in any existing certificates. (If you are adding attributes, they only appear in new certificates if you set ECert to true.) BTW there is a specific #fabric-ca channel.

deepaks (Mon, 19 Aug 2019 14:03:12 GMT):
Thanks @rthatcher . I was just chnaging the bootstrap identity only. By default its admin : adminpw

rthatcher (Mon, 19 Aug 2019 14:08:02 GMT):
I don't think you can change the ID name (admin) of a running CA, but you can change the secret. (You can change the parameters given to the CA when it is started for the first time through an environment variable)

deepaks (Mon, 19 Aug 2019 14:10:14 GMT):
Okay got your point. well explained. One more thing, what difference would secret make in the new certificates? and if the secret is compromised, how it would affect already generated certificates.

rthatcher (Mon, 19 Aug 2019 14:12:21 GMT):
The certificate does not contain the secret. The secret is used to download the certificate only.

deepaks (Mon, 19 Aug 2019 14:14:02 GMT):
Okay, Thank you for helping me out.

deepaks (Mon, 19 Aug 2019 14:15:52 GMT):
if there is nay official doc where these things are there in detail?

galaxystar (Tue, 20 Aug 2019 01:18:23 GMT):
Has joined the channel.

cDown (Tue, 20 Aug 2019 01:43:22 GMT):
Has joined the channel.

bjcawanglu (Tue, 20 Aug 2019 02:01:53 GMT):
Has joined the channel.

ajmeraharsh (Tue, 20 Aug 2019 13:36:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=N6e5ZM4qQnEzR4HLb) any thoughts on this @rthatcher ?

aiga (Wed, 21 Aug 2019 01:52:54 GMT):
Has joined the channel.

aiga (Wed, 21 Aug 2019 01:52:55 GMT):
Hello everyone! Can you help me, I have this error on my chaincode, I can not understand why ?! { "syntax error: unexpected shim, expecting comma or )",} ``` This error directs to this line: func (s *SmartContract) queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response { if len(args) != 1 { return shim.Error("Incorrect number of arguments. Expecting 1") } ```

paranjan (Wed, 21 Aug 2019 09:52:03 GMT):
Has left the channel.

mahoney1 (Wed, 21 Aug 2019 11:39:58 GMT):
closing `}` for the `func` ?

shitaibin (Thu, 22 Aug 2019 12:17:20 GMT):
Has joined the channel.

mahoney1 (Thu, 22 Aug 2019 14:18:26 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

mattiabolzonella1 (Fri, 23 Aug 2019 08:02:10 GMT):
Has joined the channel.

krabradosty (Fri, 23 Aug 2019 09:53:17 GMT):
Hi. With the current version of go shim library, it is not possible to identify organization MSP admin within the chaincode by using channel configuration?

sarapaul (Sun, 25 Aug 2019 22:12:20 GMT):
Has joined the channel.

dan13 (Sun, 25 Aug 2019 23:06:59 GMT):
With the new programming model, will it be possible to mix SDK and chaincode languages, i.e., Java SDK to GO chaincode (once new model is available for both)? Or do both sides have to be the same language to take advantage of the new programming model features?

ajmeraharsh (Mon, 26 Aug 2019 05:46:17 GMT):
Hi all, Is there a way to get the list of `all private collections` or to check if a `specific private collection` exists?

ajmeraharsh (Mon, 26 Aug 2019 05:46:17 GMT):
Hi all, Is there a way to get the list of `all private collections` or to check if a `specific private collection`?

HLFPOC (Mon, 26 Aug 2019 05:50:30 GMT):
When working with Node JS chaincode, how and where does the node_modules gets installed? Can we have the node_modules installed in a particular dir which can be later reffered by chaincode container? Currently working on fabric v1.3

javapriyan (Mon, 26 Aug 2019 07:06:29 GMT):
Has anyone tried to fetch the latest tx of a state ?

mastersingh24 (Mon, 26 Aug 2019 11:32:15 GMT):
Like all chaincode, it is built and launched either at instantiate time or the first time it invoked (assuming it has been instantiated on the channel already). The peer launches the fabric-ccenv container, builds the chaincode image (at which time it runs `npm install --production`) and then launches the chaincode container. All of the package commands/ APIs will filter out the `node_modules` folder

dan13 (Mon, 26 Aug 2019 14:59:36 GMT):
Is there a commitment for the implementation of the new programming model for chaincode in Go? If so, is there a timeline (at least, proposed timeline) established in terms of chrono or release versions? Based on http://proterra.me.uk/nx01/programming/2019/07/31/201/ it seems that mix-and-match languages is supported, e.g., Java SDK client calling Go chaincode all with new programming model (once avail for both) -- can someone confirm?

yacovm (Mon, 26 Aug 2019 17:14:13 GMT):
@troyronda ^

troyronda (Mon, 26 Aug 2019 17:14:13 GMT):
Has joined the channel.

yacovm (Mon, 26 Aug 2019 17:14:44 GMT):
@sstone1 ^

sstone1 (Tue, 27 Aug 2019 08:45:42 GMT):
@dan13 it's something we'd like to get done by the end of the year, any particular reason for asking? it would be built on Fabric v2.x, don't expect it for v1.4.

sstone1 (Tue, 27 Aug 2019 08:46:13 GMT):
any SDK language should be able to call any smart contract language, and old programming model SDK should be able to call new programming model smart contract (and vice versa)

greg2git (Tue, 27 Aug 2019 12:09:26 GMT):
:thumbsup:

dan13 (Tue, 27 Aug 2019 14:13:19 GMT):
@sstone1 thanks for answering! We are primarily a Java shop, but started with Go chaincode because it seemed like it might have some advantages. Trying to decide if switching to Java-Java makes the most sense (which I think it will if Go support for new model is too far in future). I googled for HLF 2.0 release date but did not find anything -- is that set yet?

sstone1 (Tue, 27 Aug 2019 18:35:43 GMT):
Fabric v2.0 should be released in 4Q this year. If you’re a Java shop, then Java/Java makes a lot of sense to me. Out of interest, why did you think Go would have some advantages?

dan13 (Tue, 27 Aug 2019 20:25:04 GMT):
This answer from @yacovm - https://stackoverflow.com/questions/53301415/node-js-or-go-for-hyperledger-fabrics-chaincode-development. There was also an element of "if you don't try it, you won't be able to evaluate whether it is or isn't better".

leeseunghyun (Wed, 28 Aug 2019 01:39:46 GMT):
Has joined the channel.

leeseunghyun (Wed, 28 Aug 2019 01:43:43 GMT):
Hi i has some questions, this is first, is org.hyperledger.fabric.shim.ChaincodeStub#getHistoryForKey method (not necessarily java) has a limit for history records size?? i think this method needs pagination like action,

leeseunghyun (Wed, 28 Aug 2019 01:46:02 GMT):
(second question), hyperledger chaincode do not supports couch db's map-reduce view and execution_stats on mango(rich) query so i cannot get any aggregated data, is there any other way to deal this limit?

leeseunghyun (Wed, 28 Aug 2019 01:51:28 GMT):
If i want to go to the previous page list using bookmark only, i must save all the old bookmarks. And i can only determine for this is last page when i just know the result is empty arrray after requesting a bookmark directly. is another way improve this way?

gunso (Wed, 28 Aug 2019 05:41:02 GMT):
Has joined the channel.

narendranathreddy (Wed, 28 Aug 2019 07:05:00 GMT):
Has joined the channel.

mahoney1 (Wed, 28 Aug 2019 09:33:26 GMT):
@leeseunghyun for q1, I would track activity on this JIRA https://jira.hyperledger.org/browse/FAB-12183 and for q2: there is a JIRA with latest activity/updates on aggregation for on-chain data https://jira.hyperledger.org/browse/FAB-5528

dan13 (Wed, 28 Aug 2019 14:38:43 GMT):
@sstone1 wrt "old programming model SDK should be able to call new programming model smart contract (and vice versa)", I expected the former but surprised at the vice versa -- aren't there new protobuf defs involved or other non-backwards compatible changes with new model?

soumyanayak (Wed, 28 Aug 2019 14:47:51 GMT):
Has joined the channel.

sstone1 (Wed, 28 Aug 2019 15:07:22 GMT):
nope, the high level is built on top of the low level

sstone1 (Wed, 28 Aug 2019 15:07:54 GMT):
so you can use the low level SDK to call a high level smart contract (assuming you know what args to pass in), and the high level SDK to call a low level smart contract (Invoke will just get called)

dan13 (Wed, 28 Aug 2019 16:48:16 GMT):
smart and cool, thanks!

RuiPanNewbie (Thu, 29 Aug 2019 19:33:35 GMT):
Has joined the channel.

npc0405 (Sat, 31 Aug 2019 11:29:51 GMT):
Is it possible to call stub.PutState from Get / Query chaincode method?

npc0405 (Sat, 31 Aug 2019 11:30:27 GMT):
I want to update the result with before fetching it from ledger.

rthatcher (Mon, 02 Sep 2019 08:22:54 GMT):
Fabric doesn't work that way - you cannot read and updates (or writes) that you make during your transaction.

SatheeshNehru (Tue, 03 Sep 2019 05:11:42 GMT):
yes I got the same error when I instantiated using the new programming model by default instantiation is trying to "init" method . When I updated the contract with init method it worked fine.

huxd (Wed, 04 Sep 2019 07:18:09 GMT):
trying to understand how the "cloud native chaincode" in 2.0 works (https://jira.hyperledger.org/browse/FAB-13582) if I read the documents correctly, it just need a way for the peer to talk with some remote chaincode grpc server, so this seems to me has nothing to do with the external chaincode builder and launcher feature (https://jira.hyperledger.org/browse/FAB-13584)...am I right? currently the jira issue 13582 is marked as blocked by 13584 so I'm not sure...

huxd (Wed, 04 Sep 2019 07:18:09 GMT):
trying to understand how the "cloud native chaincode" in 2.0 works (https://jira.hyperledger.org/browse/FAB-13582) if I read the documents correctly, it just need a way for the peer to talk with some remote chaincode grpc server, so this seems to me has nothing to do with the external chaincode builder and launcher feature (https://jira.hyperledger.org/browse/FAB-13584) ...am I right? currently the jira issue 13582 is marked as blocked by 13584 so I'm not sure...

aviralagrawal (Thu, 05 Sep 2019 09:01:51 GMT):
Has joined the channel.

rthatcher (Thu, 05 Sep 2019 14:23:13 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

amealwithbasil (Thu, 05 Sep 2019 18:58:51 GMT):
Has joined the channel.

amealwithbasil (Thu, 05 Sep 2019 18:58:52 GMT):
Can batch size and batch timeout be set on a per channel level, or is it an ordering service level config parameter?

amealwithbasil (Thu, 05 Sep 2019 18:59:24 GMT):
The docs here indicate it can be done per channel https://hyperledger-fabric.readthedocs.io/en/release-1.2/config_update.html But the git src code seems to show it as an orderer level config https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/configtx.yaml

yacovm (Thu, 05 Sep 2019 19:17:18 GMT):
configtx is a config file that is used for channel creation

amealwithbasil (Thu, 05 Sep 2019 19:36:01 GMT):
can batch size be set per channel? if so, where would that be set, because in the src (link above) it shows it as an orderer setting

yacovm (Thu, 05 Sep 2019 22:25:41 GMT):
it can be *only* set per channelk

gunso (Fri, 06 Sep 2019 04:53:30 GMT):
Does anyone know how to instantiate java chaincode behind proxy? I'm getting the following error when I try to instantiate java chaincode behind proxy. I'm using sample chaincode(fabric-samples/chaincode/chaincode_example02/java) ``` 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 "Gradle build Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Could not resolve all files for configuration ':compileClasspath'. > Could not resolve org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.+. Required by: project : > Failed to list versions for org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim. > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml. > Could not get resource 'https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml'. > Could not GET 'https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml'. > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: connect timed out * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org 1 actionable task: 1 executed BUILD FAILED in 37s " ```

nitinbondre (Sat, 07 Sep 2019 11:01:23 GMT):
Has joined the channel.

sgaddam (Mon, 09 Sep 2019 09:58:25 GMT):
Hi, I have a HLF Network with 4 Orgs and each org has 2 peers in VM based environment. Now, I have a business requirement that i need to add one more peer (3rd peer) for Org4. But it should be in a docker container in a separate windows machine. I have done the setup with HLF in the docker container using docker-compose.yaml file. But, when i try to install the chaincode in the docker container using Peer CLI, i am getting the below exception. By the way, i am using bccsp package in my chaincode. Error: error getting chaincode code rcodso: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/bccsp: command : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/bccsp: cannot find package "github.com/hyperledger/fabric/bccsp" in any of: /opt/go/src/github.com/hyperledger/fabric/bccsp (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/bccsp (from $GOPATH) It clearly looking for bccsp package, but it was not there in the /opt/gopath/src/github.com/hyperledger/fabric directory. Please help me in this regard to make it works.

MatteoLinear (Mon, 09 Sep 2019 13:13:14 GMT):
Hi,how would i handle automatic indexization of values to insert in the ledger in a invoke function?

rallam (Mon, 09 Sep 2019 22:17:15 GMT):
Has joined the channel.

rallam (Mon, 09 Sep 2019 22:19:40 GMT):
Hi, I have an application which does batch updates to the chaincode. Right now, it process only one transaction, and ignores the other one. How does chaincode/sdkclient act to multiple transaction submitted at the sametime..Does it have code in place to handle concurrency..? Thank you!

SarvottamKumar (Tue, 10 Sep 2019 11:56:36 GMT):
Has joined the channel.

muralisr (Tue, 10 Sep 2019 13:19:51 GMT):
@rallam "transaction" has a very specific meaning in fabric... I _think_ what you are saying is you are somehow allowing only one Invoke on the chaincode at any time ? `Does it have code in place to handle concurrency..?` -- chaincode can handle multiple Invokes concurrently ... ie, SDK can send all the requests it wants without serializing/filtering requests

anujhlf (Tue, 10 Sep 2019 13:58:51 GMT):
Has joined the channel.

vdods (Tue, 10 Sep 2019 14:57:03 GMT):
Hi all, I'm running into this problem (again) where I'm getting `GET_STATE_BY_RANGE failed: ... Queries on pvt data is supported only in a read-only transaction`. I get why that check is in there -- ostensibly from preventing chaincode developers from accidentally writing private data to the public ledger, but in this case I'm only operating on a single private collection. In particular I'm trying to delete a table from my private collection, and the step that's triggering this error is just checking that the table has no rows before deleting the table metadata (from another private collection table that I've defined). If I reverse the order of the operations, I get `DEL_STATE failed: ... Transaction has already performed queries on pvt data. Writes are not allowed`. So basically I'm blocked either way -- I can't verify that a table is empty before deleting it. How do I disable this check? I've encountered it before, and it's been a total headache.

rallam (Tue, 10 Sep 2019 15:21:49 GMT):
@muralisr Yes, I mean invoking a chaincode method. So the problem that I have is, if sdkclient invokes multiple calls at the same time to the same method, it executes only first invoke and ignores the other one. I found this article : https://medium.com/wearetheledger/hyperledger-fabric-concurrency-really-eccd901e4040, and it says that fabric doesn't handle concurrency, and throws mvvc error for the second call. can you please clarify on this. Thank you!!

Xepp (Tue, 10 Sep 2019 18:05:27 GMT):
Has joined the channel.

Xepp (Tue, 10 Sep 2019 18:05:28 GMT):
Hi all, New to chain code I have a rather trivial question but I can't figure it out. Where should I place my chaincode files on my local computer and where do I specify the path when I call peer chaincode install . As I understand it, the -path flag is where the chaincode is placed in the docker container? What am I missing or where can I read specifically about this?

anujhlf (Wed, 11 Sep 2019 07:02:19 GMT):
Copy your go code to /opt/gopath/src/github.com/app/app.go When installing, peer chaincode install -n app_name -p github.com/app -v v0

anujhlf (Wed, 11 Sep 2019 07:03:40 GMT):
I dont know if its conincidence or some script work, but if you have a folder named chaincode in your project root, it gets copied over automatically and can be checked by cding into the opt src directory inside the container

Xepp (Wed, 11 Sep 2019 19:15:52 GMT):
Big thanks @anujhlf !

ItaloCarrasco (Wed, 11 Sep 2019 21:00:26 GMT):
Has joined the channel.

ItaloCarrasco (Wed, 11 Sep 2019 21:00:28 GMT):
hello everyone, for the chaincode Invoke method is it necessary to return shim.success() or shim.error(), can i return something else like a custom response?

muralisr (Wed, 11 Sep 2019 21:29:26 GMT):
@rallam to the narrow question "can chaincode handle concurrent requests?" the answer is yes. To the question "would transactions created from chaincode responses to those concurrent requests cause MVCC collision errors?" the answer is depends upon the application. If two concurrent requests access the same state key "A" and both of them think they are modifying version "100" of state "A", when the transaction first request gets committed, it'll move the version to "101" making the second transaction's fail. Now if the two requests are accessing different state keys "A" and "B" respectively, you will not get the MVCC error. So chaincode can handle concurrent request but the behavior of transactions from those requests is application dependent.

rallam (Wed, 11 Sep 2019 22:44:37 GMT):
Got you, thanks!!

saj97 (Thu, 12 Sep 2019 15:20:34 GMT):
Has joined the channel.

saj97 (Thu, 12 Sep 2019 15:20:35 GMT):
Hi, New to chaincode I have a rather question, but I can't figured out. I have a nodejs app, the same as invoke example in fabcar. When it creates the gateway and search for the chaincode it gives me a eror where it says that there is no chaincode with that name, but when i run from terminal with peer chaincode invoke etc it found the chaincode and execute well.

braduf (Fri, 13 Sep 2019 03:16:53 GMT):
Hi, I would like to be able to assign assets not only to the certificate ID, but also to the public key and implement a function to rotate the key. I am not sure what is the best way to get the public key in the chaincode. With the cid library I know how to get the certificate and the certificate has a field ´RawSubjectPublicKeyInfo´, but I don't know how to decode this and get only the public key out of it. Or should I use the ´PublicKey´field, this is an empty interface type in the certificate struct, so I also don't really know what the content of it will be and if I should use it. Can someone give any suggestions, please? Thanks a lot!

mahoney1 (Fri, 13 Sep 2019 08:59:32 GMT):
connecting to the right peer, correct name? if still an issue, might want to raise yr question on Stack overflow, with your client code / environment

mahoney1 (Fri, 13 Sep 2019 08:59:32 GMT):
connecting to the right gw, correct c/c name? if still an issue, might want to raise yr question on Stack overflow, with your client code / environment

generak (Sun, 15 Sep 2019 11:43:55 GMT):
Has joined the channel.

aymanmt (Sun, 15 Sep 2019 15:46:49 GMT):
Has joined the channel.

aymanmt (Sun, 15 Sep 2019 15:47:22 GMT):
hello everybody, I have a question about pagination

aymanmt (Sun, 15 Sep 2019 15:47:48 GMT):
I am using getQueryResultWithPagination function, but the returned bookmark is always emtpy

aymanmt (Sun, 15 Sep 2019 15:48:03 GMT):
Any idea why is that?

aymanmt (Sun, 15 Sep 2019 15:48:25 GMT):
I am sending a page of 1000 and I am sure that the query should return around 32,000 records

aymanmt (Sun, 15 Sep 2019 15:48:45 GMT):
I am getting the 1000 records, but I cannot get next 1000 records because i dont have the bookmark value

aymanmt (Sun, 15 Sep 2019 15:48:45 GMT):
I am getting the 1000 records, but I cannot get next 1000 records because I don't have the bookmark value

mahoney1 (Mon, 16 Sep 2019 10:13:25 GMT):
might be an idea to test with a reduced pageSize first, to see if you get the returned bookmark, which might look something like `[{"ResponseMetadata":{"RecordsCount":"10", "Bookmark":"g1AAAABLeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYqz5yYWJeWkmoKkOWDSOSANIFk2iCyIyVySn5uVBQAGYhR1"}}]` - to then pass in a subsequent query iteration, to retrieve the next set of results. `

mahoney1 (Mon, 16 Sep 2019 10:13:25 GMT):
might be an idea to test with a reduced pageSize first, to see if your code actually gets the returned bookmark, which might look something like `[{"ResponseMetadata":{"RecordsCount":"10", "Bookmark":"g1AAAABLeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYqz5yYWJeWkmoKkOWDSOSANIFk2iCyIyVySn5uVBQAGYhR1"}}]` - to then pass in a subsequent query iteration, to retrieve the next set of results. `

mahoney1 (Mon, 16 Sep 2019 10:13:25 GMT):
might be an idea to test with a reduced pageSize first, to see if your code actually gets the returned bookmark, which might look something like ` [{"ResponseMetadata":{"RecordsCount":"10", "Bookmark":"g1AAAABLeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYqz5yYWJeWkmoKkOWDSOSANIFk2iCyIyVySn5uVBQAGYhR1"}}] ` - to then pass in a subsequent query iteration, to retrieve the next set of results. `

mahoney1 (Mon, 16 Sep 2019 10:13:25 GMT):
might be an idea to test with a reduced pageSize first, to see if your code actually gets the returned bookmark, which might look something like ``` [{"ResponseMetadata":{"RecordsCount":"10", "Bookmark":"g1AAAABLeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYqz5yYWJeWkmoKkOWDSOSANIFk2iCyIyVySn5uVBQAGYhR1"}}] ``` - to then pass in a subsequent query iteration, to retrieve the next set of results. `

adlrocha (Mon, 16 Sep 2019 12:48:18 GMT):
Has joined the channel.

dsessions (Mon, 16 Sep 2019 19:59:57 GMT):
Has joined the channel.

dsessions (Mon, 16 Sep 2019 19:59:58 GMT):
Question . . I'm unable to get an instantiate to work with multiple go source files, however, if I try the same code in a single source file - it works just fine. Is there a constraint related to source files?

dsessions (Mon, 16 Sep 2019 20:00:05 GMT):
CORE_PEER_MSPCONFIGPATH=/var/hyperledger/adminmsp \ peer chaincode instantiate \ --lang=golang \ --name={{CHAINCODE_NAME}} \ --version={{CHAINCODE_VERSION}} \ -C {{CHAINCODE_CHANNEL}} \ -c '{"Args":["{\"key1\": 1000, \"key2\": 1000}"]}' \ -P "OR ('msp.admin', 'msp.peer', 'msp.client', 'msp.member')" \ --peerAddresses {{PEER_ADDRESS_AND_PORT}} \ --tlsRootCertFiles /var/hyperledger/tls/client/ca.crt \ --tls \ --orderer {{ORDERER_ADDRESS_AND_PORT}} \ --cafile $(ls /var/hyperledger/orderer/tlsca/*.pem)

dsessions (Mon, 16 Sep 2019 20:00:05 GMT):
CORE_PEER_MSPCONFIGPATH=/var/hyperledger/adminmsp peer chaincode instantiate --lang=golang --name={{CHAINCODE_NAME}} --version={{CHAINCODE_VERSION}} -C {{CHAINCODE_CHANNEL}} -c '{"Args":["{\"key1\": 1000, \"key2\": 1000}"]}' -P "OR ('msp.admin', 'msp.peer', 'msp.client', 'msp.member')" --peerAddresses {{PEER_ADDRESS_AND_PORT}} --tlsRootCertFiles /var/hyperledger/tls/client/ca.crt --tls --orderer {{ORDERER_ADDRESS_AND_PORT}} --cafile $(ls /var/hyperledger/orderer/tlsca/*.pem)

KartikChauhan (Tue, 17 Sep 2019 09:51:22 GMT):
How can I install and instantiate a typescript chaincode? This is what I did so far to try to make it work: 1) Installed npm packages in local environment. 2) Compiled my typescript project to js. Chaincode installed successfully but during instantiation I got the error `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0`. I then removed all my ts files and kept only js files and package.json in the folder. Again, the chaincode installed successfully but got the above-mentioned error again during instantiation.

KartikChauhan (Tue, 17 Sep 2019 09:51:22 GMT):
How can I install and instantiate a typescript chaincode? This is what I did so far to try to make it work: 1) Installed npm packages in local environment. 2) Compiled my typescript project to js. Chaincode installed successfully but during instantiation I got the error `Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0`. I then removed all my ts files and kept only js files and package.json in the folder. Again, the chaincode installed successfully but got the above-mentioned error again during instantiation.

soumyanayak (Tue, 17 Sep 2019 11:13:52 GMT):
Hi All, v1.4.3 Fabric - RAFT Orderer set up The installation and instantiation of the chaincode is happening on the peer. But when from the tools container i am running the command peer chaincode list –instantiated -C legaldescriptionchannel the chaincode containers are exiting. i had installed thrice with different versions and upgraded using upgrade command but still the above issue lies.

soumyanayak (Tue, 17 Sep 2019 11:13:52 GMT):
Hi All, v1.4.3 Fabric - RAFT Orderer set up The installation and instantiation of the chaincode is happening on the peer. But when from the tools container i am running the command *peer chaincode list –instantiated -C legaldescriptionchannel* the chaincode containers are exiting. i had installed thrice with different versions and upgraded using upgrade command but still the above issue lies. The peer logs are as shown below

soumyanayak (Tue, 17 Sep 2019 11:49:29 GMT):

Clipboard - September 17, 2019 5:19 PM

soumyanayak (Wed, 18 Sep 2019 04:43:18 GMT):
Anybody any idea on the above issue

soumyanayak (Wed, 18 Sep 2019 09:10:54 GMT):
This issue is resolved . Actually there was an issue in the configtx.yaml where the allignment of the key - Organization under Application section was not proper it was under the ACLs. Configtxgen tool generated the genesis file successfully, but that was the issue. So its a advice to everybody . Check the proper spacing and allignment in configtx.yaml before generating the artifacts

aymanmt (Wed, 18 Sep 2019 13:43:49 GMT):
hi @mahoney1, thank you for the reply

aymanmt (Wed, 18 Sep 2019 13:44:09 GMT):
do you think the page size has to do with the issue?

aymanmt (Wed, 18 Sep 2019 13:55:44 GMT):
ok, I have just tried, and still getting an empty string

mahoney1 (Wed, 18 Sep 2019 14:06:17 GMT):
So 1000 records shouldn't be the issue here (and you presumably reduced the results set (above)) - what version of Fabric are you using? Not sure why your bookmark is empty in your env. Might be an idea to check out the marbles tutorial/sample with pagination (can do from CLI) at https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#query-the-couchdb-state-database-with-pagination

mahoney1 (Wed, 18 Sep 2019 14:06:17 GMT):
So 1000 records shouldn't be the issue here per [the docs](https://hyperledger-fabric.readthedocs.io/en/master/couchdb_as_state_database.html#couchdb-pagination) - and you presumably reduced the results set (above)? - what version of Fabric are you using? Not sure why your bookmark is empty in your env. Might be an idea to check out the marbles tutorial/sample with pagination (can do from CLI) at https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#query-the-couchdb-state-database-with-pagination

aymanmt (Wed, 18 Sep 2019 14:09:48 GMT):
v 1.4.1

aymanmt (Wed, 18 Sep 2019 14:11:44 GMT):
well a question: does pagination only work with couchdb? because we are using oracle blockchain platform, and I think they use Berkeley db

aymanmt (Wed, 18 Sep 2019 14:11:53 GMT):
i started to suspect that's the reason

aymanmt (Wed, 18 Sep 2019 14:12:18 GMT):
the thing is that we tried to change core.yml in one of the peers to use couchdb

aymanmt (Wed, 18 Sep 2019 14:12:22 GMT):
but it didn't work

mahoney1 (Wed, 18 Sep 2019 14:16:12 GMT):
yes couchDB - need to read [the docs](https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#query-the-couchdb-state-database-with-pagination) -> "Bookmarks are *uniquely generated by CouchDB *for each query and represent a placeholder in the result set. Pass the returned bookmark on the subsequent iteration of the query to retrieve the next set of results." - should check the release notes too for support etc.

aymanmt (Wed, 18 Sep 2019 14:18:53 GMT):
well I read the docs, but it seems I didn't notice that note :)

mahoney1 (Wed, 18 Sep 2019 14:19:21 GMT):
no worries :-)

aymanmt (Wed, 18 Sep 2019 14:19:40 GMT):
so I guess now I should try to make oracle blockchain platform work with couchdb

aymanmt (Wed, 18 Sep 2019 14:20:06 GMT):
i don't know how though

aymanmt (Wed, 18 Sep 2019 14:20:13 GMT):
because i tried before, but didn't work

aymanmt (Wed, 18 Sep 2019 14:20:23 GMT):
so I need to dig more

amanjain (Thu, 19 Sep 2019 11:01:09 GMT):
Hi All, v1.2 Fabric with Solo Ordering Service Chaincode installed successfully but when instantiate chaincode I got following error: Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction 7bf0fe5e451fc9e70c7e3848965c92f0ef9f3f2f6468ba795e31f5eec8f17199: error starting container: error starting container: Failed to generate platform-specific docker build Anyone have idea how I can resolve this issue?

aymanmt (Thu, 19 Sep 2019 11:41:17 GMT):
by the way, I forgot to say thank you so much for your time trying to help :)

mahoney1 (Thu, 19 Sep 2019 15:21:54 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Fabric+Application+Developer+Community+Call

josephnicholas (Thu, 19 Sep 2019 15:52:07 GMT):
Has joined the channel.

neha_ag (Thu, 19 Sep 2019 20:59:40 GMT):
Has joined the channel.

davidkhala (Fri, 20 Sep 2019 04:13:05 GMT):
Is there a way to redirect chaincode logs into file?

mastersingh24 (Fri, 20 Sep 2019 16:12:16 GMT):
Docker sends them to a JSON log file by default

dsessions (Fri, 20 Sep 2019 17:42:00 GMT):
Any thoughts on when the hlf docker images, specifically peer, will upgrade to use go 1.13? Especially with fab-sdk-go now supporting go 1.13, it's particularly difficult switching back and forth between go version to accommodate the different type of development (e.g. chaincode vs sdk client)

dtomczyk (Sat, 21 Sep 2019 11:56:29 GMT):
Has joined the channel.

dan13 (Mon, 23 Sep 2019 12:42:39 GMT):
is it possible for the implementation language of a specific chaincode to change by a version upgrade without negative effects? for example, v1 of chaincode "myChaincode" is implemented in Go, and then v2 is implemented in java or node?

muralisr (Mon, 23 Sep 2019 13:21:20 GMT):
@dan13 yes, it is possible. Only tuple is needed for invokes (in particular, language property is not needed)

vdods (Mon, 23 Sep 2019 17:29:57 GMT):
Are there any plans for supporting Python for chaincode?

muralisr (Tue, 24 Sep 2019 12:53:01 GMT):
@vdods nothing that I know of. ...

Atreb (Tue, 24 Sep 2019 17:49:56 GMT):
Has joined the channel.

Atreb (Tue, 24 Sep 2019 17:50:48 GMT):
Hello, I'm trying to deploy a smart cotract using the fabric-samples/fabcar example. But if i try to change the chaincode the smart contract will not initialize in the channel giving out the following error: Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 what am i doing wrong? I have checked the cli docker and my new version of the chaincode is present there

Atreb (Tue, 24 Sep 2019 17:50:48 GMT):
Hello, I'm trying to deploy a smart cotract using the fabric-samples/fabcar example. But if i try to change the chaincode the smart contract will not initialize in the channel giving out the following error: Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1 what am i doing wrong? I have checked the cli docker and my new version of the chaincode is present there I'm currently developing in javascript

knagware9 (Wed, 25 Sep 2019 06:03:53 GMT):
I think there is compile error in chaincode , did you check that

Atreb (Wed, 25 Sep 2019 07:41:23 GMT):
How can i check it?

chainsaw (Wed, 25 Sep 2019 08:35:01 GMT):
If anyone wants to successfully execute fabric-samples Fabcar using the JavaScript Chaincode I posted my fix to stackoverflow so you can :) Here is the link: https://stackoverflow.com/questions/58070749/error-running-fabcar-javascript-chaincode-in-hyperledger-fabric-1-4-3

chainsaw (Wed, 25 Sep 2019 08:35:01 GMT):
If anyone wants to successfully execute fabric-samples Fabcar using the JavaScript Chaincode I posted my fix to stackoverflow so you can :) Thumbs Up are appreciated :) Here is the link: https://stackoverflow.com/questions/58070749/error-running-fabcar-javascript-chaincode-in-hyperledger-fabric-1-4-3

chainsaw (Wed, 25 Sep 2019 08:37:37 GMT):
See my fix on stackoverflow for this problem :) https://stackoverflow.com/questions/58070749/error-running-fabcar-javascript-chaincode-in-hyperledger-fabric-1-4-3

knagware9 (Wed, 25 Sep 2019 08:44:44 GMT):
check chaincode container logs , you can see some logs of failure

chainsaw (Wed, 25 Sep 2019 09:14:23 GMT):
A clean install of fabric-samples followed by my instructions eliminates the above error and lets you instantiate the JavaScript chaincode without error :) You can then continue following the Fabcar instructions to execute the JavaScript Fabcar client without error :) My instructions are detailed in my stackoverflow post. Follow and Enjoy developing JavaScript Chaincode and JavaScript Clients :)

Atreb (Wed, 25 Sep 2019 11:14:43 GMT):
@chainsaw Thanks for the reply, will try it right now

Atreb (Wed, 25 Sep 2019 11:23:16 GMT):
Still same error, checked the logs on peer0.org1 and this error shows up: 2019-09-25 11:22:31.898 UTC [endorser] SimulateProposal -> ERRO 06b [mychannel][90bb4c31] failed to invoke chaincode name:"lscc" , error: container exited with 1 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed

Atreb (Wed, 25 Sep 2019 12:06:46 GMT):
i think it might have something to do with channels, when i try to deploy my own chaincode logs on peer0 show this: Failed to update ordering service endpoints, due to Channel with mychannel id was not found while the same won't happen using the default chaincode

Deepakshinde (Wed, 25 Sep 2019 12:35:51 GMT):
Has joined the channel.

Deepakshinde (Wed, 25 Sep 2019 12:36:45 GMT):
Hi All,@guoger, I am using fabric 1.4.3 with raft orderer getting error on executing below commands peer chaincode install -n ldbc -v 1.2 -p ldbc peer chaincode upgrade -o $ORDERER_ADDRESS --tls --cafile $ORDERER_ROOTCA_CERT -C legaldescriptionchannel -n ldbc -v 1.2 -c '{"Args":[]}' --clientauth --keyfile $ORDERER_TLS_CLIENTKEY_FILE --certfile $ORDERER_TLS_CLIENTCERT_FILE Error screnshot attaching

Deepakshinde (Wed, 25 Sep 2019 12:37:14 GMT):

chaincodeUpgradeError.JPG

Atreb (Wed, 25 Sep 2019 12:48:17 GMT):
might have solved, @knagware9 was right with the chaincode error, i applied the changes one by one and found out i was probably using some reserved word as a variable. All working now. Thank you all for the help

Atreb (Wed, 25 Sep 2019 13:47:10 GMT):
Is there any way to query all keys used in the couchdb from the smart conctract?

Raumo0 (Wed, 25 Sep 2019 16:38:19 GMT):
How can I do ctx.stub.invokeChaincode if I have the name chaincode, but I have several contracts in the container and I still need to specify one of them. I can’t figure out how to do this. Help me please. Now I use the following option and it worked when I had each contract in a separate chaincode container. ctx.stub.invokeChaincode (chaincodeName, args, ''); contractName? ``` Endorsement failed with: transaction returned with failure: Error: INVOKE_CHAINCODE failed: transaction ID:... : chaincode estate-contract not found ``` ``` Endorsement failed with: transaction returned with failure: Error: INVOKE_CHAINCODE failed: transaction ID: ... : execute failed: error sending: txid: ...(mychannel) exists ```

Raumo0 (Wed, 25 Sep 2019 16:38:19 GMT):
How can I do ctx.stub.invokeChaincode if I have the name chaincode, but I have several contracts in the container and I still need to specify one of them. I can’t figure out how to do this. Help me please. Now I use the following option and it worked when I had each contract in a separate chaincode container. `ctx.stub.invokeChaincode (chaincodeName, args, '');` contractName? ``` Endorsement failed with: transaction returned with failure: Error: INVOKE_CHAINCODE failed: transaction ID:... : chaincode estate-contract not found ``` ``` Endorsement failed with: transaction returned with failure: Error: INVOKE_CHAINCODE failed: transaction ID: ... : execute failed: error sending: txid: ...(mychannel) exists ```

medikent (Wed, 25 Sep 2019 17:38:33 GMT):
Has joined the channel.

medikent (Wed, 25 Sep 2019 17:41:44 GMT):
@Raumo0 it seems like the name of the function invoked would be the only way to specify the correct contract. I imagine the invoke functions are called in some order, probably alphabetical by contract name, with the arguments passed to each invoke function. Just guessing here.

chainsaw (Wed, 25 Sep 2019 18:29:27 GMT):
Note: My instructions are a benchmark for successfully running fabcar and will only work if you have not modified ANY fabcar code or shell scripts. If you have modified code or shell scripts then your code may be an additional problem. Implement my changes and then focus on your code and or shell modifications. Good luck.

dan13 (Wed, 25 Sep 2019 20:18:28 GMT):
See: https://stackoverflow.com/questions/42520827/retrieving-hyperledger-complete-world-state

Atreb (Thu, 26 Sep 2019 09:26:07 GMT):
Thank you :)

Atreb (Thu, 26 Sep 2019 09:30:17 GMT):
I'm trying to retrieve all the past states of a given key using the GetHistoryForKey in the shim api, though when i try to invoke it from the client i get told that "GetHistoryForKey is not a function". How can i fix this?

mahoney1 (Thu, 26 Sep 2019 10:40:13 GMT):
hi *if* you're using NodeJS, use lower-case `g' ? eg `const resultsIterator = await ctx.stub.getHistoryForKey(ledgerkey);`

Raumo0 (Thu, 26 Sep 2019 10:43:48 GMT):
I tried to specify a unique name for the functions, but that did not change anything.

Raumo0 (Thu, 26 Sep 2019 10:43:48 GMT):
@medikent I tried to specify a unique name for the functions, but that did not change anything.

Atreb (Thu, 26 Sep 2019 11:02:46 GMT):
Yes i'm working with node. I'll try that right now thanks

Atreb (Thu, 26 Sep 2019 11:20:17 GMT):
yea, probably i was burnt out yesturday evening when i tried to code that function and ended up not realizing of such a stupid mistake. Thanks for the correction

Atreb (Thu, 26 Sep 2019 11:20:17 GMT):
yes, probably i was burnt out yesturday evening when i tried to code that function and ended up not realizing of such a stupid mistake. Thanks for the correction

Raumo0 (Fri, 27 Sep 2019 15:15:33 GMT):
@medikent Everything turned out to be simpler. If I need to call a method from a contract that is in the current channel and in the current chaincode container, then I do not need to use INVOKE_CHAINCODE. I can just import the class and call its method.

Raumo0 (Fri, 27 Sep 2019 15:24:19 GMT):
Does anyone know how to solve the problem when starting hyperledger fabric via vscode ibm blockchain extention? Everything worked fine for me before, but now the CA container cannot start for me. ``` [INFO] public key file location: /etc/hyperledger/fabric-ca-server/IssuerPublicKey Error: Failed to initialize Idemix issuer for CA 'Issuer public key file is empty': Issuer public key file is empty ```

Jelle.Diet (Mon, 30 Sep 2019 09:55:00 GMT):
When I run into problems I remove my images completely (note that they will be redownloaded). Make sure you're not using any docker images for other purposes

Jelle.Diet (Mon, 30 Sep 2019 09:55:11 GMT):
docker rm -f $(docker ps -aq) docker rmi -f $(docker images -q)

Raumo0 (Mon, 30 Sep 2019 13:46:30 GMT):
@Jelle.Diet I completely remove the containers before starting work, the problem is definitely not the case

Raumo0 (Mon, 30 Sep 2019 14:46:49 GMT):
UPD: Previously, I only removed containers and images, but not volumes. I solved the problem by deleting all volumes.

medikent (Mon, 30 Sep 2019 16:55:49 GMT):
I am not sure where to go from here. Did you find anything since last week?

Raumo0 (Mon, 30 Sep 2019 17:02:39 GMT):
@medikent In my case, it was necessary to call a method from the current channel and the current chaincode, so I did not need to use invokeChaincode, but simply export the class. But when you really need to call methods from different channels, different chaincode and different contracts, this still causes problems.

EltonSearcy (Mon, 30 Sep 2019 17:05:23 GMT):
Has joined the channel.

Rajatsharma (Mon, 30 Sep 2019 18:39:55 GMT):
Hi everyone, I'm trying to build a system chaincode, and now the code is very large so I was thinking of using `dep` for package management. So my Gopkg.toml is : https://hastebin.com/gahiqufana.cs And Gopkg.lock: https://hastebin.com/imetetuxiz.cs I'm building the plugin using: ``` go build -buildmode=plugin -o myscc.so main.go ``` But when I run the peer I'm getting the error: ``` panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace. goroutine 1 [running]: element/vendor/golang.org/x/net/trace.init.0() /opt/gopath/src/element/vendor/golang.org/x/net/trace/trace.go:116 +0x171 plugin.open(0xc00003ec40, 0xe, 0xc0000afad0, 0x0, 0x0) /opt/go/src/plugin/plugin_dlopen.go:113 +0xac8 plugin.Open(0xc00003ec40, 0x11, 0x18fb480, 0xc0000afad0, 0x0) /opt/go/src/plugin/plugin.go:32 +0x35 github.com/hyperledger/fabric/core/scc.loadPlugin(0xc00003ec40, 0x11, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:70 +0x175 github.com/hyperledger/fabric/core/scc.loadSysCCsWithConfig(0xc0000ba248, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:51 +0x123 github.com/hyperledger/fabric/core/scc.loadSysCCs.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:44 +0x97 sync.(*Once).Do(0x24d2da8, 0x17e0fa0) /opt/go/src/sync/once.go:44 +0xb3 github.com/hyperledger/fabric/core/scc.loadSysCCs(0xc0000cdc20, 0x0, 0xc000206000, 0x16bfaa0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:38 +0x39 github.com/hyperledger/fabric/core/scc.CreatePluginSysCCs(0xc0000cdc20, 0xc000283410, 0x18fafa0, 0xc0000cdc20) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/register_pluginsenabled.go:15 +0x40 github.com/hyperledger/fabric/peer/node.registerChaincodeSupport(0xc0001b2000, 0xc00003fde0, 0x19, 0x18ef580, 0xc00000e2b8, 0xc000289620, 0x18db560, 0xc0002751d0, 0xc000276520, 0xc000231300, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:696 +0x842 github.com/hyperledger/fabric/peer/node.startChaincodeServer(0xc0000420a2, 0x14, 0x18db560, 0xc0002751d0, 0xc000276520, 0xc000160b00, 0x18e25c0, 0xc00023a750, 0xc000230180, 0x3, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:747 +0x45d github.com/hyperledger/fabric/peer/node.serve(0x24d2cc0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:267 +0xe79 github.com/hyperledger/fabric/peer/node.glob..func1(0x23c8ba0, 0x24d2cc0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:121 +0x9c github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x23c8ba0, 0x24d2cc0, 0x0, 0x0, 0x23c8ba0, 0x24d2cc0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:762 +0x473 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x23c92c0, 0x8, 0x0, 0x23c8480) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:852 +0x2fd github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x23c92c0, 0xc000475f40, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:800 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:53 +0x2f7 ``` Can anyone help me with this ?

Rajatsharma (Mon, 30 Sep 2019 19:20:19 GMT):
I've been trying this for very long. But I've not been able to resolve this issue.

HLFPOC (Tue, 01 Oct 2019 09:42:52 GMT):
Hi Team, Are there any tutorials to test the chaincode containing query functions using mockstub?

HLFPOC (Tue, 01 Oct 2019 09:42:52 GMT):
Hi Team, Are there any tutorials to test the chaincode containing `GetQueryResult` functions using mockstub?

Jelle.Diet (Tue, 01 Oct 2019 13:22:56 GMT):
Has anyone used the getHistoryByKey function of the java chaincode? It's strange mine seems to override the transactions and return a list of the same transaction copied

medikent (Tue, 01 Oct 2019 16:45:01 GMT):
@HLFPOC I haven't seen any yet. I am just about ready to create one myself. So many of my smart contract methods require that function in order to get high test coverage.

Hariyumi (Wed, 02 Oct 2019 07:32:47 GMT):
Has joined the channel.

Hariyumi (Wed, 02 Oct 2019 07:32:48 GMT):
when chaincode run, container will be created, It is OK. but for a few, the chaincode's container is Exited (0). how to keep the container not exit? Or it is hyperledger specification.

mahoney1 (Wed, 02 Oct 2019 10:04:39 GMT):
check your peer / chaincode container logs for reasons/errors. You could get more detailed logging as described [here](https://stackoverflow.com/questions/56415570/failed-to-invoke-chaincode-namelscc-error-container-exited-with-1-chainco)

muralisr (Wed, 02 Oct 2019 12:10:46 GMT):
@Rajatsharma I assume this is resolved now ?

Rajatsharma (Wed, 02 Oct 2019 14:06:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=hFbwGc9hBhtcF9Qq3) @ No I was stuck at that error only.

muralisr (Wed, 02 Oct 2019 14:44:07 GMT):
Oh I thought you went beyond that original error ?

Rajatsharma (Wed, 02 Oct 2019 14:55:01 GMT):
Yes even that was not fully working. I'll let you know after I'll check too.

dtomczyk (Wed, 02 Oct 2019 15:48:05 GMT):
How do you guys debug Fabric ?

metadata (Wed, 02 Oct 2019 15:51:56 GMT):
Hi eveyone, Do I have to create different chaincode packages for each Org in case of multi-org setup?

mastersingh24 (Thu, 03 Oct 2019 09:00:23 GMT):
You should actually use the same package ... each org can of course review before installing on their peers

smallant (Thu, 03 Oct 2019 09:13:10 GMT):
Has joined the channel.

smallant (Thu, 03 Oct 2019 09:13:11 GMT):
Hi, I'm currently having some issues with unit tests for my go chaincode. I'm using the cid library (github.com/hyperledger/fabric/core/chaincode/lib/cid) but it gives an error when testing it. I've checked and it's seems its not yet available for the testing suite. Am I correct in this? Is there any workaround?

mahoney1 (Thu, 03 Oct 2019 10:45:56 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

knagware9 (Thu, 03 Oct 2019 13:13:31 GMT):
@mahoney1 Is there recording available of 19th sep session

EltonSearcy (Thu, 03 Oct 2019 15:08:33 GMT):
We're trying to mock our couchdb for running local unit tests, I'm thinking to use mockito but wanted to see what people were already using. any recommendations?

EltonSearcy (Thu, 03 Oct 2019 15:08:33 GMT):
We're trying to mock our couchdb for running local unit tests, I'm thinking to use something like mockito but wanted to see what people were already using. any recommendations?

mahoney1 (Thu, 03 Oct 2019 16:19:34 GMT):
yes, its here on Community Call recordings -> https://wiki.hyperledger.org/download/attachments/6423554/2019-0919-fabricdevcommunitycall.zip?api=v2 and slides: https://wiki.hyperledger.org/download/attachments/6423554/2019-0919-fabricdevcommunitycallslides.pdf?api=v2

ItaloCarrasco (Thu, 03 Oct 2019 19:12:28 GMT):
hello everyone, is there a way to return custom response instead of shim.success or error from the chaincode

dwelch91 (Thu, 03 Oct 2019 20:11:48 GMT):
Has joined the channel.

iramiller (Thu, 03 Oct 2019 22:39:42 GMT):
@ItaloCarrasco it is possible ... which SDK are you using?

knagware9 (Fri, 04 Oct 2019 04:40:45 GMT):
Thanks

ItaloCarrasco (Fri, 04 Oct 2019 14:01:26 GMT):
i am using node

BrainyZombie (Sun, 06 Oct 2019 17:55:40 GMT):
Has joined the channel.

BrainyZombie (Sun, 06 Oct 2019 18:01:45 GMT):
Hey, I am using fabric-go-sdk for my backend. I am trying to create a testing mode on my backend that can run queries directly on chaincode using mockshim. But importing both github.com/hyperledger/fabric-sdk-go and github.com/hyperledger/fabric/core/chaincode/shim into the same executable is leading to duplicate proto registrations which show up during runtime. For example, /vendor/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go:695: proto.RegisterType((*FabricCryptoConfig)(nil), "msp.FabricCryptoConfig") /vendor/github.com/hyperledger/fabric-protos-go/msp/msp_config.pb.go:706: proto.RegisterType((*FabricCryptoConfig)(nil), "msp.FabricCryptoConfig") Is there any way around this without editing vendor files to use the same import paths? What else can be done?

BrainyZombie (Sun, 06 Oct 2019 18:01:45 GMT):
Hey, I am using fabric-go-sdk for my backend. I am trying to create a testing mode on my backend that can run queries directly on chaincode using mockstub. But importing both github.com/hyperledger/fabric-sdk-go and github.com/hyperledger/fabric/core/chaincode/shim into the same executable is leading to duplicate proto registrations which show up during runtime. For example, /vendor/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go:695: proto.RegisterType((*FabricCryptoConfig)(nil), "msp.FabricCryptoConfig") /vendor/github.com/hyperledger/fabric-protos-go/msp/msp_config.pb.go:706: proto.RegisterType((*FabricCryptoConfig)(nil), "msp.FabricCryptoConfig") Is there any way around this without editing vendor files to use the same import paths? What else can be done?

BrainyZombie (Sun, 06 Oct 2019 18:53:45 GMT):
I am importing the chaincode packages as vendor from my chaincode repo.

BrainyZombie (Sun, 06 Oct 2019 20:18:01 GMT):
I had got this working earlier so I knew it is possible. Using fabric-sdk-go v1.0.0-alpha5 instead of fabric-sdk-go v1.0.0-beta1 works for this (updating other dependencies as well)

Hariyumi (Mon, 07 Oct 2019 08:16:19 GMT):

image_2019_09_11T08_40_41_076Z.png

Hariyumi (Mon, 07 Oct 2019 08:16:56 GMT):
Thank you for reply. Try to chainge order's network seting like this pic, It makes chaincode persistent.

Hariyumi (Mon, 07 Oct 2019 08:16:56 GMT):
Thank you for reply. Try to change orderer's network setting like this pic, It makes chaincode persistent.

Hariyumi (Mon, 07 Oct 2019 08:23:12 GMT):

image_2019_09_11T08_40_41_076Z.png

winslet (Wed, 09 Oct 2019 10:07:58 GMT):
Has joined the channel.

ShefaliMittal (Wed, 09 Oct 2019 13:12:55 GMT):
Hi, Can anyone please tell me how do I create two contract in one go chaincode and invoke them separately.

muralisr (Wed, 09 Oct 2019 15:22:16 GMT):
@ShefaliMittal It really depends upon what you mean by "two contract" ... but giving the code is in one GO chaincode there are two possible approaches Approach 1 ----------- (1) one GO chaincode installed on the peer and instantiated on a channel (2) Two methods "Contract1Method(...)" and "Contract2Method(...)" (3) The "invoke(args)"method would look at the first argunent in args and call either "Contract1Method(...)" or "Contract2Method(...)" By channgin the args sent to the chaincode you'll be invoking two different "contracts" but they'll both be registered on the blocchain under one chainccode Approach 2 ------------ (1) one GO chaincode installed twice as two separate chaincodes with different names (to keep it simple, pre 2.0... more possibilies post 2.0) and both are instantiated on the channel (2) Two methods "Contract1Method(...)" and "Contract2Method(...)" (3) The "invoke(args)"method would look at the first argunent in args and call either "Contract1Method(...)" or "Contract2Method(...)" By changing the args and the name of chaincode to invoke, you'll be invoking two different "contracts". These interactions will be registered under two chainccodes on the blockchain

ItaloCarrasco (Wed, 09 Oct 2019 20:08:38 GMT):
@iramiller the only way that is shown in the documentation is to use shim.success and shim.error but idk if it is possible to return something else

iramiller (Thu, 10 Oct 2019 04:27:25 GMT):
@ItaloCarrasco I thought I had a nodejs example in our infrastructure but it looks like the one I was thinking of is actually in our Kotlin SDK (Java). We return a custom 400 error from our chaincode which is handled correctly as an error when it hits the caller and we are still able to see the code as 400... so it is certainly possible to do although I don't have a helpful nodejs fragment for you...

ShefaliMittal (Thu, 10 Oct 2019 06:08:25 GMT):
Thank you for your response. I do see what you mean. My next question is when I follow first approach and create one chaincode then one couchdb table is created with chaincode name. So the two contracts data can have same id ?

ShefaliMittal (Thu, 10 Oct 2019 06:08:25 GMT):
@muralisr Thank you for your response. I do see what you mean. My next question is when I follow first approach and create one chaincode then one couchdb table is created with chaincode name. So the two contracts data can have same id ?

Utsav_Solanki (Thu, 10 Oct 2019 07:32:42 GMT):
2019-10-09 13:44:48.589 UTC [ccprovider] ExtractStatedbArtifactsForChaincode -> INFO 0b1 Error while loading installation package for ccname=carsam, ccversion=v4. Err=open /var/hyperledger/production/chaincodes/carsam.v4: no such file or directory 2019-10-09 13:44:48.589 UTC [cceventmgmt] HandleChaincodeDeploy -> INFO 0b2 Channel [newchannel]: Chaincode [Name=carsam, Version=v4, Hash=[]byte{0x7b, 0x24, 0x8f, 0x9b, 0xc2, 0x18, 0x5e, 0xaf, 0x45, 0xa9, 0xdd, 0x77, 0xa, 0x32, 0xd7, 0xdd, 0x90, 0x83, 0x3f, 0x4d, 0x4a, 0x2a, 0x23, 0x6b, 0x9b, 0x1d, 0x9a, 0x1a, 0x2a, 0x78, 0x60, 0x7b}] is not installed hence no need to create chaincode artifacts for endorsement

Utsav_Solanki (Thu, 10 Oct 2019 07:34:03 GMT):
in peer1 logs shows above list,

Utsav_Solanki (Thu, 10 Oct 2019 07:34:11 GMT):
any solution

soumyanayak (Thu, 10 Oct 2019 13:06:34 GMT):
Hi All, I am trying to set up Private Data between two orgs. So when i am installing the chaincode for private data communication and instantiating from one of the orgs - the chaincode shows as instantiated from both the orgs but i could see the docker container of chaincode created only in one org but when checked in another machine for the other org the chaincode container is not getting created. I am not sure why. Can anybody help on this

soumyanayak (Thu, 10 Oct 2019 13:06:34 GMT):
Hi All, Fabric - v1.4.3 I am trying to set up Private Data between two orgs. So when i am installing the chaincode for private data communication and instantiating from one of the orgs - the chaincode shows as instantiated from both the orgs but i could see the docker container of chaincode created only in one org but when checked in another machine for the other org the chaincode container is not getting created. I am not sure why. Can anybody help on this

ItaloCarrasco (Thu, 10 Oct 2019 13:34:57 GMT):
but do you return and object, a buffer or something else?

iramiller (Thu, 10 Oct 2019 15:01:39 GMT):
``` val ex = ExceptionResult(e::class.jvmName, e.toJsonString().base64encode()) Chaincode.Response(400, e.message, ex.toJsonBytes()) ``` ChainCode.Response is a wrapper around the chaincode message protobuf created in the Java SDK

iramiller (Thu, 10 Oct 2019 15:01:39 GMT):
``` val ex = ExceptionResult(e::class.jvmName, e.toJsonString().base64encode()) Chaincode.Response(400, e.message, ex.toJsonBytes()) ``` ChainCode.Response is a wrapper around the chaincode message protobuf created in the Java SDK

muralisr (Thu, 10 Oct 2019 15:32:44 GMT):
@ShefaliMittal first of all, I was just listing the possibilitie given the initial constraint of 1 go chaincode. Secondly, "contract" has no strict definition. At a high level if you want to differentiate two contracts you can do it in a variety of ways. In (1) we leave it to the chaincode to differentiate (say associate an ID for each new "contract" and store it in the DB and use ACL mechanisms to control access) and in (2) fabric supplies the basic differentiation by storing the state under different table... going back to you couch db analogy basically two tables vs a table with an extra "ID" column

EltonSearcy (Thu, 10 Oct 2019 16:41:17 GMT):
What would it take to get a similar PR to this one brought into the main source code? https://jira.hyperledger.org/browse/FAB-5015 It looks like this PR was *Closed and marked as Won't do* I assume that it's because of the external library, but we would like to have a way to test our getQueryResults method "along with several other methods" and the implementation is needed to be able to have enough code coverage to be able to promote the project to a production environment. Since we need this for our project we're willing to develop it, however I'd rather not implement it in a way that wouldn't be accepted as part of the project.

EltonSearcy (Thu, 10 Oct 2019 16:41:17 GMT):
What would it take to get a similar PR to this one brought into the main source code? for Golang https://jira.hyperledger.org/browse/FAB-5015 It looks like this PR was *Closed and marked as Won't do* I assume that it's because of the external library, but we would like to have a way to test our getQueryResults method "along with several other methods" and the implementation is needed to be able to have enough code coverage to be able to promote the project to a production environment. Since we need this for our project we're willing to develop it, however I'd rather not implement it in a way that wouldn't be accepted as part of the project.

Nikhil95 (Fri, 11 Oct 2019 05:11:56 GMT):
Has joined the channel.

Nikhil95 (Fri, 11 Oct 2019 05:13:45 GMT):
What are the different ways to manage access to functions and state within a chaincode? When should I use each one of them?

mahoney1 (Fri, 11 Oct 2019 08:35:35 GMT):
see the before and after transaction handlers (eg. `beforeTransaction` , `afterTransaction`) described in the docs https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/transactionhandler.html - depending on how you want to do it (ie what kind of checks) the 2nd answer [here](https://stackoverflow.com/questions/55392184/how-can-put-a-permission-on-function-in-node-sdk-of-hyperledger-fabric) may also assist you

diego_ (Mon, 14 Oct 2019 17:08:14 GMT):
Has joined the channel.

soumyanayak (Tue, 15 Oct 2019 11:03:47 GMT):
Resolved the issue . The chaincode folder structure should be exactly same in both the peers to get the same hash fingerprintID which will create chaincode conatiners for both the org peers

soumyanayak (Tue, 15 Oct 2019 13:10:36 GMT):
When i am installing the private chaincode - i checked in both the peer org machines the IDs of the installed chaincode is same but still the container was only created in the machine from where the instantiate command was run for only one org.

braduf (Tue, 15 Oct 2019 14:15:44 GMT):
Hi all, what is the best practice to reference a state in an invoke function, for the moment I am passing a parameter like this since this is how it is stored in the state db: "\u0000iou\u00002bbe093fcbd46121fd80eeaa7eb62c68d0ea1147009cb22a1c3f27c36feed45a\u00001\u0000", but it is pretty ugly with the \u0000 parts. Is it better to just pass the parts that form the composite key as separate parameters or should I do something like "iou:2bbe093fcbd46121fd80eeaa7eb62c68d0ea1147009cb22a1c3f27c36feed45a:1" and then split it in the chaincode? Let me know your approaches please and we can get to a unified way to do it.

CT123 (Tue, 15 Oct 2019 15:27:41 GMT):
Has joined the channel.

rallam (Tue, 15 Oct 2019 22:20:05 GMT):
Hi, I am trying to implement a couch db query to use skip and limits for the pagination. When executing the same query against my local couch db instance, it returns a limited list and skips properly. But, after going through the getQueryResults of the chaincode, it's showing all the records ignoring the skip and limit. Does fabric support limit and skip for the pagination or is it just bookmark..?

davidkel (Wed, 16 Oct 2019 06:47:02 GMT):
you can't use skip and limit, only bookmark

simran (Wed, 16 Oct 2019 10:54:25 GMT):
Has joined the channel.

simran (Wed, 16 Oct 2019 10:55:23 GMT):

Screenshot from 2019-10-16 16-06-02.png

muralisr (Wed, 16 Oct 2019 12:21:31 GMT):
@simran what version of fabric are u running ?

simran (Wed, 16 Oct 2019 12:22:20 GMT):
1.4.1 @muralisr

simran (Wed, 16 Oct 2019 12:22:49 GMT):
actually i have created the network on docker swarm overlay network

simran (Wed, 16 Oct 2019 12:24:05 GMT):

Screenshot from 2019-10-16 16-39-20.png

simran (Wed, 16 Oct 2019 12:24:34 GMT):
so i thin the error is in the instantiating the chaincode

muralisr (Wed, 16 Oct 2019 12:40:48 GMT):
It is possible... did those chaincode have non-empty args specified during instantiation ?

muralisr (Wed, 16 Oct 2019 12:41:29 GMT):
if so, you are probably correct...

simran (Wed, 16 Oct 2019 12:43:31 GMT):
yeah when i instatiated the chaincode the args

Shubham-koli (Wed, 16 Oct 2019 12:43:46 GMT):
Has joined the channel.

simran (Wed, 16 Oct 2019 12:43:59 GMT):
are nonempty

muralisr (Wed, 16 Oct 2019 12:44:02 GMT):
ok

muralisr (Wed, 16 Oct 2019 12:44:03 GMT):
and you see errors for every one of the instantiated chaincodes ?

simran (Wed, 16 Oct 2019 12:44:10 GMT):
yeah

simran (Wed, 16 Oct 2019 12:44:33 GMT):
when i invoke the chaincode this above image error is coming

muralisr (Wed, 16 Oct 2019 12:44:39 GMT):
so basically try to get them instantiated first :-)

simran (Wed, 16 Oct 2019 12:46:38 GMT):
yeah its instantiated correctly

simran (Wed, 16 Oct 2019 12:47:14 GMT):

Screenshot from 2019-10-16 18-16-48.png

muralisr (Wed, 16 Oct 2019 12:48:03 GMT):
I misread the error (so the instantiate worked and later invoke failed ?)

simran (Wed, 16 Oct 2019 12:48:12 GMT):
yeah actually

Shubham-koli (Wed, 16 Oct 2019 12:48:25 GMT):
you can't create two separate contracts in one chaincode but you can create two functions in one chaincode which will do different functionalities. for example we can create calculator chaincode and it can have different functionalities like add, multiply,divide,modulus.

muralisr (Wed, 16 Oct 2019 12:53:08 GMT):
@simran the above screenshot has "newchaincodenode2" ... I don't see it on the output from the the list command

simran (Wed, 16 Oct 2019 12:53:59 GMT):

Screenshot from 2019-10-16 17-41-38.png

simran (Wed, 16 Oct 2019 12:54:13 GMT):
yeah u can see here as well

simran (Wed, 16 Oct 2019 12:54:16 GMT):
in the image

muralisr (Wed, 16 Oct 2019 12:58:59 GMT):
Can you open a JIRA for investigation please ?

soumyanayak (Wed, 16 Oct 2019 13:00:31 GMT):
@muralisr As in the above screenshot -- in the instantiated list of chaincodes -- what is that field *input* whose value is ** in all

soumyanayak (Wed, 16 Oct 2019 13:02:25 GMT):
This field is not seen when i run the instantiated list from CLI tools container but can be seen from @simran screenshot when run from peer container

muralisr (Wed, 16 Oct 2019 13:04:19 GMT):
@soumyanayak can you paste your screenshot ?

soumyanayak (Wed, 16 Oct 2019 13:04:59 GMT):

Clipboard - October 16, 2019 6:34 PM

muralisr (Wed, 16 Oct 2019 13:13:08 GMT):
can you do `peer version` on both envs and compare ?

soumyanayak (Wed, 16 Oct 2019 13:14:04 GMT):
mine is v1.4.3

soumyanayak (Wed, 16 Oct 2019 13:14:57 GMT):
root@ubuntuVMServer14:/opt/scripts# peer version peer: Version: 1.4.3 Commit SHA: b8c4a6a Go version: go1.11.5 OS/Arch: linux/amd64 Chaincode: Base Image Version: 0.4.15 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger

soumyanayak (Wed, 16 Oct 2019 13:15:19 GMT):
and i guess @simran is v1.4.1

soumyanayak (Wed, 16 Oct 2019 13:15:56 GMT):
so in the v1.4.3 this *input *field is removed ??

muralisr (Wed, 16 Oct 2019 13:18:02 GMT):
Its not removed but I think it was updated

muralisr (Wed, 16 Oct 2019 13:18:17 GMT):
not sure if the update is wprking correctly

soumyanayak (Wed, 16 Oct 2019 13:19:26 GMT):
For me till now no issues . But what exactly was this *input *field for ?

muralisr (Wed, 16 Oct 2019 13:19:56 GMT):
https://github.com/hyperledger/fabric/blob/release-1.4/protos/peer/query.proto#L41

simran (Wed, 16 Oct 2019 13:24:24 GMT):
@muralisr yeah that mean i have to upgrade the version

simran (Wed, 16 Oct 2019 13:25:30 GMT):
no mine is also peer version is 1.4.3

simran (Wed, 16 Oct 2019 13:26:04 GMT):
oot@6b54ce735177:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer version peer: Version: 1.4.3 Commit SHA: b8c4a6a Go version: go1.11.5 OS/Arch: linux/amd64 Chaincode: Base Image Version: 0.4.15 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger

muralisr (Wed, 16 Oct 2019 13:32:40 GMT):
Ok. not sure what's happening... please open a JIRA with recreate and logs

cenkozan (Wed, 16 Oct 2019 15:56:25 GMT):
Has joined the channel.

soumyanayak (Thu, 17 Oct 2019 06:17:43 GMT):
@simran Can you please raise a JIRA issue for the above with steps and screenshots and log output and post here the ID?

simran (Thu, 17 Oct 2019 06:52:17 GMT):
yeah i will raise this issue on jira once i got the free

Ammu (Thu, 17 Oct 2019 07:58:39 GMT):

intall_error.png

simran (Thu, 17 Oct 2019 08:51:41 GMT):
u need to restart the terminal it will be resolved otherwise pls check the memory

mahoney1 (Thu, 17 Oct 2019 09:04:18 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 09:13:14 GMT):
thanks simran ..... go installation issue

Ammu (Thu, 17 Oct 2019 14:18:43 GMT):

instantiate.png

Ammu (Thu, 17 Oct 2019 14:18:53 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 instantiate -o orderer.example.com:7050 -C mychannel -n fabcar -l node -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member')" 2019-10-17 14:11:09.529 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-10-17 14:11:09.529 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction a116295fc1f60f124e9683d95bee9ec4591fa2485dd8c5b24186df16591a3535: timeout expired while starting chaincode fabcar:1.0 for transaction a116295fc1f60f124e9683d95bee9ec4591fa2485dd8c5b24186df16591a3535

silviu (Thu, 17 Oct 2019 21:05:51 GMT):
hi everyone, it is possible to use a single distributed ledger for indy and fabric transactions at the same time ?

metadata (Fri, 18 Oct 2019 06:36:37 GMT):
Hey All, I'm working on testing the chaincode using `MockStub`. In chaincode, I have a method `CreateUser()` in which I'm fetching some details like `cid.GetAttributeValue()`, `cid.GetID()` and `cid.GetMSPID()` . I have to test `CreateUser()` method using `MockStub` . I tired to test it but ran into an error ``` Expecting a PEM-encoded X509 certificate; PEM block not found ``` . I think it is because I'm not providing any certificate. So, Is there any functionality in `MockStub` to test these kind of things?

metadata (Fri, 18 Oct 2019 06:36:37 GMT):
Hey All, I'm working on testing the chaincode using `MockStub`. In chaincode, I have a method `CreateUser()` in which I'm fetching some details like `cid.GetAttributeValue()`, `cid.GetID()` and `cid.GetMSPID()` . I have to test `CreateUser()` method using `MockStub` . I tried to test it but ran into an error ``` Expecting a PEM-encoded X509 certificate; PEM block not found ``` . I think it is because I'm not providing any certificate. So, Is there any functionality in `MockStub` to test these kind of things?

metadata (Fri, 18 Oct 2019 06:36:37 GMT):
Hey All, I'm working on testing the chaincode using `MockStub`. In chaincode, I have a method `CreateUser()` in which I'm fetching some details like `cid.GetAttributeValue()`, `cid.GetID()` and `cid.GetMSPID()` . I have to test `CreateUser()` method using `MockStub` . I tried to test it but ran into an error ``` Expecting a PEM-encoded X509 certificate; PEM block not found ``` . I think it is because I'm not providing any certificate. So, Is there any functionality in `MockStub` to test these kind of things? Any reference or an example would be a great help.

Chacha420 (Sat, 19 Oct 2019 18:36:56 GMT):

Clipboard - October 20, 2019 12:05 AM

cenkozan (Mon, 21 Oct 2019 12:29:42 GMT):
Hi, all. Beginner here. Can anyone point me how to develop, debug, and deploy chaincode with Java?

muralisr (Mon, 21 Oct 2019 13:46:15 GMT):
@cenkozan can you try in #fabric-java-chaincode ?

cenkozan (Mon, 21 Oct 2019 13:55:32 GMT):
@cenkozan can you try in #fabric-java-chaincode ?

HLFPOC (Tue, 22 Oct 2019 07:00:34 GMT):
Hi Team, I am trying to fetch the blocks from my transactions in chaincode and noticed that block number starts from 4. Can anyone guide what all details gets stored in blocks from 0 till 3 and how to get those blocks in client app?

knagware9 (Wed, 23 Oct 2019 04:39:54 GMT):
these blocks are genesis block and any update transaction on the channel like anchor peer update etc...you need to get block details by blockiD or there is tool like configtxlator tool to get JSON format data from genesis block

gdinhof (Wed, 23 Oct 2019 09:33:41 GMT):
Has joined the channel.

MKabanau (Wed, 23 Oct 2019 12:46:15 GMT):
Has joined the channel.

medikent (Wed, 23 Oct 2019 20:39:57 GMT):
Any ideas why I would be getting an *access denied* gRPC error when trying to connect to a peer on my network through fabric-gateway-java?

joseph-d-p (Thu, 24 Oct 2019 02:35:22 GMT):
Has joined the channel.

saanvijay (Thu, 24 Oct 2019 10:11:57 GMT):
Has joined the channel.

rmscott (Thu, 24 Oct 2019 15:39:48 GMT):
Has joined the channel.

umapoyo (Fri, 25 Oct 2019 02:54:04 GMT):
Has joined the channel.

SamYuan1990 (Sun, 27 Oct 2019 06:49:53 GMT):
Has joined the channel.

SamYuan1990 (Sun, 27 Oct 2019 06:49:54 GMT):
Hi I am going to create a CR for fabric-chaincode-node, but I received an error ! [remote rejected] HEAD -> refs/for/master (prohibited by Gerrit: project state does not permit write), can anyone help?

Shabana1717344 (Sun, 27 Oct 2019 07:09:19 GMT):
Has joined the channel.

mbwhite (Mon, 28 Oct 2019 09:54:54 GMT):
@SamYuan1990 we're migrating the repos from gerrit to github... Chaincode-node is already in github and I'm tuning the build as I type this... please go to github and raise a pr against the repo there...

SamYuan1990 (Mon, 28 Oct 2019 09:58:40 GMT):
@mbwhite , so, pls correct me for any mistake, I just fork github, new branch, developing, and new pr?

mbwhite (Mon, 28 Oct 2019 09:59:06 GMT):
exactly ;-)

mbwhite (Mon, 28 Oct 2019 10:00:43 GMT):
is there any issue in JIRA relating to what you're doing .... (thanks for the PR though... !!!) The pipeline build isn't quite working yet... hopefully we'll get it through without too much hassle

mbwhite (Mon, 28 Oct 2019 10:06:44 GMT):
General question to the channel - we've 'fabric-chaincode-dev' and 'fabric-java-chaincode' but three languages to write chaincode in.. nodejs, Java, Golang... nodejs and Java have the updated programming model, and golang on it's way... Do you think it would better to have 1 channel per language, or just one channel for all languages?

SamYuan1990 (Mon, 28 Oct 2019 12:22:12 GMT):
well, just finished dinner. I am doing some changes related with FAB-15695 ~

SamYuan1990 (Tue, 29 Oct 2019 15:14:21 GMT):
hi there is one thing confusing me tonight about nodejs chian code master branch. i tried rush test:fv but there some error during test chaincode install and the test passed? or say test:fv passed

mbwhite (Tue, 29 Oct 2019 16:26:49 GMT):
@SamYuan1990 can you give me some more info please?

SamYuan1990 (Wed, 30 Oct 2019 04:53:47 GMT):
@mbwhite , send you details in direct message. The full long and steps is too long...

tegie (Wed, 30 Oct 2019 11:36:13 GMT):
Has joined the channel.

karthiknvlr (Wed, 30 Oct 2019 11:45:18 GMT):
Has joined the channel.

tegie (Wed, 30 Oct 2019 11:50:22 GMT):
Hi all, beginner here. I would like to ask what is the advantage when we are using peer in dev mode or net mode in docker on local machine? In both cases, when I am developing chaincode I have to install chaincode with higher version and then call `peer upgrade` method to work with updated chaincode version?

tegie (Wed, 30 Oct 2019 11:50:22 GMT):
Hi all, beginner here. I would like to ask what is the advantage when we are using peer in `dev` mode or `net` mode in docker on local machine? In both cases, when I am developing chaincode I have to install chaincode with higher version and then call `peer upgrade` method to work with updated chaincode version?

VadimInshakov (Wed, 30 Oct 2019 18:26:38 GMT):
Has joined the channel.

AllanHansen (Fri, 01 Nov 2019 00:33:46 GMT):
Has joined the channel.

VenkateshSorapalli (Sun, 03 Nov 2019 12:24:36 GMT):
Has joined the channel.

VenkateshSorapalli (Sun, 03 Nov 2019 12:25:10 GMT):
Do you have any idea how to listen the event emitted in fabric chaincode (event listener)

VenkateshSorapalli (Sun, 03 Nov 2019 12:25:10 GMT):
Anyone have idea about how to listen the event emitted in fabric chaincode (event listener)

mbwhite (Mon, 04 Nov 2019 10:07:05 GMT):
@bestbeforetoday might be able to point you in the correct direction..

VenkateshSYS (Tue, 05 Nov 2019 10:52:39 GMT):
Has joined the channel.

VenkateshSYS (Tue, 05 Nov 2019 10:52:40 GMT):
cannot use data (type peer.Response) as type []byte in argument to shim.Success How to convert type peer.Response to []byte

Paradox-AT (Tue, 05 Nov 2019 11:11:15 GMT):
why do you need to convert []byte->peer.Response?

Paradox-AT (Tue, 05 Nov 2019 11:11:41 GMT):
You will send the response in the form of peer.Response

Paradox-AT (Tue, 05 Nov 2019 11:12:08 GMT):
eg: `return shim.Success([]byte("Chaincode invoked"))`

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function `` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length } ``

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function `` ` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length } ` ``

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function ` `` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length } `` `

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function ` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length } `

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function ``` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length } ```

VenkateshSYS (Tue, 05 Nov 2019 11:42:25 GMT):
Here I am trying to return the length by calling the getLength function from another function ``` func (t *Chaincode) getLength(stub shim.ChaincodeStubInterface) pb.Response { var err error var jsonResp string totalLength, err := stub.GetState("length") // {"length":22} if err != nil { jsonResp = "{\"Error\":\"Failed to get length\"}" return shim.Error(jsonResp) } else if totalLength == nil { jsonResp = "{\"length\":\" 000 \"}" return shim.Error(jsonResp) } return shim.Success(totalLength); } func (t *Chaincode) temp(stub shim.ChaincodeStubInterface) pb.Response { var length = t.getLength(stub) return length //how to retun the length from this function } ```

bestbeforetoday (Tue, 05 Nov 2019 13:16:54 GMT):
For a Node.js client see: https://fabric-sdk-node.github.io/release-1.4/tutorial-listening-to-events.html For a Java client see the `addContractListener` method at: https://fabric-gateway-java.github.io/org/hyperledger/fabric/gateway/Contract.html These build on low-level Node.js and Java SDK capabilities so you can use the low level event listening APIs directly if you are developing with the low-level APIs but, where practical, I would encourage use of the higher level APIs for ease of use

SimranGoyal (Wed, 06 Nov 2019 05:23:09 GMT):
Has joined the channel.

soumyanayak (Wed, 06 Nov 2019 13:04:41 GMT):
Hi team, i was trying to build the *cid.go* chaincode from the github link --> https://github.com/hyperledger/fabric/blob/v1.4.3/core/chaincode/lib/cid/cid.go (v1.4.3) and i was getting the below error ```root@ubuntuVMServer1:/opt/gopath/src/cid# go build cid # cid ./cid.go:33:17: undefined: ChaincodeStubInterface ./cid.go:43:21: undefined: ChaincodeStubInterface ./cid.go:52:30: undefined: ChaincodeStubInterface ./cid.go:61:32: undefined: ChaincodeStubInterface ./cid.go:71:30: undefined: ChaincodeStubInterface ./cid.go:81:8: undefined: ChaincodeStubInterface ``` but after adding the import statement - *"github.com/hyperledger/fabric/core/chaincode/shim"* and instead of ChaincodeStubInterface -- *modified *it to shim.ChaincodeStubInterface , then its working. So is there any bug in the code or anything from my end i have to check ?

soumyanayak (Wed, 06 Nov 2019 13:04:41 GMT):
Hi team, i was trying to build the *cid.go* chaincode from the github link --> https://github.com/hyperledger/fabric/blob/v1.4.3/core/chaincode/lib/cid/cid.go (v1.4.3) and i was getting the below error ```root@ubuntuVMServer1:/opt/gopath/src/cid# go build cid # cid ./cid.go:33:17: undefined: ChaincodeStubInterface ./cid.go:43:21: undefined: ChaincodeStubInterface ./cid.go:52:30: undefined: ChaincodeStubInterface ./cid.go:61:32: undefined: ChaincodeStubInterface ./cid.go:71:30: undefined: ChaincodeStubInterface ./cid.go:81:8: undefined: ChaincodeStubInterface ``` but after adding the import statement - *"github.com/hyperledger/fabric/core/chaincode/shim"* and instead of ```ChaincodeStubInterface``` -- *modified *it to ```shim.ChaincodeStubInterface``` , then its working. So is there any bug in the code or anything from my end i have to check ?

mbwhite (Wed, 06 Nov 2019 13:49:51 GMT):
@andrew.hurt1

mbwhite (Wed, 06 Nov 2019 13:49:51 GMT):
@awjh any ideas? ^

VenkateshSorapalli (Wed, 06 Nov 2019 18:46:02 GMT):
How to check from which org is calling the invoke statement i.e., let peer0org1, peer1org1, peer0org2, peer1org2 are running. Same chaincode is deployed on all, while calling the invoke statement how to restrict to particular org

AjayKalola (Thu, 07 Nov 2019 05:36:02 GMT):
Hello Everyone, i am getting error in instantiate chaincode . here is the log of error . if somebody have solution please help me https://pastebin.com/btkGbjgd

AjayKalola (Thu, 07 Nov 2019 05:36:02 GMT):
Hello Everyone, i am getting error in instantiate chaincode . here is the log of error . if somebody have solution please help me https://pastebin.com/btkGbjgd Thanks in advance

knagware9 (Thu, 07 Nov 2019 08:14:34 GMT):
are you using node chaincode ? seems issue with grpc module rebuild\

VenkateshSYS (Thu, 07 Nov 2019 08:17:35 GMT):
I'm geeting this error while calling the GetCallerCertificate method stub.GetCallerCertificate undefined (type shim.ChaincodeStubInterface has no field or method GetCallerCertificate) ``` xx, err1 := stub.GetCallerCertificate() if err1 != nil { matchLogger.Info(err1) } matchLogger.Info("Cert ----") matchLogger.Info(string(xx)) matchLogger.Info("----") ```

AjayKalola (Thu, 07 Nov 2019 09:39:57 GMT):
yes i am using node chaincode

elmira (Fri, 08 Nov 2019 08:52:13 GMT):
Has joined the channel.

elmira (Fri, 08 Nov 2019 08:54:02 GMT):
hello, I'm new in this channel

elmira (Fri, 08 Nov 2019 09:08:38 GMT):
hello I'm new on this channel I'm getting this error while run start.sh script of Commercial paper tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html I search it on the web and do some solution like # stop all processes docker stop $(docker ps -aq) # remove all containers docker rm $(docker ps -aq) # remove all images docker rmi -f $(docker images -aq) # delete all volumes docker volume prune and do the step from beginning but it doesn't works for me I appreciate for any help

elmira (Fri, 08 Nov 2019 09:08:38 GMT):
hello I'm new on this channel I'm getting this error error getting endorser client for install: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded while run start.sh script of Commercial paper tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html I search it on the web and do some solution like # stop all processes docker stop $(docker ps -aq) # remove all containers docker rm $(docker ps -aq) # remove all images docker rmi -f $(docker images -aq) # delete all volumes docker volume prune and do the step from beginning but it doesn't works for me I appreciate for any help

elmira (Fri, 08 Nov 2019 09:08:38 GMT):
hello I'm new on this channel I'm getting this error :error getting endorser client for install: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded while run start.sh script of Commercial paper tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html I search it on the web and do some solution like # stop all processes docker stop $(docker ps -aq) # remove all containers docker rm $(docker ps -aq) # remove all images docker rmi -f $(docker images -aq) # delete all volumes docker volume prune and do the step from beginning but it doesn't works for me I appreciate for any help

elmira (Fri, 08 Nov 2019 09:08:38 GMT):
hello I'm new on this channel I'm getting this error :"error getting endorser client for install: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded "while run start.sh script of Commercial paper tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html I search it on the web and do some solution like # stop all processes docker stop $(docker ps -aq) # remove all containers docker rm $(docker ps -aq) # remove all images docker rmi -f $(docker images -aq) # delete all volumes docker volume prune and do the step from beginning but it doesn't works for me I appreciate for any help

elmira (Fri, 08 Nov 2019 09:08:38 GMT):
hello I'm new on this channel I'm getting this error :"error getting endorser client for install: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded "while run start.sh script of Commercial paper tutorial https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html I search it on the web and do some solution like # stop all processes docker stop $(docker ps -aq) # remove all containers docker rm $(docker ps -aq) # remove all images docker rmi -f $(docker images -aq) # delete all volumes docker volume prune and do the step from the beginning of tutorial but it doesn't work for me I appreciate for any help

knagware9 (Fri, 08 Nov 2019 10:57:09 GMT):
check if peero are running

sinoz (Tue, 12 Nov 2019 14:20:22 GMT):
Has joined the channel.

sinoz (Tue, 12 Nov 2019 14:20:24 GMT):
Hi. I don't know if this is the right channel but I am currently using Convector to write chaincode in TypeScript & NodeJS and for some odd reason I keep running into this error which completely blocks any further development:

sinoz (Tue, 12 Nov 2019 14:20:47 GMT):

issue.jpeg

sinoz (Tue, 12 Nov 2019 14:23:02 GMT):
it started happening after I added a custom function in my convector controller. however, when i remove this function the problem persists. the error message isn't helping either

sinoz (Tue, 12 Nov 2019 14:23:02 GMT):
it started happening after I added a custom function in my convector controller. however, when i remove this function the problem persists. the error message isn't helping either. I have written unit tests that work perfectly fine and all pass. the API server i have regurgitates this error after packaging up my chaincode

mbwhite (Tue, 12 Nov 2019 17:10:29 GMT):
Hello; no this forum is purely for the Hyperledger Fabric Chaincode and Contract development..

mbwhite (Tue, 12 Nov 2019 17:10:38 GMT):
Convector is a library built on top it...

mbwhite (Tue, 12 Nov 2019 17:11:13 GMT):
Though whilst you're here I would encourage you to look at the Contract Programming model within Fabric... Typescript and Java support now.

sinoz (Tue, 12 Nov 2019 17:27:50 GMT):
My apologies. Do you perhaps know which forum I can join to get the help I desire?

davidkel (Tue, 12 Nov 2019 18:57:15 GMT):
Have a look at the page here, it provides some links https://github.com/hyperledger-labs/convector I believe the convector community use discord for chat like interations

DilipManjunatha (Wed, 13 Nov 2019 13:06:22 GMT):
Has joined the channel.

mahoney1 (Thu, 14 Nov 2019 15:36:30 GMT):
reminder that today's Fabric Application community call at 4pm UTC is cancelled, per [my mailing list message](https://lists.hyperledger.org/g/fabric/message/7181) - the next community call is on November 28th :-)

mbanerjee (Thu, 14 Nov 2019 18:57:12 GMT):
Can a chaincode policy be altered post installation? Say the policy requires 1-of (two orgs) to consent? Can it be changed to 0-of or 3-of if a new organization joins the network?

mahoney1 (Fri, 15 Nov 2019 09:26:45 GMT):
yes certainly - you can see an example in the docs -> https://hyperledger-fabric.readthedocs.io/en/release-1.4/channel_update_tutorial.html#upgrade-and-invoke-chaincode (scroll down to the upgrade example) - or answer, in this stack overflow -> https://stackoverflow.com/questions/54548541/modify-existing-endorsement-policy-hyperledger-fabric

rpocase (Fri, 15 Nov 2019 18:16:32 GMT):
Has joined the channel.

rpocase (Fri, 15 Nov 2019 18:16:33 GMT):
Are there any common patterns emerging with regards to ownership of chaincode installed on multiple organizations peers? I'm curious how often consortiums are doing joint development of common chaincode or if networks are seeing consulting firms acting as an intermediary for chaincode development.

muralisr (Sat, 16 Nov 2019 15:13:22 GMT):
@rpocase in my experience its all of the above... when companies do collaborate in joint dev, there typically is a usage or interest pattern that makes one or two companies take the initiative (and are more involved) while others vet and use - as you'd expect in any common endeavor

KarthikKavinA (Sun, 17 Nov 2019 00:52:59 GMT):
Has joined the channel.

VenkateshSYS (Sun, 17 Nov 2019 19:52:59 GMT):
I've defined in policy config file for three organizations ```{ "name": "Org1_Org2_Org3", "policy": "OR('Org1MSP.member','Org2MSP.member','Org3MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive": 0, "memberOnlyRead": true },``` I'am performing PutPrivateData function from Org1 with "Org1_Org2_Org3" policy name => excution of transaction is successfully But while executing GetPrivateData function from Org1 => returns data successfully from Org2 and Org3 it fails by throwing this error ``` GET_STATE failed: transaction ID: 0a98bd15527f37437ce1881739c6aa6f8985cb62ee8389be9bd098dae396ad06: private data matching public hash version is not available. Public hash version = {BlockNum: 26, TxNum: 0}, Private data version = \" ```

jyxie2007 (Mon, 18 Nov 2019 03:57:59 GMT):
Has joined the channel.

rthatcher (Mon, 18 Nov 2019 12:12:50 GMT):
Do you have anchor peers correctly configured for the 3 organisations? and gossip working between the organisations?

adriksemenove (Mon, 18 Nov 2019 13:11:43 GMT):
Has joined the channel.

awjh (Wed, 20 Nov 2019 14:26:22 GMT):
Has joined the channel.

aiga (Thu, 21 Nov 2019 04:37:48 GMT):
Hello, can anyone tell why peer chaincode command can not take a arguments from txt file in bash script? ' #!/bin/bash while read -r line1 <&3 && read -r line2 <&4; do peer chaincode invoke -c '{"Args":["createDocRecord", "$line1" , "$line2"]}' -o orderer.example.com:7050 -C bloom-filter-channel -n bloom-filter --peerAddresses peer0.org2.example.com:9051 done 3

aiga (Thu, 21 Nov 2019 04:48:44 GMT):
Hello, can anyone tell why peer chaincode command can not take a arguments from txt file in bash script? ` #!/bin/bash while read -r line1 <&3 && read -r line2 <&4; do peer chaincode invoke -c '{"Args":["createDocRecord", "$line1" , "$line2"]}' -o orderer.example.com:7050 -C bloom-filter-channel -n bloom-filter --peerAddresses peer0.org2.example.com:9051 done 3

sung (Thu, 21 Nov 2019 08:32:28 GMT):
Has joined the channel.

SatheeshNehru (Sun, 24 Nov 2019 03:53:38 GMT):
Is there any sdk to replace configtxgen configtxlator and docker operation?will be glad if sample code is shared?

muralisr (Sun, 24 Nov 2019 14:10:49 GMT):
@aiga would need more info on what problem you are seeing... but offhand, I assume you made sure line1 and line2 are correct (basically echo $line1 $line2) ?

muralisr (Sun, 24 Nov 2019 14:13:20 GMT):
@SatheeshNehru no SDKs to replace configtxgen and configtxgen as commands

muralisr (Sun, 24 Nov 2019 14:13:20 GMT):
@SatheeshNehru no SDKs that I'm aware ofto replace configtxgen and configtxgen as commands

selvaraman (Tue, 26 Nov 2019 06:18:01 GMT):
I have the following similar scenario. How to design this data structure in hyperledger composer. Medical records have list of disorders, prescriptions and supplements. We can design this in the following way in relation database, Disorders (pre-determined list of disorders. There will be maximum 10 disorders) --------- id name prescriptions ------------- id name supplements ----------- id name medical records --------------- id date disorder_id prescription_id supplement_id Can we use the same design method in hyperledger composer model design or can we use like the following? which is the best practice? medical_records --------------- id date disorders: [disorder1, disorder2...etc] prescriptions: [{name, start_date, end_date},{name, start_date, end_date},{name, start_date, end_date}....etc] supplements: [supplement1, supplement2... etc]

heatherp (Tue, 26 Nov 2019 10:05:36 GMT):
Has joined the channel.

davidkhala (Tue, 26 Nov 2019 10:12:05 GMT):
but for docker operation, welcome to try my sample delphi-fabric

prayagk (Wed, 27 Nov 2019 10:52:01 GMT):
Has joined the channel.

prayagk (Wed, 27 Nov 2019 10:53:06 GMT):
does shim.Error() deprecated?

drjkr4844 (Thu, 28 Nov 2019 06:59:19 GMT):
Has joined the channel.

guptasndp10 (Thu, 28 Nov 2019 10:20:55 GMT):
Has joined the channel.

mahoney1 (Thu, 28 Nov 2019 11:58:05 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

skoret (Thu, 28 Nov 2019 17:14:53 GMT):
Has joined the channel.

lucasmori (Fri, 29 Nov 2019 15:23:09 GMT):
Has joined the channel.

lucasmori (Fri, 29 Nov 2019 15:23:11 GMT):
Hi guys, I implemented a method to transfer an asset from org1 to org2, but i can't create a validation to verify if the org2 exists at the channel, for verify if the org1 exists i use this `ctx.stub.getCreator().getMspid().toString().toLowerCase()`. I don't know how to verify org 2

pavan_2299 (Tue, 03 Dec 2019 05:03:21 GMT):
Has joined the channel.

KalyaniPullela (Tue, 03 Dec 2019 19:18:32 GMT):
Has joined the channel.

PremaGulp (Tue, 03 Dec 2019 20:52:05 GMT):
Has joined the channel.

mania06 (Wed, 04 Dec 2019 14:09:09 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 ?

mania06 (Wed, 04 Dec 2019 14:24:35 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-sh

PremaGulp (Wed, 04 Dec 2019 21:30:02 GMT):
Hello All Just a quick question How to query the list of tranasctions in a chaincode or in other words, the block height details from the gensis block to recent block in fabric network

Paradox-AT (Thu, 05 Dec 2019 11:37:17 GMT):
I have a similar doubt on the same line, is there any way to get the transaction parameters for historical states?

Paradox-AT (Thu, 05 Dec 2019 11:37:59 GMT):
I need to get the function name provided while invoking the transaction.

Paradox-AT (Thu, 05 Dec 2019 12:07:11 GMT):
Can Anyone help me on this: https://stackoverflow.com/questions/59194606/how-to-get-the-parameters-passed-to-the-transaction-for-the-historical-states

Paradox-AT (Thu, 05 Dec 2019 12:07:11 GMT):
Can Anyone help me on this: https://stackoverflow.com/questions/59194606/how-to-get-the-parameters-passed-to-the-transaction-for-the-historical-states

lucasmori (Thu, 05 Dec 2019 12:34:44 GMT):
Hi guys, I implemented a method to transfer an asset from org1 to org2, but i can't create a validation to verify if the org2 exists at the channel, for verify if the org1 exists i use this `ctx.stub.getCreator().getMspid().toString().toLowerCase()`. I don't know how to verify org 2

serial-coder (Thu, 05 Dec 2019 13:42:54 GMT):
Has joined the channel.

tengc (Thu, 05 Dec 2019 19:47:27 GMT):
Has joined the channel.

SimonJousse (Fri, 06 Dec 2019 10:04:56 GMT):
Has joined the channel.

ahmad-raza (Fri, 06 Dec 2019 10:39:32 GMT):
How can we STRESS TEST the chaincode? Running 1000s of transactions simultaneously Querying chaincode 1000s of time simultaeously I am querying the chaincode through API 500 times using Jmeter but it TIMEOUTS failed to execute transaction 359bac57b6d49433e173b99e72d1675bfdcdaacfae68c11f7d3928f40e25941f: error sending: timeout expired while executing transaction ?

Rajatsharma (Sat, 07 Dec 2019 06:45:48 GMT):
Hi everyone, Is there any way we can increase the number of KAFKA's running in production ?

mbwhite (Mon, 09 Dec 2019 09:56:09 GMT):
Can I suggest that you look at Caliper https://hyperledger.github.io/caliper/?

Paradox-AT (Mon, 09 Dec 2019 11:18:55 GMT):
Hey Guys, I am trying to use cid, but after adding the import when I am trying to install the chaincode I am getting this: ``` Error: error getting chaincode code shipment: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/shim/ext/cid: command : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/shim/ext/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim/ext/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid (from $GOPATH) ``` Any suggestions?

Paradox-AT (Mon, 09 Dec 2019 11:18:55 GMT):
Hey Guys, I am trying to use cid, but after adding the import when I am trying to install the chaincode I am getting this: ``` Error: error getting chaincode code shipment: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/shim/ext/cid: command : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/core/chaincode/shim/ext/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim/ext/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/ext/cid (from $GOPATH) ``` How do I add the dependancies to the docker containers?

andreevym (Tue, 10 Dec 2019 09:10:14 GMT):
Has joined the channel.

billd100 (Wed, 11 Dec 2019 14:55:20 GMT):
Has joined the channel.

mahoney1 (Thu, 12 Dec 2019 10:07:45 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

mbwhite (Thu, 12 Dec 2019 15:25:27 GMT):
^ I'll be talking about the Ledger API RFC

mbvivek (Thu, 12 Dec 2019 16:05:04 GMT):
Has joined the channel.

mbvivek (Thu, 12 Dec 2019 16:09:40 GMT):
Hello, I am trying to install & instantiate node-js chaincode using fabric-java-sdk. I am able to successfully install it on a channel, but when I try to instantiate it, it throws me this error. - response = failed to execute transaction 5ce7258160fc48ada31e94f43671eb8f8838b7459dcdcdcd00b6e040da2f8d90: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package test-chaincode: no Go files in /chaincode/input/src/test-chaincode" Has anyone encountered a similar problem and found a solution? Please let me know. Thanks in advance.

awjh (Thu, 12 Dec 2019 16:54:51 GMT):
What language are you using, I have seen that error in the CLI when I failed to set the language correctly (it defaults to Go). I assume the SDK may work in a similar way

mbvivek (Thu, 12 Dec 2019 17:34:46 GMT):
I am setting it to NODE..

mbvivek (Thu, 12 Dec 2019 17:35:07 GMT):
This is how I am doing it - instantiateProposalRequest.setChaincodeLanguage(Type.NODE);

YashGupta1 (Fri, 13 Dec 2019 13:14:13 GMT):

Clipboard - December 13, 2019 6:44 PM

YashGupta1 (Fri, 13 Dec 2019 13:14:13 GMT):

Clipboard - December 13, 2019 6:44 PM

YashGupta1 (Fri, 13 Dec 2019 13:14:13 GMT):

Clipboard - December 13, 2019 6:44 PM

YashGupta1 (Fri, 13 Dec 2019 13:14:33 GMT):
Has joined the channel.

YashGupta1 (Fri, 13 Dec 2019 13:14:34 GMT):
Does anyone know why I am getting "Failed to handle PUT_STATE. error: no ledger context" while invoking concurrent transactions.

muralisr (Sun, 15 Dec 2019 22:26:26 GMT):
@YashGupta1 full logs will be needed to confirm but this is likely because the timeout https://github.com/hyperledger/fabric/blob/release-1.4/sampleconfig/core.yaml#L542 is too small. The client side timedout and took out the context thus failing a trailing response from ledger... try increasing that

muralisr (Sun, 15 Dec 2019 22:27:00 GMT):
(or the startup_timeout there..)

muralisr (Sun, 15 Dec 2019 22:27:00 GMT):
(or the `startuptimeout` there..)

YashGupta1 (Mon, 16 Dec 2019 05:11:52 GMT):
executetimeout: 30s, its default in my case i.e 30sec

YashGupta1 (Mon, 16 Dec 2019 05:12:36 GMT):
is it too small?:thinking:

abityildiz (Mon, 16 Dec 2019 07:47:16 GMT):
Has joined the channel.

muralisr (Mon, 16 Dec 2019 13:52:16 GMT):
it depends on your use case... if changing the timeout fixes your problem you need to analyse why it needs a large timeout for your proposal

indirajith (Mon, 16 Dec 2019 14:02:08 GMT):
Hi all. I get the following error when I try to instantiate go chaincode from CLI. ``` [chaincode] Launch -> DEBU 7f1ecb stopping due to error while launching: container exited with 2 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1337 chaincode registration failed 2019-12-16 13:57:52.982 UTC [container] lockContainer -> DEBU 7f1ecc waiting for container(mycc2-1.0) lock 2019-12-16 13:57:52.982 UTC [container] lockContainer -> DEBU 7f1ecd got container (mycc2-1.0) lock 2019-12-16 13:57:52.982 UTC [dockercontroller] stopInternal -> DEBU 7f1ece stopping container id=dev-peer1-org1.inuit.local-mycc2-1.0 2019-12-16 13:57:52.983 UTC [dockercontroller] stopInternal -> DEBU 7f1ecf stop container result error="Container not running: dev-peer1-org1.inuit.local-mycc2-1.0" 2019-12-16 13:57:52.983 UTC [dockercontroller] stopInternal -> DEBU 7f1ed0 killing container id=dev-peer1-org1.inuit.local-mycc2-1.0 2019-12-16 13:57:52.984 UTC [dockercontroller] stopInternal -> DEBU 7f1ed1 kill container result id=dev-peer1-org1.inuit.local-mycc2-1.0 error="Container not running: dev-peer1-org1.inuit.local-mycc2-1.0" 2019-12-16 13:57:52.984 UTC [dockercontroller] stopInternal -> DEBU 7f1ed2 removing container id=dev-peer1-org1.inuit.local-mycc2-1.0 2019-12-16 13:57:53.006 UTC [dockercontroller] stopInternal -> DEBU 7f1ed3 remove container result id=dev-peer1-org1.inuit.local-mycc2-1.0 error=null 2019-12-16 13:57:53.006 UTC [container] unlockContainer -> DEBU 7f1ed4 container lock deleted(mycc2-1.0) 2019-12-16 13:57:53.006 UTC [chaincode] Launch -> DEBU 7f1ed5 launch complete 2019-12-16 13:57:53.006 UTC [chaincode] Deregister -> DEBU 7f1ed6 deregister handler: mycc2:1.0 2019-12-16 13:57:53.007 UTC [endorser] callChaincode -> INFO 7f1ed7 [twoorgschannel][d7be9d54] Exit chaincode: name:"lscc" (25438ms) 2019-12-16 13:57:53.007 UTC [endorser] SimulateProposal -> ERRO 7f1ed8 [twoorgschannel][d7be9d54] failed to invoke chaincode name:"lscc" , error: container exited with 2 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1337 chaincode registration failed ``` I could not get pass this issue. Any help or pointers? Thanks!

indirajith (Mon, 16 Dec 2019 14:04:22 GMT):
From within CLI container, when I try to build the smart contract, I get the following error ``` root@abe2d2d07c29:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/chaincode_example02/go# go build chaincode_example02.go:29: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) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) chaincode_example02.go:30:2: cannot find package "github.com/hyperledger/fabric/protos/peer" in any of: /opt/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH) ```

indirajith (Mon, 16 Dec 2019 14:05:10 GMT):
The CLI tools container supposed to have peer and shim installed right?

mbwhite (Mon, 16 Dec 2019 14:19:37 GMT):
The peer command will be installed - but I wouldn't assume that the shim is there; there's a docker container that is used purely for building the image - it doesn't last long but often that's the place where the root error will show up.

indirajith (Mon, 16 Dec 2019 15:02:17 GMT):
Thanks @mbwhite, are you referring the chaintool ?

mbwhite (Mon, 16 Dec 2019 15:03:02 GMT):
no

indirajith (Mon, 16 Dec 2019 15:15:17 GMT):
Oh. thank you! I will try to figure it out

lionelronaldo (Mon, 16 Dec 2019 16:37:32 GMT):
Has joined the channel.

braduf (Mon, 16 Dec 2019 16:39:40 GMT):
Hi all, looking at the master branch, I see that the cid library is removed, or at least I can't find it anymore at "github.com/hyperledger/fabric/core/chaincode/lib/cid". Will there be a new library or a new way of getting the client identity in go chaincode? Can someone share information about the new approach, please?

lionelronaldo (Mon, 16 Dec 2019 16:45:33 GMT):
I often had problems with escaping the arguments in the right way when working with bash

awjh (Mon, 16 Dec 2019 16:45:35 GMT):
You may need to vendor in the package, I also think it has moved from the fabric repo into fabric-chaincode-go (unsure on the versioning of that repo)

awjh (Mon, 16 Dec 2019 16:46:48 GMT):
The go chaincode has been removed from fabric core in master and into its own repo - you can now find it here https://github.com/hyperledger/fabric-chaincode-go/tree/master/pkg/cid

braduf (Mon, 16 Dec 2019 16:51:09 GMT):
Didn't knew about the new repo. Thanks a lot!

karthiknvlr (Tue, 17 Dec 2019 06:34:08 GMT):
Hi All, Can we able to use npm modules other than fabric-shrim and fabric-contract-api in chaincode? If so how the npm packages will install while instantiate?

mbwhite (Tue, 17 Dec 2019 09:02:25 GMT):
Yes certainly; the packages are installed when the docker container is build with a `npm install --production'

mbwhite (Tue, 17 Dec 2019 09:03:04 GMT):
You can use any module, but keep in mind that it has to be determinisitic - i.e. don't use anything whose results are random/unpredictable

indirajith (Wed, 18 Dec 2019 11:11:54 GMT):
Hi all, I am encountering a problem while instantiating sacc chaincode on a 4 orderer RFT consensus blockchain. I am not able to figureout what and why goes wrong. Can any one please shed some light on how to figure this out at least where to look at ? The peer logs are here : *https://pastebin.com/gMPU8uyW*

indirajith (Wed, 18 Dec 2019 11:27:46 GMT):
CLI throws the following error: Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0

Sarah_Adams (Wed, 18 Dec 2019 11:51:57 GMT):
Has joined the channel.

Sarah_Adams (Wed, 18 Dec 2019 11:56:25 GMT):
Hi! I'm having troubles with the policies of chaincodes. When I instantiated it i used this policie: `CHAINCODE_POLICY="OR('Org1MSP.member','Org2MSP.member','Org4MSP.member')" ` However, when I invoke the chaincode with a user form Org3MSP Fabric instantiates the chaincode in Org3 Peer and the invoket goes to the ledger withy the type: ENDORSER_TRANSACTION (it should be INVALID)

Sarah_Adams (Wed, 18 Dec 2019 11:56:25 GMT):
Hi! I'm having troubles with the policies of chaincodes. When I instantiated it i used this policie: `CHAINCODE_POLICY="OR('Org1MSP.member','Org2MSP.member','Org4MSP.member')" ` However, when I invoke the chaincode with a user form Org3MSP Fabric instantiates the chaincode in Org3 Peer and the invoket goes to the ledger withy the type: ENDORSER_TRANSACTION (it should be INVALID) Do I have to modify the policy? Or modify the configtx.yml? Thanks

marinkovicvlado (Wed, 18 Dec 2019 15:19:06 GMT):
Has joined the channel.

marinkovicvlado (Wed, 18 Dec 2019 15:22:36 GMT):
Hi, Can anyone give me a guidance for mocking user identity in chaincode tests?

marinkovicvlado (Wed, 18 Dec 2019 15:22:36 GMT):
Hi, Can anyone give me a guidance for mocking user identity in chaincode tests? (golang)

PremaGulp (Wed, 18 Dec 2019 18:19:06 GMT):
[object Object]

PremaGulp (Wed, 18 Dec 2019 18:19:06 GMT):
Hello Everyone, Just a simple question The implementation of fabric using Nodejs in Fabcar example and balance-transfer example is different. Both uses the fabric network and deploys a chaincode Working is same but the coding implementation is different What's the main difference in Nodejs Fabcar example and balance-transfer example Can anyone explain it? Thank you

AbhijeetSamanta (Thu, 19 Dec 2019 04:31:29 GMT):
Has joined the channel.

mbwhite (Thu, 19 Dec 2019 09:26:01 GMT):
@PremaGulp FabCar is using the programing model introduced in Fabric 1.4; this uses the concepets of contracts and transaction functions; balance transfer uses the previous model of having init & invoke only - any chaincode written would need to do it's own functional routing. Pretty much every implementation did that - and you know don't have to write that code yourself. Check out the CommercialPaper Tutorial in the docs for more info

marinkovicvlado (Thu, 19 Dec 2019 13:07:54 GMT):
Anyone wrote chaincode unit tests for private data?

mbvivek (Thu, 19 Dec 2019 15:59:29 GMT):
Hello everyone. I have a question, can I install chaincode on a peer directly from a repository instead of providing its local path? If so, can it also be done using fabric-java-sdk? If anyone can share an example of it would be really helpful. Thanks.

mbwhite (Fri, 20 Dec 2019 08:55:09 GMT):
@mbvivek no, the files would need to be local so a custom script would be required; the updated lifecycle in the beta shows how that the first step is now to package the chaincode/contracts. This could be done as part of a CI pipline that is then stored; which can then be easily 'got' by the install pipeline

ChaoLiu (Fri, 20 Dec 2019 11:51:28 GMT):
Has joined the channel.

mbvivek (Fri, 20 Dec 2019 15:01:28 GMT):
Okay, got it.. Thanks.

manivannant (Sat, 21 Dec 2019 08:11:44 GMT):
Has joined the channel.

VenkateshSYS (Mon, 23 Dec 2019 05:28:18 GMT):
Hello Everyone, I've written a function to set default value for DEFAULT_VAR variable and used it in another function, but the DEFAULT_VAR is still empty string => "" ` var DEFAULT_VAR = "" func (t *Chaincode) setValue(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- DEFAULT_VAR = args[0]; return shim.Success([]byte("Default Value set successfull as " + DEFAULT_VAR)) } func (t *Chaincode) anotherFuct(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- return shim.Error("DEFAULT_VAR "+ DEFAULT_VAR) } `

VenkateshSYS (Mon, 23 Dec 2019 05:28:18 GMT):
Hello Everyone, I've written a function to set default value for DEFAULT_VAR variable and used it in another function, but the DEFAULT_VAR is still empty string => "" `` var DEFAULT_VAR = "" func (t *Chaincode) setValue(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- DEFAULT_VAR = args[0]; return shim.Success([]byte("Default Value set successfull as " + DEFAULT_VAR)) } func (t *Chaincode) anotherFuct(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- return shim.Error("DEFAULT_VAR "+ DEFAULT_VAR) } ``

VenkateshSYS (Mon, 23 Dec 2019 05:28:18 GMT):
Hello Everyone, I've written a function to set default value for DEFAULT_VAR variable and used it in another function, but the DEFAULT_VAR is still empty string => "" ``` var DEFAULT_VAR = "" func (t *Chaincode) setValue(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- DEFAULT_VAR = args[0]; return shim.Success([]byte("Default Value set successfull as " + DEFAULT_VAR)) } func (t *Chaincode) anotherFuct(stub shim.ChaincodeStubInterface, args []string) pb.Response { ---- return shim.Error("DEFAULT_VAR "+ DEFAULT_VAR) } ```

awjh (Mon, 23 Dec 2019 09:22:20 GMT):
If you are trying to store values between transactions I would recommend writing it to the world state

deepaksingh04 (Tue, 24 Dec 2019 13:36:26 GMT):
Has joined the channel.

deepaksingh04 (Tue, 24 Dec 2019 13:36:27 GMT):
Hello All, Can we increase number of kafka in running network?

davidkel (Tue, 24 Dec 2019 13:42:14 GMT):
This isn't relevant to chaincode development so suggest you ask on a different channel, maybe #fabric-questions

deepaksingh04 (Tue, 24 Dec 2019 13:42:42 GMT):
Thanks @davidkel . I'll ask on another channel.

konda.kalyan (Thu, 26 Dec 2019 05:55:22 GMT):
Has joined the channel.

root10 (Tue, 31 Dec 2019 14:42:59 GMT):
Has left the channel.

Rajatsharma (Wed, 01 Jan 2020 20:24:52 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.

andreevym (Thu, 02 Jan 2020 13:08:03 GMT):
hi, i want know about fabric-chaincode-java > Task :fabric-chaincode-shim:dependencyCheckAnalyze Unable to download meta file: https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2020.meta; received 404 -- resource not found Caused by: org.owasp.dependencycheck.utils.ResourceNotFoundException: Requested resource does not exists - received a 404

andreevym (Thu, 02 Jan 2020 13:08:03 GMT):
hi, i want know about https://github.com/hyperledger/fabric-chaincode-java> Task :fabric-chaincode-shim:dependencyCheckAnalyze Unable to download meta file: https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-2020.meta; received 404 -- resource not found Caused by: org.owasp.dependencycheck.utils.ResourceNotFoundException: Requested resource does not exists - received a 404

andreevym (Thu, 02 Jan 2020 13:09:21 GMT):
this gradle task have dependency from external server

andreevym (Thu, 02 Jan 2020 13:09:51 GMT):
by default plugin for gradle build plugin "dependency-check" use parameter "Base URL for each year’s CVE JSON data feed, the %d will be replaced with the year." https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html then start 2020 year if you use gradle plugin "dependency-check" you catch not found error

andreevym (Thu, 02 Jan 2020 13:12:08 GMT):
"happy new year problem"

andreevym (Thu, 02 Jan 2020 15:55:13 GMT):
https://github.com/jeremylong/DependencyCheck/issues/2403

selvaraman (Sat, 04 Jan 2020 11:28:29 GMT):
How to install my own golang chaincode using byfn.sh instead of using default

selvaraman (Sat, 04 Jan 2020 11:28:58 GMT):
in first-network

mbwhite (Mon, 06 Jan 2020 09:34:21 GMT):
Once the network has started, you can use your own chaincode as you wish... there is an option in the BYFN script to not deploy the default - check the script help. Also check out the tutorials in main documentation to show what commands to use.

selvaraman (Tue, 07 Jan 2020 02:04:47 GMT):
thanks @mbwhite

georgi (Thu, 09 Jan 2020 07:42:42 GMT):
Has joined the channel.

mbanerjee (Thu, 09 Jan 2020 18:40:27 GMT):
Is there anyway to intentionally fail a instantiate chaincode for just 1 or 2 peers?

sbkrish (Fri, 10 Jan 2020 08:16:22 GMT):
Has joined the channel.

Rajatsharma (Sat, 11 Jan 2020 10:02:01 GMT):
@mbwhite I had a very basic question. Will it be okay if the same block is getting committed with 0 code in one peer and 11 in one peer. I've gone through the code and my case, everything seems logical. But i want to know is this conceptually correct ?

mbwhite (Mon, 13 Jan 2020 09:41:34 GMT):
Not sure I fully follow the question; could you give me an example please?

Diegoescalonaro (Mon, 13 Jan 2020 09:48:35 GMT):

GetHistoryForKey.png

Diegoescalonaro (Mon, 13 Jan 2020 09:51:16 GMT):
Has joined the channel.

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the screenshot mentioned above.

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the screenshot mentioned above. ```

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the screenshot mentioned below. ``` // GetHistoryForKey function can be invoked by a chaincode to return a history of // key values across time. GetHistoryForKey is intended to be used for read-only queries. func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) { return nil, errors.New("not implemented") } ````

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the code mentioned below. ``` // GetHistoryForKey function can be invoked by a chaincode to return a history of // key values across time. GetHistoryForKey is intended to be used for read-only queries. func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) { return nil, errors.New("not implemented") } ````

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the code mentioned below. ``` // GetHistoryForKey function can be invoked by a chaincode to return a history of // key values across time. GetHistoryForKey is intended to be used for read-only queries. func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) { return nil, errors.New("not implemented") } ```` Any idea of that? I thought I saw it fixed in the jira

Diegoescalonaro (Mon, 13 Jan 2020 09:51:17 GMT):
Hi there! Has anyone written chaincode unit tests with GetHistoryForKey based functions? I'm using the fabric MockStub but I see that the function is "not implemented" as you can see in the code mentioned below. ``` // GetHistoryForKey function can be invoked by a chaincode to return a history of // key values across time. GetHistoryForKey is intended to be used for read-only queries. func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) { return nil, errors.New("not implemented") } ```` Any idea of that? I thought it was fixed in the jira

Diegoescalonaro (Mon, 13 Jan 2020 10:21:33 GMT):
All these functions are also not implemented. There is no way to test function that depends on the identity of the user/client. https://jira.hyperledger.org/browse/FAB-5644?jql=text%20~%20%22mockStub%22

Diegoescalonaro (Mon, 13 Jan 2020 10:21:33 GMT):
All these functions are also not implemented. There is no way to test function that depends on the identity of the user/client. https://jira.hyperledger.org/browse/FAB-5644?jql=text%20~%20%22mockStub%22 It seem that it was fixed but in the fabric 1.1 version...

Diegoescalonaro (Mon, 13 Jan 2020 10:21:33 GMT):
All these functions are also not implemented. There is no way to test function that depends on the identity of the user/client. https://jira.hyperledger.org/browse/FAB-5644?jql=text%20~%20%22mockStub%22 It seem that it was fixed and the task closed but in the fabric 1.1 version...

phantom.assasin (Tue, 14 Jan 2020 05:29:53 GMT):
Has joined the channel.

phantom.assasin (Tue, 14 Jan 2020 05:30:05 GMT):
Hi, is there an API to get ledger data?

heatherp (Tue, 14 Jan 2020 13:08:57 GMT):
Hi everyone, I am requesting that we enter the final comment period for the ledger-api RFC, link: https://github.com/hyperledger/fabric-rfcs/pull/16. We're looking for any final comments, objections, and support 🙂, from those interested in fabric api development. I'm proposing that it is merged at the end of this period, in one week. Please reach out to @mbwhite or me with any queries

icarrascol (Tue, 14 Jan 2020 14:22:38 GMT):
Has joined the channel.

icarrascol (Tue, 14 Jan 2020 14:22:39 GMT):
hello everyone, i have a question about stub.getStateByPartialCompositeKey, if i store my objects with a composite key formed like this let ID = await stub.createCompositeKey('poll~user', [ID, user]) to get the state of a specific poll-user can i use stub.getStateByPartialCompositeKey('poll~user', [ID, user]) or should i create the compisite key and use stub.getstate(compositekey) i am having problems with the first option because it returns an empty array, and not the data of the specific key combination

mbwhite (Tue, 14 Jan 2020 16:17:02 GMT):
be careful with the return type as it's an iterator but you should get back what your need

icarrascol (Tue, 14 Jan 2020 17:31:27 GMT):
i know its an iterator, when i query for the first attribute it returns what its spected, but when i query for the full composite key it returns nothing

icarrascol (Tue, 14 Jan 2020 17:32:29 GMT):
i verified couchdb for the generated key and what i should be querying and my query has the same values as the key in couchdb

YashShukla (Wed, 15 Jan 2020 02:10:30 GMT):
Has joined the channel.

ArthurYongShi (Wed, 15 Jan 2020 07:04:07 GMT):
Has joined the channel.

drew (Wed, 15 Jan 2020 14:01:37 GMT):
Has joined the channel.

drew (Wed, 15 Jan 2020 14:01:40 GMT):
Hi guys, I'm trying to follow the documentation for the development of chaincode (https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html), however even the simple asset example is not working (I can't build) because the lack of the package github.com/hyperledger/fabric/core/chaincode/shim (in fact I can't find it). Same for ....../fabric/protos/peer How can I solve? Where can I find the missing libraries?

awjh (Wed, 15 Jan 2020 14:21:57 GMT):
You will want to refer to github.com/hyperledger/fabric-chaincode-go/shim The peer doesn't have this on it so you will need to vendor your chaincode

drew (Wed, 15 Jan 2020 14:24:35 GMT):
_"The peer doesn't have this on it so you will need to vendor your chaincode"_ What do you mean?

awjh (Wed, 15 Jan 2020 14:26:22 GMT):
Before the peer had baked into it the files from github.com/hyperledger/fabric/core/chaincode/shim within its go path. Since the move to use github.com/hyperledger/fabric-chaincode-go/shim the shim package no longer exists by default in the go path. Vendoring is the process of adding those files to a vendor folder in your go project. You can do this by running `go mod vendor`if using go modules

awjh (Wed, 15 Jan 2020 14:26:22 GMT):
Before the peer has baked into the files from github.com/hyperledger/fabric/core/chaincode/shim within its go path. Since the move to use github.com/hyperledger/fabric-chaincode-go/shim the shim package no longer exists by default in the go path. Vendoring is the process of adding those files to a vendor folder in your go project. You can do this by running `go mod vendor`if using go modules

drew (Wed, 15 Jan 2020 14:29:14 GMT):
Alright, I think I'll need to go back on this later :sweat_smile: Thanks!

awjh (Wed, 15 Jan 2020 14:36:20 GMT):
That particular tutorial doesn't use the chaincode on the peer so you may not need to vendor it as you can build it on your own machine. You may find the master branch version of the tutorial more helpful as that has updated the import paths: https://hyperledger-fabric.readthedocs.io/en/master/chaincode4ade.html

drew (Wed, 15 Jan 2020 15:44:10 GMT):
I switched to master tutorial as suggested. https://hyperledger-fabric.readthedocs.io/en/master/chaincode4ade.html#terminal-2-build-start-the-chaincode The problem is when I arrive at the "Terminal 2" point I receive no feedback from the command line and can't proceed to "Terminal 3" section. I don't understand this command: `CORE_CHAINCODE_ID_NAME=mycc:0 CORE_PEER_TLS_ENABLED=false ./sacc -peer.address peer:7052` and when I use it the terminal just stay idle, no feedback, and when I try to follow with `docker exec -it cli bash` I receive `Error response from daemon: Container e5173b8a35ca0d37a528231192facaf2db7f7f8a3c38ce1f96636ede8e0f907f is not running`

drew (Wed, 15 Jan 2020 15:47:32 GMT):
Moreover I don't understand the general flow of the *tutorial*: why does it show me how to write the chaincode and build it locally but then it seems that I have to do it in the container, and no explanation on how to make the transfer...? If I want to edit something in the code am I suppose to burn down all of the 3 terminal, move the code, and build them up again?

drew (Wed, 15 Jan 2020 15:47:43 GMT):
Thanks for any answer!

sghaemi (Wed, 15 Jan 2020 21:30:09 GMT):
Has joined the channel.

sghaemi (Wed, 15 Jan 2020 21:30:09 GMT):
Hello everyone, I am trying to develop a chaincode and for my use case I need to get the updated version of the ledger's state after adding a new transaction. In other words I need to call stub.getState(key) after calling stub.putState(key) and get the updated state. I understand that the getState function always returns the state before the transaction started. Is there any way that I can get the updated state?

sghaemi (Wed, 15 Jan 2020 21:30:09 GMT):
Hello everyone, I am trying to develop a chaincode and for my use case, I need to get the updated version of the ledger's state after adding a new transaction. In other words, I need to call stub.getState(key) after calling stub.putState(key) and get the updated state. I understand that the getState function always returns the state before the transaction started. Is there any way that I can get the updated state? Thanks in advance.

parthibanselvaraj (Thu, 16 Jan 2020 06:05:10 GMT):
Has joined the channel.

rchaturv (Thu, 16 Jan 2020 07:53:16 GMT):
Has joined the channel.

awjh (Thu, 16 Jan 2020 09:39:26 GMT):
The only way to read that putState using getState is to have the getState called in another transaction e.g. invoke writeSomething then invoke readSomething. If you are trying to do this in the same transaction can you not just use the value you passed to the putState called e.g. ``` const myObj = {cool: "object"} stub.putState('someKey', Buffer.from(JSON.stringify(object))) // use myObj instance instead of calling getState ```

Koushik (Thu, 16 Jan 2020 18:55:53 GMT):
Hi Guys, I am trying to look for the default value for timeout in the sendSignedProposal(request, timeout) function. I can not find it in the node sdk, and I tried looking at the core.yaml? Can anyone help me out or point where I can find it. Much appreciated.

Koushik (Thu, 16 Jan 2020 19:02:43 GMT):
https://hyperledger.github.io/fabric-sdk-node/release-1.4/Channel.html

mbanerjee (Thu, 16 Jan 2020 22:00:55 GMT):
I am trying to run chaincode in go and keep getting this error - cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:

mbanerjee (Thu, 16 Jan 2020 22:00:55 GMT):
I am trying to run chaincode in go and keep getting this error - cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: I have cloned the hyperldeger/fabric. Any suggestions?

mbanerjee (Thu, 16 Jan 2020 22:00:55 GMT):
I am trying to run chaincode in go and keep getting this error - cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: I have cloned the hyperldeger/fabric. Any suggestions? Figured it out. I was cloning master, had to clone release-1.4.

mbwhite (Fri, 17 Jan 2020 09:18:45 GMT):
@Koushik worth going to the fabric-sdk-node channel

mbwhite (Fri, 17 Jan 2020 12:52:52 GMT):
Hello - we've released a v1.4.5 of the Java Chaincode and Contract libraries; the docker image is on dockerhub, but it seems that Maven central is delayed in updating the main repos.

medikent (Fri, 17 Jan 2020 22:29:48 GMT):
This is called read your own write semantics. Hyperledger Fabric does not support this sort of capability at this time.

medikent (Fri, 17 Jan 2020 22:30:48 GMT):
Did you make sure to vendor your dependencies with `go mod vendor` or `dep ensure`?

davidkhala (Sun, 19 Jan 2020 00:59:06 GMT):
It is a question in fabric-chaincode-node, the transientMap got from `stub.getTransient()`. The value inside transientMap looks like this `"\n�\u0006\nr\b\u0003\u0010\u0001\u001a\f\b�̎�\u0005\u0010����\u0001\"\nallchannel*@33b52566abb75271cc2d69a46e351835d09c74d1065bae3267a4b6e5d830e548:\u0010\u0012\u000e\u0012\fnodeDiagnose\u0012�\u0005\n�\u0005\n\bASTRIMSP\u0012�\u0005-----BEGIN CERTIFICATE-----\nMIIB5DCCAYqgAwIBAgIUPHlucPVhDBmiqh3/2kMZIUid3dEwCgYIKoZIzj0EAwIw\nYTELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK\nEwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRIwEAYDVQQDEwlhc3RyaS5v\ncmcwHhcNMjAwMTE5MDAzODAwWhcNMjEwMTE4MDA0MzAwWjAhMQ8wDQYDVQQLEwZj\nbGllbnQxDjAMBgNVBAMTBUFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\nDto1cSQlquPkacSUhFyxX02SXp+RNylnXQl1OX+aIbrr6xXxHk/3n7OAHMsy1yp0\nYY9zIBbzKKKJ4y94aKtnu6NgMF4wDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQC\nMAAwHQYDVR0OBBYEFP/yAN0NthnUplt0ceB9hVOxeIJGMB8GA1UdIwQYMBaAFENE\nnvGYa2N5uRFUJigi7NCZocKMMAoGCCqGSM49BAMCA0gAMEUCIQDBMr821jPgOAMG\nJ1EMrDIc5OOOKRFvSQ5mdXvdRaejgAIgMrFM6gsXr5/wUKL5Nyx06cDMTplvbD82\nyN1s+vfy0nw=\n-----END CERTIFICATE-----\n\u0012\u0018H\u0007�7\"������%�x�Ԅ�1pt��\u0012#\n\u0019\n\u0017\b\u0001\u0012\u000e\u0012\fnodeDiagnose\u001a\u0003\n\u0001-\u0012\u0006\n\u0001a\u0012\u0001b"` when I expected a->'b' as key-value in this transientMap. Anyone has idea how to parse this compound value message?

davidkel (Sun, 19 Jan 2020 08:38:13 GMT):
getTransient should return a map of keys and buffer objects. Can you show the code you used to get this output ?

davidkel (Sun, 19 Jan 2020 08:38:13 GMT):
getTransient should return a map of string keys and buffer objects. Can you show the code you used to get this output ?

davidkhala (Sun, 19 Jan 2020 12:53:19 GMT):
yes, the returned object is a map in a format of protobuf map. but the problem is the value content, and value type is indeed buffer. BTW the used version is 1.4.4 for both fabric-shim and entire network.

davidkel (Sun, 19 Jan 2020 12:55:03 GMT):
Can you post the code you used ?

davidkhala (Sun, 19 Jan 2020 12:58:46 GMT):
Previously I tried to get the readable content of the buffer via `toString()`, then I got the compound message type shown above This is my current work around way: this.transient = {}; for (const [key, value] of Object.entries(stub.getTransient().map)) { this.transient[key] = value.value.buffer.toString().split('\u0012\u0001')[1]; }

davidkhala (Sun, 19 Jan 2020 13:00:29 GMT):
I guess you might know what I aim to do from this.

davidkel (Sun, 19 Jan 2020 13:02:06 GMT):
Looking at some of the chaincode tests it looks like you should do something like ``` const tr = stub.getTransient(); const valBuf = tr.get('mykey'); const val = valBuf.getString('utf-8'); const valObj = JSON.parse(val); ``` In the above I would assume that a JSON string was put into the `mykey` key of the transient map.

davidkel (Sun, 19 Jan 2020 13:02:06 GMT):
Looking at some of the chaincode tests it looks like you should do something like ``` const tr = stub.getTransient(); const valBuf = tr.get('mykey'); const val = valBuf.toString('utf-8'); const valObj = JSON.parse(val); ``` In the above I would assume that a JSON string was put into the `mykey` key of the transient map.

davidkhala (Sun, 19 Jan 2020 13:03:14 GMT):
Cool, I have never tried the `getString` function, this might help

davidkel (Sun, 19 Jan 2020 13:03:39 GMT):
Opps hang on it might be toString.... I quickly typed it now

davidkhala (Sun, 19 Jan 2020 13:05:00 GMT):
if it is toString(), it is my case

davidkel (Sun, 19 Jan 2020 13:05:04 GMT):
yep, sorry meant `toString`

davidkel (Sun, 19 Jan 2020 13:05:15 GMT):
But did you do a get on the map ?

davidkhala (Sun, 19 Jan 2020 13:06:12 GMT):
sure, or please wait for my full error reproducing

davidkel (Sun, 19 Jan 2020 13:06:22 GMT):
Don't know if that makes a difference.

davidkel (Sun, 19 Jan 2020 13:06:50 GMT):
I'm going by this example https://github.com/hyperledger/fabric-sdk-node/blob/d084b6d9dd800c74018e27388a754f8c31f6d178/test/fixtures/chaincode/node_cc/example_cc1/chaincode.js#L183

davidkhala (Sun, 19 Jan 2020 13:08:01 GMT):
Yes, if you could go deeper with this sample, you will find problem inside the v content.

davidkhala (Sun, 19 Jan 2020 13:08:01 GMT):
Yes, if you could go deeper with this sample, you will find problem inside the `v` content.

davidkhala (Sun, 19 Jan 2020 13:43:57 GMT):
Hi, Dave, I find it is my fault.

davidkhala (Sun, 19 Jan 2020 13:44:55 GMT):
`toString('utf8')` is the correct way instead of my previous `toString()`

davidkel (Sun, 19 Jan 2020 13:46:33 GMT):
:thumbsup:

kousiksatish (Sun, 19 Jan 2020 15:27:30 GMT):
Has joined the channel.

mrudav.shukla (Mon, 20 Jan 2020 10:08:08 GMT):
I am getting the following error while installing chaincode in the peer: fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f9658446638] I tried installing chaincode given in the samples and it installed successfully. However, it fails for my chaincode. It fails on multiple peers. And if I try to hit this installation request consequently then it would succeed for once which is quite weird.

Purbaja (Mon, 20 Jan 2020 11:38:16 GMT):
Has joined the channel.

Purbaja (Mon, 20 Jan 2020 11:38:17 GMT):
Hi All, in fabric node.js chaincode can we extend one chaincode from another one?

dineshthemacho1 (Mon, 20 Jan 2020 12:17:01 GMT):
Has joined the channel.

lionelronaldo (Mon, 20 Jan 2020 15:18:06 GMT):
The samples work but your own custom chaincode doesn't? Then I'd recommend modifying the samples step by step until it does what your custom chaincode does.

mrudav.shukla (Mon, 20 Jan 2020 16:01:18 GMT):
Here's the link to the issue: https://jira.hyperledger.org/browse/FAB-13419?focusedCommentId=66801&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-66801

raedbensaid (Tue, 21 Jan 2020 13:13:23 GMT):
Has joined the channel.

sghaemi (Tue, 21 Jan 2020 16:01:14 GMT):
Thank you very much for answering. The problem is at the same time that the transaction is changing a value, another transaction is also changing another value which I am trying to read. It seems like it is not possible. I am going to change my code to use a seperate invoke to read the state.

sghaemi (Tue, 21 Jan 2020 16:01:14 GMT):
@awjh Thank you very much for answering. The problem is at the same time that the transaction is changing a value, another transaction is also changing another value that I am trying to read. It seems like it is not possible. I am going to change my code to use a separate invoke to read the state.

sghaemi (Tue, 21 Jan 2020 16:02:28 GMT):
@medikent Thank you for your reply.

sghaemi (Tue, 21 Jan 2020 16:04:10 GMT):
What do you mean by "extend"? Are you trying to invoke a chaincode from another one?

medikent (Wed, 22 Jan 2020 01:17:38 GMT):
I'll need to read up on the Fabric implementation of concurrency so I know better how to answer your question. I don't yet know the details here.

Purbaja (Wed, 22 Jan 2020 05:56:52 GMT):
@sghaemi By extend I mean to call a method of Parent class from my Child class contract. I sthat possible?

selvaraman (Wed, 22 Jan 2020 06:59:48 GMT):
Hi ! I am learning client identity chaincode. This is my code. package main import ( "fmt" "github.com/hyperledger/fabric/core/chaincode/lib/cid" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) type SampleContract struct { } var logger = shim.NewLogger("sample_cc") func (s *SampleContract) Init(APIstub shim.ChaincodeStubInterface) pb.Response { return shim.Success(nil) } func ReadAttributesOfCaller(APIstub shim.ChaincodeStubInterface) { id, _ := cid.GetID(APIstub) mspid, _ := cid.GetMSPID(APIstub) logger.Info("------------------ReadAttributesOfCaller-----------------------") logger.Info("id:", id) logger.Info("mspid:", mspid) logger.Info("------------------ReadAttributesOfCaller-----------------------") } func (s *SampleContract) Invoke(APIstub shim.ChaincodeStubInterface) pb.Response { function, args := APIstub.GetFunctionAndParameters() logger.Info("func:", function) logger.Info("args:", args) if(function == 'read-attr') { ReadAttributesOfCaller(APIstub) } return shim.Success(nil) } func main() { err := shim.Start(new(SampleContract)) if err != nil { logger.Info("Error creating new Smart Contract: %s", err) } } To install cid library. I did the following steps. step 1 => go get -u github.com/kardianos/govendor step 2 => govendor init step 3 => govendor add +external After this step, vendor folder is created. But When I do 'go build', I am getting the following error, sample.go:6:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/gopath/src/chaincode/sample/vendor/github.com/hyperledger/fabric/core/chaincode/lib/cid (vendor tree) /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH) It seems like cid library is not installed. How to fix this ?

selvaraman (Wed, 22 Jan 2020 06:59:48 GMT):
Hi ! I am learning client identity chaincode. This is my code. package main import ( "fmt" "github.com/hyperledger/fabric/core/chaincode/lib/cid" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) type SampleContract struct { } var logger = shim.NewLogger("sample_cc") func (s *SampleContract) Init(APIstub shim.ChaincodeStubInterface) pb.Response { return shim.Success(nil) } func ReadAttributesOfCaller(APIstub shim.ChaincodeStubInterface) { id, _ := cid.GetID(APIstub) mspid, _ := cid.GetMSPID(APIstub) logger.Info("------------------ReadAttributesOfCaller-----------------------") logger.Info("id:", id) logger.Info("mspid:", mspid) logger.Info("------------------ReadAttributesOfCaller-----------------------") } func (s *SampleContract) Invoke(APIstub shim.ChaincodeStubInterface) pb.Response { function, args := APIstub.GetFunctionAndParameters() logger.Info("func:", function) logger.Info("args:", args) if(function == 'read-attr') { ReadAttributesOfCaller(APIstub) } return shim.Success(nil) } func main() { err := shim.Start(new(SampleContract)) if err != nil { logger.Info("Error creating new Smart Contract: %s", err) } } To install cid library. I did the following steps. step 1 => go get -u github.com/kardianos/govendor step 2 => govendor init step 3 => govendor add +external After this step, vendor folder is created. But When I do 'go build', I am getting the following error, sample.go:6:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/gopath/src/chaincode/sample/vendor/github.com/hyperledger/fabric/core/chaincode/lib/cid (vendor tree) /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH) When I issue govendor add github.com/hyperledger/fabric/core/chaincode/lib/cid command, I am getting following error, Error: Package "github.com/hyperledger/fabric/core/chaincode/lib/cid" not a go package or not in GOPATH. It seems like cid library is not installed. How to fix this ?

roclee (Wed, 22 Jan 2020 08:23:30 GMT):
Has joined the channel.

roclee (Wed, 22 Jan 2020 08:27:39 GMT):
Hi all. If I run `npm install` in my local contract dev directory, will it do any bad effect to the installation of chaincode? for example system will copy all files in `node_modules` to the peers. Or the ` peer chaincode install` will filter the folder itself?

roclee (Wed, 22 Jan 2020 08:27:39 GMT):
Hi all. If I run `npm install` in my local contract dev directory, will it do any bad effect to the installation of chaincode? for example system will copy all files in `node_modules` to the peers. Or the ` peer chaincode install` command will filter the folder itself?

Javi (Wed, 22 Jan 2020 16:38:47 GMT):
hi all, one question about chaincode endorsement

Javi (Wed, 22 Jan 2020 16:39:14 GMT):
I'm using this `"OutOf(2, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member')"` when chaincode instantiation

Javi (Wed, 22 Jan 2020 16:40:30 GMT):
transaction need to be signed by 2 members of any of the three organizations, but when I check transaction endorsement, I can see that the transaction was endorsed by four members

Javi (Wed, 22 Jan 2020 16:40:30 GMT):
the transaction needs to be signed by 2 members of any of the three organizations, but when I check transaction endorsement, I can see that the transaction was endorsed by four members

Javi (Wed, 22 Jan 2020 16:41:30 GMT):
also, using these policy, the transaction takes about 5 seconds to validate, it is normal?

Javi (Wed, 22 Jan 2020 16:41:30 GMT):
also, using this policy, the transaction takes about 5 seconds to validate, it is normal?

medikent (Wed, 22 Jan 2020 18:26:42 GMT):
It sounds like you're just vendoring the dependencies which is simliar to `mvn install` for JVM and `go mod tidy` for Go. Sounds okay.

medikent (Wed, 22 Jan 2020 18:27:42 GMT):
My endorsement policy is much simpler and takes about 3.2 seconds to validate. 5 seconds definitely seems unnecessarily longer.

roclee (Thu, 23 Jan 2020 01:51:12 GMT):
OK , thanks!

roclee (Thu, 23 Jan 2020 02:06:29 GMT):
If you mean the duration between application sends request and receives response. It depends on the settings of your network especially how often does the order service create a new block.

roclee (Thu, 23 Jan 2020 02:07:06 GMT):
and you may check this https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-transaction-commit-events.html

eduardosanzb (Thu, 23 Jan 2020 10:16:31 GMT):
Has joined the channel.

mahoney1 (Thu, 23 Jan 2020 13:56:56 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

georgi (Thu, 23 Jan 2020 14:00:43 GMT):
Hey, I'm trying to change the default peer's escc like it's shown https://hyperledger-fabric.readthedocs.io/en/release-1.4/pluggable_endorsement_and_validation.html, with the given NoOp one. Unfortunately, while building the network I receive an error: `error getting endorser client for channel: endorser client failed to connect to peer0.test.com: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused" `

georgi (Thu, 23 Jan 2020 14:00:43 GMT):
Hey, I'm trying to change the default peer's escc like it's shown https://hyperledger-fabric.readthedocs.io/en/release-1.4/pluggable_endorsement_and_validation.html, with the given NoOp one. Unfortunately, while building the network I receive an error: *error getting endorser client for channel: endorser client failed to connect to peer0.test.com: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused"*

georgi (Thu, 23 Jan 2020 14:00:43 GMT):
Hey, I'm trying to change the default peer's escc like it's shown https://hyperledger-fabric.readthedocs.io/en/release-1.4/pluggable_endorsement_and_validation.html, with the given NoOp one. Unfortunately, while building the network I receive an error: *error getting endorser client for channel: endorser client failed to connect to peer0.test.com: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused"* and likewise error with the other organization as well

georgi (Thu, 23 Jan 2020 15:13:00 GMT):
Hello, I'm trying to implement a custom endorsement implement as a plugin (following https://hyperledger-fabric.readthedocs.io/en/release-1.4/pluggable_endorsement_and_validation.html). Unfortunately, when starting the network I receive the following error: *plugin.Open("/var/path/plugin.so"): /var/path/plugin.so: invalid ELF header*

georgi (Thu, 23 Jan 2020 15:13:00 GMT):
Hello, I'm trying to implement a custom endorsement as a plugin (following https://hyperledger-fabric.readthedocs.io/en/release-1.4/pluggable_endorsement_and_validation.html). Unfortunately, when starting the network I receive the following error: *plugin.Open("/var/path/plugin.so"): /var/path/plugin.so: invalid ELF header*

RahulHundet (Fri, 24 Jan 2020 09:03:15 GMT):
Hi, I am looking to encrypt and store some data encryption will be performed in chaincode. Is there is a specific reason to use bccsp and ext/entities as shown in example of encc_example instead of using crypto package provided by golang

RahulHundet (Fri, 24 Jan 2020 09:03:15 GMT):
Hi, I am looking to encrypt and store some data in and encryption will be performed in chaincode. Is there is a specific reason to use bccsp and ext/entities as shown in example of encc_example instead of using crypto package provided by golang

Javi (Fri, 24 Jan 2020 14:19:37 GMT):
thanks

braduf (Fri, 24 Jan 2020 22:06:50 GMT):
Hi all, is there a way to dynamically obtain all organizations of the channel from inside the chaincode? Or should we store MSP IDs in the ledger and update the chaincode when new participants enter? Thanks in advance!

braduf (Fri, 24 Jan 2020 22:06:50 GMT):
Hi all, is there a way to dynamically obtain all organizations of the channel in the chaincode? Or should we store MSP IDs in the ledger and update the chaincode when new participants enter? Thanks in advance!

Antimttr (Fri, 24 Jan 2020 22:17:00 GMT):
ahh

Antimttr (Fri, 24 Jan 2020 22:17:12 GMT):
well you could look at the channel config pb

Antimttr (Fri, 24 Jan 2020 22:17:30 GMT):
decode it to json, that should have a list of all the orgs participating in the channel

Antimttr (Fri, 24 Jan 2020 22:17:54 GMT):
although come to think of it not sure you can do that inside chaincode

braduf (Fri, 24 Jan 2020 22:18:08 GMT):
yes, but does the chaincode stub has the channel config? I don't think so...

braduf (Fri, 24 Jan 2020 22:19:04 GMT):
It would be nice though to have that info in the chaincode stub and be able to use it in the chaincode.

Antimttr (Fri, 24 Jan 2020 22:19:45 GMT):
well you could always force the invocation to provide that information, but then it would just be based on the invocation and not ground truth

Antimttr (Fri, 24 Jan 2020 22:20:52 GMT):
although if you're building a custom client, the custom client could have that information cached and pass that information along to the chaincode along with the invocation

braduf (Fri, 24 Jan 2020 22:23:33 GMT):
Yeah, but that's just one client so it can not be trusted, this client could fool the transaction, in that case I think it is better to save the participants in the state or chaincode and update them. The best would be if this is something the stub has access to, so every peer has to have the same list of participants to be able to fulfill endorsement policies.

braduf (Fri, 24 Jan 2020 22:23:33 GMT):
Yeah, but that's just one client so it can not be trusted, this client can say whatever it wants. In that case I think it is better to save the participants in the state or chaincode and update them. The best would be if this is something the stub has access to, so every peer has to have the same list of participants to be able to fulfill endorsement policies.

braduf (Fri, 24 Jan 2020 22:24:37 GMT):
So I was wondering if there exists some kind of way already or if there is a best practice established for it...

YashShukla (Sun, 26 Jan 2020 12:04:39 GMT):
is there any link for the dev mode to build compile and run java Chaincode? similar to this one https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html#testing-using-dev-mode which is for go

jtonline (Mon, 27 Jan 2020 11:08:03 GMT):
Has joined the channel.

mbwhite (Mon, 27 Jan 2020 14:03:26 GMT):
Hello - it's not yet in the main docs, but this should give you the correct flow. https://gist.github.com/mbwhite/73630b4f24acab1e1ece2f726ea526f9

lionelronaldo (Mon, 27 Jan 2020 15:14:36 GMT):
Hi guys! I wanted to ask if it's possible to invoke fabric-ca actions from within a chaincode? 🤔

lionelronaldo (Mon, 27 Jan 2020 15:16:49 GMT):
The idea is that one identity can send tokens to the chaincode, and then the chaincode somehow issues a certificate with certain attributes. With this Certificate the identity can then access some abac encrypted data. It's like a pay to access use case.

YashShukla (Mon, 27 Jan 2020 17:55:57 GMT):
thanks, but the code to instantiate the chaincode is missing form the gist. would be great if you can provide that

RahulHundet (Tue, 28 Jan 2020 05:35:46 GMT):
Hi Please let me know if I am missing something

YashShukla (Tue, 28 Jan 2020 05:52:28 GMT):
also how can we run java chaincode on a peer using "contract interface" cause it does not has the "main" function

lzaouche (Tue, 28 Jan 2020 09:17:09 GMT):
Has joined the channel.

mbwhite (Tue, 28 Jan 2020 14:34:15 GMT):
With the contract model you don't need to provide a specific main method. Use the `contract router` as the main method. If you have a look at the Java chaincodes in fabric-samples or in the javachaincode git repo there are examples of setup

georgi (Tue, 28 Jan 2020 15:41:43 GMT):
Hello, are there any examples on how to test chaincode based on functions which have MSP restrictions?

georgi (Tue, 28 Jan 2020 15:41:43 GMT):
Hello, are there any examples on how to test chaincode based on functions which have MSP restrictions (ref https://github.com/hyperledger/fabric-chaincode-go/tree/master/pkg/cid)?

georgi (Tue, 28 Jan 2020 15:41:43 GMT):
Hello, are there any examples on how to test chaincode based on functions which have MSP restrictions?

georgi (Tue, 28 Jan 2020 15:41:43 GMT):
Hello, are there any examples on how to test chaincode based on functions which have MSP restrictions (mock transaction creator, etc..)?

YashShukla (Wed, 29 Jan 2020 10:58:02 GMT):
:thumbsup: thanks

medikent (Wed, 29 Jan 2020 21:34:01 GMT):
Are you talking about mocking things from something like `ClientIdentity` from the Java SDK such as attribute values and the X.509 subject (creator)?

georgi (Thu, 30 Jan 2020 07:47:52 GMT):
Yes

georgi (Thu, 30 Jan 2020 07:47:52 GMT):
Yes, not necessarily using the SDK. My chaincode is using https://github.com/hyperledger/fabric-chaincode-go/blob/master/pkg/cid/interfaces.go and I want somehow to mock this in order my unit tests to run smoothly

georgi (Thu, 30 Jan 2020 07:47:52 GMT):
Yes, not necessarily using the SDK. My chaincode is using https://github.com/hyperledger/fabric-chaincode-go/blob/master/pkg/cid/interfaces.go and I want somehow to mock this in order my unit tests to run smoothly.

medikent (Thu, 30 Jan 2020 17:33:47 GMT):
The way I mocked things in Kotlin was I used a test certificate I pulled from the chaincode log files from a System.out.println() call during transaction execution, saved the certificate as a string and byte array in my test, and returned it on my mock for ClientIdentity. I imagine you could do the same thing for the Go ClientIdentity.GetID() function.

braduf (Fri, 31 Jan 2020 01:48:52 GMT):
Hi, I have a question about the new implicit private data collection feature. Can a transaction with implicit private data for a certain organisation be endorsed by an organisation other than the private data receiver and the sender of the transaction? Or can the maximum amount of endorsers only be those two orgs? Thanks in advance!

braduf (Fri, 31 Jan 2020 01:48:52 GMT):
Hi, I have a question about the new implicit private data collection feature. Can a transaction with implicit private data be endorsed by more organisations than only the private data receiver and the sender of the transaction? Or can the maximum amount of endorsers only be those two orgs? Thanks in advance!

Henrycoffin (Fri, 31 Jan 2020 06:39:33 GMT):
Hi, ,has anyone got any examples of bulk loading data. I want to load csv data and then run some calculations in chaincode.

Henrycoffin (Fri, 31 Jan 2020 06:39:33 GMT):
What is the best way of converting a multi sheet spreadsheet to a ledger. Do I need to consolidate the data down into a single struct or can I define multiple structs for the same ledger?

shiva2035 (Sat, 01 Feb 2020 08:18:50 GMT):
Has joined the channel.

shiva2035 (Sat, 01 Feb 2020 08:18:51 GMT):
Hey guys, I have created a network with one org(Org1) and two peers. and added a second org(Org2) to the existing network by following hyperledger documentation. When I install a chaincode on peer0 and peer1 of Org1 install proposal was good. But when I install Chaincode on Org2 proposal was good only on peer0 but not on peer1. I have recently started working on hyperledger fabric. Can anyone please explain me what to do to make my chaincode installation successful on any newly added organization.

braduf (Sat, 01 Feb 2020 17:15:41 GMT):
Can you give a little bit more info about the error that you get when installing it on peer1 of Org2? That will be easier to help....

shiva2035 (Sun, 02 Feb 2020 01:50:21 GMT):
This is the error message I got: Chaincode installation resulted in an error: Failed to connect before the deadline URL:grpcs://localhost:12151.

shiva2035 (Sun, 02 Feb 2020 02:16:20 GMT):
When I hit the URL throught Mozilla Firefox, I see the below: 020-02-02 02:12:29.084 UTC [core.comm] ServerHandshake -> ERRO 05f TLS handshake failed with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.31.0.1:56248

shiva2035 (Sun, 02 Feb 2020 02:53:19 GMT):

Clipboard - February 2, 2020 8:23 AM

shiva2035 (Sun, 02 Feb 2020 02:53:25 GMT):
Finally I got the solution for my problem:

shiva2035 (Sun, 02 Feb 2020 02:53:25 GMT):
Finally I got the solution for my problem (link above)

letch2010 (Mon, 03 Feb 2020 23:10:43 GMT):
Has joined the channel.

letch2010 (Mon, 03 Feb 2020 23:10:45 GMT):
Hello, I have a question relating to `fabric-chaincode-java`. Regarding `org.hyperledger.fabric.contract.ContractRouter` in `fabric-chaincode-shim`, is it reasonable to extend this class and override its `init`/`invoke` methods to add custom logic? The intent is to use `putState` to create/edit a configuration object at chaincode instantiatation/upgrade. The methods would, of course, make a call to `super.init(stub)`/`super.invoke(stub)` respectively after the custom logic. At a glance, this seems fine to do, but a second opinion would be appreciated. See the following a link to the ContractRouter class: https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractRouter.java

letch2010 (Mon, 03 Feb 2020 23:10:45 GMT):
Hello, I have a question relating to `fabric-chaincode-java`. Regarding `org.hyperledger.fabric.contract.ContractRouter` in `fabric-chaincode-shim`, is it reasonable to extend this class and override its `init`/`invoke` methods to add custom logic? The intent is to use `putState` to create/edit a configuration object at chaincode instantiatation/upgrade. The methods would, of course, make a call to `super.init(stub)`/`super.invoke(stub)` respectively after the custom logic. At a glance, this seems fine to do, but a second opinion would be appreciated. The ContractRouter class is at: https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractRouter.java

RobinKlemens (Tue, 04 Feb 2020 10:49:50 GMT):
Has joined the channel.

rthatcher (Tue, 04 Feb 2020 10:49:54 GMT):
Have you seen the beforeTransaction ? It may already do what you require - https://github.com/hyperledger/fabric-chaincode-java/blob/cc673036cdd2b0d4fa08e9b92ee894352f1e6d0e/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractInterface.java#L87

Aman.jain (Tue, 04 Feb 2020 11:19:20 GMT):
Has joined the channel.

letch2010 (Tue, 04 Feb 2020 13:52:14 GMT):
Yes, I'm aware of that method. I suppose it would be useful as a getter for the config data. I'm running hyperledger 1.4 by the way.

letch2010 (Tue, 04 Feb 2020 13:53:24 GMT):
What's interesting is the init method in ContractRouter is not being called on instantiate.

rthatcher (Tue, 04 Feb 2020 14:05:56 GMT):
Right - with instantiate you can specify the function that you want to run, which again may help you.

letch2010 (Tue, 04 Feb 2020 14:23:38 GMT):
Thank you very much! I suppose making a @Transaction method in my contract, then calling that on instantiate is the way to go. I'll have to add checks such that it cannot be called outside of chaincode instantiation/upgrade.

eduardosanzb (Tue, 04 Feb 2020 18:13:05 GMT):
Hello, does anyone know something related to: Using couchdb and having an issue when trying to do a getState related to the size of one of the keys of the object (an image in base64)

dan13 (Tue, 04 Feb 2020 19:48:58 GMT):
The problem is the size of the key, or the size of the value (object)? Generally your keys should be smallish values and the value should not be too large (I don't know exact dividing line, but some KBs seems reasonable and more than that not).

eduardosanzb (Tue, 04 Feb 2020 22:29:15 GMT):
Is about the size of the object, I'm storing base64 images. ( I now base64 is terrible, but I'd like to use the chryptographic history etc etc)

eduardosanzb (Tue, 04 Feb 2020 22:30:36 GMT):
But it seems to be a limitation of the `stub.getState`

eduardosanzb (Tue, 04 Feb 2020 22:30:51 GMT):
Because the data gets stored correctly in couchdb

eduardosanzb (Tue, 04 Feb 2020 22:44:27 GMT):
Somehow, my couchDB and my`stub.getState` are not synchronized

eduardosanzb (Tue, 04 Feb 2020 22:50:38 GMT):
:tired_face:

eduardosanzb (Tue, 04 Feb 2020 22:52:28 GMT):
And my gut feeling says, is related to the size of the payload.

eduardosanzb (Tue, 04 Feb 2020 23:14:39 GMT):
OK! So I discovered that this cache problem comes out of using the V2.0

eduardosanzb (Tue, 04 Feb 2020 23:15:02 GMT):
Does anyone knows how to raise a issue for the new version v2.0?

dan13 (Wed, 05 Feb 2020 01:24:01 GMT):
https://jira.hyperledger.org/

G596 (Wed, 05 Feb 2020 09:09:09 GMT):
Has joined the channel.

G596 (Wed, 05 Feb 2020 09:09:10 GMT):
Hi I just wanted to know if it is possible to read/write between two chaincodes in the same channel?

eduardosanzb (Wed, 05 Feb 2020 10:15:31 GMT):
Hi I just wanted to know if it is possible to read/write between two chaincodes in the same channel?

eduardosanzb (Wed, 05 Feb 2020 12:47:30 GMT):
Thanks

mauricio (Wed, 05 Feb 2020 14:04:02 GMT):
Has joined the channel.

mbwhite (Wed, 05 Feb 2020 15:58:06 GMT):
Hello - the Fabric Community call earlier highlighted some of the upcoming work for Fabric 2.0 - one of those being the LedgerRFC. Early feedback has been really positive about this and I've just pushed an update. The PR is at https://github.com/hyperledger/fabric-rfcs/pull/16 and if you want to read the text, my clone of the rfc repo has gh-pages enabled so is easier to read. https://mbwhite.github.io/fabric-rfcs/text/0000-ledger-api.html Please add any comments either way; even just a thumbs-up is appreciated then we know we're on broadly the right path. :-)

jrasm91 (Wed, 05 Feb 2020 21:50:05 GMT):
Has joined the channel.

jrasm91 (Wed, 05 Feb 2020 22:01:09 GMT):
Hello, I'm using a simple network (`chaincode-docker-devmode`, fabric 1.4) and trying to install a nodejs chaincode. I'm able to successfully create and join a channel using these commands: ``` peer channel create -c myc -f myc.tx -o orderer:7050 peer channel join -b myc.block ``` I am able to successfully install the chaincode using this command: ``` peer chaincode install --lang node --name mycontract --version v0 --path /opt/gopath/src/chaincodedev/chaincode ``` I get an error when instantiating the chaincode with this command: ``` peer chaincode instantiate --lang node --name mycontract --version v0 --orderer orderer:7050 --channelID myc -c '{"Args":["AccountContract:initLedger"]}' ``` I get the following error: ``` Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0 ``` Any suggestions for how to debug/troubleshoot the instantiation of chaincode?

mbwhite (Thu, 06 Feb 2020 09:43:51 GMT):
@jrasm91 when the chainocde is instantiated, there's a 'builder' docker container that will do 'npm install'. it could be that this is failing for some reason; it you can capture the output of that container, then it usually helps enormously... downside is that it doesn't last very long. Something like this would help to monitor all the docker containers https://gist.github.com/mbwhite/a32abc57a0a45ecc466977ceef67df1f

mahoney1 (Thu, 06 Feb 2020 15:43:03 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

mbvivek (Thu, 06 Feb 2020 21:43:40 GMT):
Hi @mbwhite , I have a similar situation with node js chaincode.. For me instantiate chaincode takes for ever, and when I took a look at the chaincode's docker logs, I found just this - "/bin/sh: 1: npm: not found" . Wondering what could I be doing wrong..

xxp5769437 (Fri, 07 Feb 2020 13:40:02 GMT):
Has joined the channel.

xxp5769437 (Fri, 07 Feb 2020 13:41:36 GMT):
hi,guys.I have built my fabric network ( 1.4.4-release) and installed a test java chaincode which runs well.But,how can I debug my chaincode with Idea ?Any body has any ideas? plz!

jrasm91 (Fri, 07 Feb 2020 15:40:56 GMT):
Looks like somehow my volumes were causing the error. I reverted them back to match the exact setup from the fabric sample and the same commands started to work.

jrasm91 (Fri, 07 Feb 2020 15:41:38 GMT):
>A smart contract is defined within a chaincode. Multiple smart contracts can be defined within the same chaincode

jrasm91 (Fri, 07 Feb 2020 15:42:43 GMT):
Do you only instantiate the chaincode once? How does that work if there are multiple contracts in the chaincode?

jrasm91 (Fri, 07 Feb 2020 15:42:43 GMT):
Do you only instantiate the chaincode once? How does that work if there are multiple contracts in the chaincode? Does only one contract get initialized?

mbwhite (Fri, 07 Feb 2020 15:55:38 GMT):
:-)

mbwhite (Fri, 07 Feb 2020 15:57:42 GMT):
I'd recommend looking at the VSCode plugin... it lets you debug into Smart Contracts and Chaincode... really useful. https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform It comes with a 1.4.4 fabric release test network built in.

mbwhite (Fri, 07 Feb 2020 16:00:44 GMT):
When the initstantiate happens, the chaincode docker image is started; the code in the contract-api checks for what contracts are available and then the underlying code (shim or stub depending on what you callit!) talks back to the peer to register. At this point the chaincode 'init' method is called with any args you've given; in the case of contracts the approroaite contract function will be executed.

letch2010 (Fri, 07 Feb 2020 20:35:19 GMT):
In a Java Chaincode project, Is it possible to pass a List to a transaction method through the `peer chaincode invoke [other cmds] -c '{"Args":["myMethod", "[\"myListItem1\", \"myListItem2\"]"]}'`? I escape my JSON as shown and I get a schemaValidationException when I have a List as a parameter.

davidkhala (Sun, 09 Feb 2020 06:37:59 GMT):
in 2.0 design, where is the recommended source path of github.com/hyperledger/fabric/core/chaincode/shim/ext/entities now?

davidkhala (Sun, 09 Feb 2020 06:37:59 GMT):
in 2.0 design, where is the recommended source path of github.com/hyperledger/fabric/core/chaincode/shim/ext/entities now? Since I could not find counterpart in fabric-chaincode-go

metadata (Sun, 09 Feb 2020 07:06:34 GMT):
how to run chaincode(Golang) containers with non-root user?

metadata (Sun, 09 Feb 2020 07:06:34 GMT):
how to run chaincode(Golang) containers with non-root user? using HLF `v1.4.4`

letch2010 (Sun, 09 Feb 2020 15:36:11 GMT):
I suppose it would be wise to just deserialize what I want from json, i.e., instead of having a List in my transaction method, i just take in a string that I deserialize into the List.

davidkhala (Mon, 10 Feb 2020 05:12:44 GMT):
I would close it myself. It is removed for now.

mbwhite (Mon, 10 Feb 2020 09:22:17 GMT):
Hello; could you share what your transaction function is please?

letch2010 (Mon, 10 Feb 2020 14:03:36 GMT):
` @Transaction public List myFunc(Context ctx, List stringList) { return stringList; }`

letch2010 (Mon, 10 Feb 2020 14:12:37 GMT):
My solution was to change the `stringList` parameter into stringified JSON, then deserialize it into a List.

mbwhite (Mon, 10 Feb 2020 14:14:05 GMT):
yep; the issue is that only objects that are marked with the `@Datatype` annotation can be returned or passed to the functions. (as well as Strings and primitives)

awjh (Mon, 10 Feb 2020 14:15:57 GMT):
I have used the type `String[]` with success in Java chaincode rather than a list

letch2010 (Mon, 10 Feb 2020 14:47:58 GMT):
` @Transaction public List myFunction(Context ctx, List stringList) { return stringList; }`

letch2010 (Mon, 10 Feb 2020 14:48:58 GMT):
``` ```

letch2010 (Mon, 10 Feb 2020 14:48:58 GMT):
``` @Transaction public List myFunction(Context ctx, List stringList) { return stringList; } @DataType public class myModel { @Property private List stringList; } ```

letch2010 (Mon, 10 Feb 2020 14:51:23 GMT):
My JSON is `'{"Args":["myFunc", "[\"str1\", \"str2\"]"]}'`

letch2010 (Mon, 10 Feb 2020 14:52:06 GMT):
SchemaValidationException is returned on the List, despite the `@DataType` annotiation.

letch2010 (Mon, 10 Feb 2020 14:53:17 GMT):
I'll try to find time to reproduce and post the stacktrace.

mbwhite (Mon, 10 Feb 2020 14:54:14 GMT):
The problem is still the List I'm afraid... though the myModel could be passed; the current serializer doesn't know how to cope with List objects.. :-(

mbwhite (Mon, 10 Feb 2020 15:01:32 GMT):
Whilsts the serializer could use the list interface to create a JSON form; it would need some clue as to what to recate the list into.

letch2010 (Mon, 10 Feb 2020 15:02:55 GMT):
Right, that's exactly what I encountered. So yeah, I just deserialize the Json into a List in the transaction method.

mbwhite (Mon, 10 Feb 2020 15:06:42 GMT):
it is possible to write your own serializer to handle such cases;

letch2010 (Mon, 10 Feb 2020 16:48:56 GMT):
How could I register that serializer with my chaincode? I'm not sure what they would look like.

letch2010 (Mon, 10 Feb 2020 16:48:56 GMT):
How could I register that serializer with my chaincode? I'm not sure what that would look like.

mbwhite (Mon, 10 Feb 2020 16:57:28 GMT):
I'll dig out an example of the exact syntax... but the principal is create a class that is tagged with the @Serializer annotation that implements the SerializerInterface. Then in the Contract annotation provide the fully qualified name.

rpocase (Mon, 10 Feb 2020 18:49:05 GMT):
Has left the channel.

LWIH (Tue, 11 Feb 2020 14:33:59 GMT):
Has joined the channel.

ashlinSajan (Wed, 12 Feb 2020 12:52:26 GMT):
what if we use policy as AND in the collections_config.json privatedata collections ?Does anyone knows?

mholdmann (Mon, 17 Feb 2020 16:27:49 GMT):
Has joined the channel.

dabeberman (Tue, 18 Feb 2020 02:51:59 GMT):
Has joined the channel.

Anjali9088 (Tue, 18 Feb 2020 06:14:26 GMT):
Has joined the channel.

Anjali9088 (Tue, 18 Feb 2020 06:14:28 GMT):
Hi all, How can I Start multiple chaincodes on a channel using one package, which is a new feature in fabric 2.0

SatheeshNehru (Tue, 18 Feb 2020 14:18:39 GMT):
Launching chaincode as external service through this feature Is it Possible to run single chaincode service that can be used by all peer??

SatheeshNehru (Tue, 18 Feb 2020 14:18:39 GMT):
Launching chaincode as external service through this feature Is it Possible to run single chaincode service that can be used by all peers??

SatheeshNehru (Tue, 18 Feb 2020 14:18:39 GMT):
Launching chaincode as external service[https://hyperledger-fabric.readthedocs.io/en/release-2.0/cc_launcher.html]through this feature Is it Possible to run single chaincode service that can be used by all peers??

SatheeshNehru (Tue, 18 Feb 2020 14:18:39 GMT):
Launching chaincode as external service[https://hyperledger-fabric.readthedocs.io/en/release-2.0/cc_launcher.html]v2.0 Through this feature Is it Possible to run single chaincode service that can be used by all peers??

SatheeshNehru (Wed, 19 Feb 2020 06:22:34 GMT):
#fabric-java-chaincode #fabric-questions

KartikChauhan (Wed, 19 Feb 2020 12:20:23 GMT):
Is there any use to have multiple contracts in the same chaincode instead of having single contract? Can anyone provide any use case?

mbanerjee (Wed, 19 Feb 2020 23:37:59 GMT):
Say two organizations are participating in a network (org1 and org2). A channel is created between both the orgs. Say a chaincode is installed on org1. Can a transaction invoked on that chaincode be queried from org2 even thought the chaincode is only installed on org1?

Antimttr (Thu, 20 Feb 2020 00:59:41 GMT):
afaik chaincodes dont get installed on orgs, they get installed on channels

Antimttr (Thu, 20 Feb 2020 01:00:08 GMT):
so any peer org participating in the channel will receive the blockchain generated by the chaincode

ascatox (Thu, 20 Feb 2020 08:47:45 GMT):
Hi All! I'm trying to update my installation to the version 2.0 of HLF, but I'm encountering this error in the chaincode installation: Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-chaincode-go/shim !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========

AurelienGasser (Thu, 20 Feb 2020 18:54:50 GMT):
Has joined the channel.

AurelienGasser (Thu, 20 Feb 2020 18:54:51 GMT):
In our chaincode, we implemented two different ways to serialize data to be added to the ledger: json and gzipped json. We can control whether or not to gzip assets using a global setting, which is essentially a constant; it doesn't change during the lifecycle of the chaincode. Is there a way to pass arbitrary settings to the chaincode - at install-time for instance? The `Init` method isn't a good fit because it is not run on every peer. The solution we have now is to hardcode the setting, but that isn't very elegant because the only way to modify the setting is to modify the chaincode source code.

Antimttr (Thu, 20 Feb 2020 19:06:57 GMT):
this is just a guess, but have you tried loading a file from the peer's filesystem? if that works you could just put it in a docker volume and read the file at runtime

davidkel (Thu, 20 Feb 2020 23:07:43 GMT):
Why not write a flag to the world state at Init time ? Then all peers will use that flag

AurelienGasser (Fri, 21 Feb 2020 01:31:25 GMT):
Thats's a good idea too, thank you! It does mix business logic and configuration, but it does solve the problem.

lzaouche (Fri, 21 Feb 2020 15:48:04 GMT):
Hello, does somebody know where I can find the chaincode source of mycc?

muralisr (Sun, 23 Feb 2020 12:47:58 GMT):
@lzaouche mycc is just a label. what are you looking for exactly ?

lzaouche (Mon, 24 Feb 2020 09:54:56 GMT):
@muralisr , Thanks for your answer. A label to what? I am looking for the source code of the chaincode

Koushik (Tue, 25 Feb 2020 03:16:53 GMT):
Hi All Extremely sorry to bother you but I have HF related question, and spent a whole day debugging this issue and would love y’all perspective. :) I am facing an endorsement policy issue for a specific chaincode in the test env,** BUT** the other chaincode in the test environment work fine using the same endorsement policy. The specific chaincode that is having the endorsement policy failure works fine in the DEV environment. Difference between test env and dev env. Dev Env: HF 1.4.2, have control of ORG1 and ORG2 certs and peers. Test Env: HF 1.4.0, only have control of ORG1 certs and peers. In regards to trouble shooting, is there a method in which I can see the endorsement of the specific chaincode that is failing and has been instantiated in the channel. It should have the same endorsement policy as the other chaincode just want to confirm. Below is an example of the endorsement policy that is being used. ``` shell -P "AND (OR(‘Org1MSP.peer', ‘Org1MSP.client’,’Org1MSP.member’,’Org1MSP.admin'), OR (‘Org2MSP.peer', ‘Org2MSP.client', ‘Org2MSP.member', ‘Org2MSP.admin'))" ```` Errors Faced: ```shell validateTx -> ERRO 42d1 VSCCValidateTx for transaction txId = returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy ``` ```shell validateTx -> ERRO 42d1 VSCCValidateTx for transaction txId = returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy ``` In regards to trouble shooting, I have a few questions. 1.) Is there a method in which I can see the endorsement of the specific chaincode that is failing and has been instantiated in the channel. It should have the same endorsement policy as the other chaincode just want to confirm. 2.) Is is possible that changes in ORG2 peers and certs can cause endorsement policy in a specific chaincode and not the other chaincode. 3.) Can the difference between HF versions cause endorsement policy error for one of the chain-code and not the rest? 3.) Any thoughts or hints that can set me in the right direction?

lzaouche (Tue, 25 Feb 2020 14:35:12 GMT):
When we run the byfn.sh of first-network example, which chaincode is installed?

javapriyan (Thu, 27 Feb 2020 07:26:06 GMT):
What is the extra step required to deploy the Typescript fabcar example in the firstnetwork ?

davidkhala (Fri, 28 Feb 2020 05:01:08 GMT):
When I use shim.Error() in fabric-chaincode-node, the proposal response will wrap my raw error message in this way: transaction returned with failure: Error: ${originalError.message} Is there possible to get back the originalError message?

davidkhala (Fri, 28 Feb 2020 05:01:08 GMT):
When I use shim.Error() in fabric-chaincode-node, the proposal response will wrap my raw error message in this way: transaction returned with failure: Error: ${originalError.message} Is there possible to get back the originalError message? One of my ideas is to make use of payload.

davidkhala (Fri, 28 Feb 2020 05:01:08 GMT):
When I use shim.Error() in fabric-chaincode-node, the proposal response will wrap my raw error message in this way: `transaction returned with failure: Error: ${originalError.message}` Is there possible to get back the originalError message? One of my ideas is to make use of payload.

PraveenKumar1984 (Sat, 29 Feb 2020 14:59:12 GMT):
Has joined the channel.

PraveenKumar1984 (Sat, 29 Feb 2020 14:59:13 GMT):
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer.example.com on 127.0.0.11:53: no such host"

PraveenKumar1984 (Sat, 29 Feb 2020 15:01:06 GMT):
any help on this error?

qwertlimframe (Mon, 02 Mar 2020 05:10:20 GMT):
Has joined the channel.

illya13 (Mon, 02 Mar 2020 16:38:16 GMT):
Has joined the channel.

Koushik (Tue, 03 Mar 2020 00:51:54 GMT):
Hi Guys, has anyone created a flutter based hyperledger fabric app

basil34 (Tue, 03 Mar 2020 17:06:26 GMT):
Has joined the channel.

Antimttr (Tue, 03 Mar 2020 17:14:44 GMT):
attempting to instantiate chaincode on my channel, I'm getting this error message from my proposal response return: `Sending chaincode to peers failed: cannot get package for chaincode`

Antimttr (Tue, 03 Mar 2020 17:15:06 GMT):
i did some googling i read that this has to do with not being able to compile the chaincode, but im using node chaincode...

mbanerjee (Tue, 03 Mar 2020 23:02:01 GMT):
If 3 orgs join a channel, can a chaincode be installed and instantiated for two of the org's or do they have to be installed and instantiated on all three?

knagware9 (Wed, 04 Mar 2020 04:59:12 GMT):
chaincode could be installed on any no of peer which you want to give as endorser role and instantiation is just one time process for any one peer

Jelle.Diet (Wed, 04 Mar 2020 07:25:17 GMT):
chaincode is instantiated on a channel not an individual peer iirc

mahoney1 (Wed, 04 Mar 2020 16:49:37 GMT):
reminder that the Fabric Application Developer Community call Thursday is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

chmpmps (Thu, 05 Mar 2020 10:56:59 GMT):
Has joined the channel.

chmpmps (Thu, 05 Mar 2020 10:57:01 GMT):
Hi everyone. I m working with private collections and I m investigating what are the traces left in the peer after the deletion of the private asset from the side db. There is a log file that it's deleted every specific number of blocks but I don't see any ldb file created in the filesystem to justify the persisted transient data. Does anyone know where the transient data are stored in the peer before the peer gets the block from the orderer?

chmpmps (Thu, 05 Mar 2020 10:57:01 GMT):
Hi everyone. I m working with private collections and I m investigating what are the traces left in the peer after the deletion of the private asset from the side db. There is a log file that it's deleted every specific number of blocks but I don't see any ldb file created in the filesystem to justify the persisted transient data. Does anyone know where the transient data are stored in the peer before the peer gets the block from the orderer?

diasruipedro (Thu, 05 Mar 2020 11:56:13 GMT):
Has joined the channel.

diasruipedro (Thu, 05 Mar 2020 12:01:10 GMT):
Hi all. I'm trying to unit test a chaincode that I developed in Go, but when I try to invoke "stub.MockInvoke()", how can I pass the separated arguments? The chaincode method as the same signature as the CreateCar in fabcar chaincode. Thank you!

obelix (Sun, 08 Mar 2020 14:51:14 GMT):
Has joined the channel.

PraveenKumar1984 (Mon, 09 Mar 2020 19:16:26 GMT):
Hi

Abhishekkishor (Wed, 11 Mar 2020 15:58:18 GMT):
Has joined the channel.

braduf (Wed, 11 Mar 2020 16:25:07 GMT):
Hi all, I want to know if the same chaincode can be used on peers that create the chaincode container and on peers that use external builders. Could anybody clarify this, please? Thanks a lot.

GuilhermeLionzo (Fri, 13 Mar 2020 20:37:45 GMT):
Has joined the channel.

GuilhermeLionzo (Fri, 13 Mar 2020 20:41:05 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 ]; ```

hariomdebut (Mon, 16 Mar 2020 08:31:46 GMT):
Has joined the channel.

hariomdebut (Mon, 16 Mar 2020 08:31:58 GMT):
Hi, is that possible to run cron job at chaincode level. If so, please provide some tutorials. Outside of chaincode cron is working fine but it is not working inside chaincode. Is there anything in fabric which is preventing it to execute it

Antimttr (Mon, 16 Mar 2020 16:24:19 GMT):
well you could write a script that uses an sdk client to perform a chaincode invocation

Antimttr (Mon, 16 Mar 2020 16:24:39 GMT):
and then have that script be run by crontab

GuilhermeLionzo (Tue, 17 Mar 2020 00:46:37 GMT):
Hi jrasm91 . Did you solve this problem? If yes, could you explain how you installed/instatiated two smart contracts on the same channel? I'm trying to do the same thing.

shiseki (Tue, 17 Mar 2020 05:34:54 GMT):
Has joined the channel.

G596 (Tue, 17 Mar 2020 10:31:03 GMT):
Hi ,

G596 (Tue, 17 Mar 2020 10:33:09 GMT):
Hi, I wanted to know how to check whether any records were retrieved or not when using the getQueryResult() method, which returns an object of the type QueryResultsIterator.

Jelle.Diet (Tue, 17 Mar 2020 11:16:06 GMT):
something like this maybe? Iterator iterator = ctx.getStub().getQueryResult(query).iterator(); if(!iterator.hasNext()) { // no results }

G596 (Wed, 18 Mar 2020 05:24:06 GMT):
thanks! works like a charm :)

mahoney1 (Wed, 18 Mar 2020 11:03:43 GMT):
hi all, hope you're all well :-) a reminder that the Fabric Application Developer Community call on Thursday 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

braduf (Wed, 18 Mar 2020 21:37:09 GMT):
Hi all, i am using the new chaincode lifecycle and sometimes after installing, approving and commiting the chaincode, the database for the chaincode is not created in the couchDB. I do have the lifecycle databases, and in there I see the metadata and everything of my chaincode, but its own database doesn't show up. When I then try to do some invokes, the transactions are rejected by the peer at commit time: `Transaction commit was rejected by peer ...` If I then retry the invoke some times it suddenly creates the db and the transaction gets comitted succesfully. From that point everything works normal. Is this a known bug or could it be something I am doing wrong?

braduf (Wed, 18 Mar 2020 21:37:09 GMT):
Hi all, i am using the new chaincode lifecycle and sometimes after installing, approving and commiting the chaincode, the database for the chaincode is not created in the couchDB. I do have the lifecycle databases, and in there I see the metadata and everything of my chaincode, but its own database doesn't show up. When I then try to do some invokes, the transactions are rejected by the peer at commit time: `Transaction commit was rejected by peer ...` If I then retry the invoke some times it suddenly creates the db and the transaction gets comitted succesfully. From that point everything works normally. Is this a known bug or could it be something I am doing wrong?

serial-coder (Thu, 19 Mar 2020 05:03:23 GMT):
Hi All, I'm trying to send multiple events from my Go chaincode using SetEvent(). I use NodeJS' registerChaincodeEvent() to subscribe events. I can receive an event from chaincode correctly if I emit just a single event. But, if I try to emit multiple events I will receive only the latest emitted event. This issue happens both when I emit events with the same event name or different names. Can anyone shed some light on this?

awjh (Thu, 19 Mar 2020 09:20:01 GMT):
Hi, I believe you can only emit one event per transaction. Setting another event overrides the previously set one

mahoney1 (Thu, 19 Mar 2020 11:00:02 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:02 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?src=contextnavpagetreemode

mahoney1 (Thu, 19 Mar 2020 11:00:02 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

PranavBhardwaja67 (Thu, 19 Mar 2020 11:48:53 GMT):
Has joined the channel.

PranavBhardwaja67 (Thu, 19 Mar 2020 11:48:54 GMT):
Hi, I am getting the chaincode event payload as and when I convert it to string - its an empty json. . Any ideas ? I am connecting eventhub before registering so that should be ok & utilizing getchannelEventHubForOrgs()

serial-coder (Thu, 19 Mar 2020 16:05:35 GMT):
Thanks

serial-coder (Thu, 19 Mar 2020 16:09:07 GMT):
I think you should enable full block sync using this call: channelEventHub.connect(true)

Rajatsharma (Thu, 19 Mar 2020 23:43:48 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 ?

PranavBhardwaja67 (Fri, 20 Mar 2020 04:29:07 GMT):
Hey Thank you , well that worked . It was a different issue. But if I just have to register the event just once and not everytime , then what shall we do to listen to that event everytime ( Without getting into ..registerevent)

serial-coder (Fri, 20 Mar 2020 04:45:43 GMT):
I don't think I understand your question correctly but you have to register an event just once using one of the following: registerTxEvent(), registerBlockEvent() or registerBlockEvent(). With registerBlockEvent(), you can catch any event from any txs in any block without the need to register a chaincode event one by one.

SanthoshThomas (Sun, 22 Mar 2020 04:52:37 GMT):
Has joined the channel.

skyliulu (Sun, 22 Mar 2020 08:49:39 GMT):
Has joined the channel.

skyliulu (Sun, 22 Mar 2020 08:54:31 GMT):
Hi All,for decentralized governance for smart contracts in fabric2.0, I want to know how organizations can extend the chaincode for their use cases??

skyliulu (Sun, 22 Mar 2020 08:55:01 GMT):
does these orgs still use same chaincode name?

skyliulu (Sun, 22 Mar 2020 08:57:40 GMT):
[图片]

DVasin (Sun, 22 Mar 2020 11:46:06 GMT):
Hi, guys. I suddenly started having problem: ``` 2020-03-22 11:36:02.142 UTC [endorser] callChaincode -> INFO 3aa [mychannel][d1bd6f5a] Exit chaincode: name:"lscc" (3577ms) 2020-03-22 11:36:02.142 UTC [endorser] SimulateProposal -> ERRO 3ab [mychannel][d1bd6f5a] failed to invoke chaincode name:"lscc" , error: container exited with 1 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed ``` When instantiating my Java chaincode. How can I debug it? I tried to upgrade compose to 1.4.6 from 1.4.3. Then this thing started to happen. I rolled back images to 1.4.3 but the problem persists.

DVasin (Sun, 22 Mar 2020 12:05:03 GMT):
And after I've done exactly nothing (restarted a few times) I now have a following error: ```Error endorsing chaincode: rpc error: code = Unavailable desc = transport is closing``` But chaincode instantiates successfully

yuriiuhlanov (Sun, 22 Mar 2020 20:35:39 GMT):
Has joined the channel.

yuriiuhlanov (Sun, 22 Mar 2020 20:35:40 GMT):
Hi community, How can I test my smartcontracts developed in nodejs using `fabric-contract-api`? There is no available MockContract inside that library and if I try to use `fabric-shim`, I see errors saying that my chaincode does not implement `ChaincodeInterface` with methods `Init` and `Invoke` which it clearly doesn't. What can you recommend?

yuriiuhlanov (Sun, 22 Mar 2020 20:35:40 GMT):
Hi community, How can I test my smartcontracts developed in nodejs using `fabric-contract-api`? There is no available MockContract inside that library and if I try to use `ChaincodeStub` from `fabric-shim`, I see errors saying that my chaincode does not implement `ChaincodeInterface` with methods `Init` and `Invoke` which it clearly doesn't. What can you recommend?

ZainabM (Mon, 23 Mar 2020 05:12:38 GMT):
Has joined the channel.

Roberto9 (Mon, 23 Mar 2020 17:24:02 GMT):
Has joined the channel.

Roberto9 (Mon, 23 Mar 2020 17:24:49 GMT):
startFabric.sh in the fabcar example is failing when using ./startFabric javascript, works fine when run on go. Here is the error, + 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 fabcar -l node -v 1.0 -c '{"Args":[]}' -P 'AND('\''Org1MSP.member'\'','\''Org2MSP.member'\'')' --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 --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt 2020-03-23 17:18:34.320 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2020-03-23 17:18:34.321 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1

aberwag (Tue, 24 Mar 2020 08:08:03 GMT):
Has joined the channel.

AbdullahJoyia (Tue, 24 Mar 2020 09:04:57 GMT):
Has joined the channel.

AbdullahJoyia (Tue, 24 Mar 2020 09:04:57 GMT):
Hello everyone. I am facing issue in deployement of fabcar. I have installed hyperledger fabric 2.0.0. When I try to run the fabcar example, I am getting an error like this... Can anybody help me in that. Error: error getting chaincode deployment spec for fabcar: error getting chaincode package bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric/core/chaincode/shim

vikramsharma13 (Tue, 24 Mar 2020 09:34:33 GMT):
Has joined the channel.

knagware9 (Tue, 24 Mar 2020 10:14:23 GMT):
are you using new chaincode lifecycle ?

AbdullahJoyia (Tue, 24 Mar 2020 10:30:01 GMT):
I am using fabric version 1.4 Now i switched to fabric version 2.0

AbdullahJoyia (Tue, 24 Mar 2020 10:32:04 GMT):
I can't understand this error. Can you help me to solve this

kush-daga (Tue, 24 Mar 2020 14:22:40 GMT):
Has joined the channel.

icarrascol (Tue, 24 Mar 2020 18:57:04 GMT):
hello everyone i have a question about peer chaincode lifecycle, i dont unterstand the --sequence flag, if it is really needed and what is supposed to be, on the test example network script it is set up to the version of the chaincode, but versions can be like 1.1, 1.2, etc .. the sequence flag receives an int so it isnt compatible with that variable

Milos22 (Wed, 25 Mar 2020 09:06:42 GMT):
Has joined the channel.

Milos22 (Wed, 25 Mar 2020 09:07:19 GMT):
Hi guys, do you know about some exemples of bridges between Fabric and Corda or Fabric and Ethereum? ex. a token exchange

Diegoescalonaro (Thu, 26 Mar 2020 11:07:20 GMT):
Hi guys! Does anyone know if the "GetStateByPartialCompositeKey" function has changed from new Fabric 2.0.X version? I see that "GetHistoryForKey" function now returns results from newest to oldest, but I didn't see any reference to the function related to compositeKeys. Has anyone already tested it? Thanks!

Diegoescalonaro (Thu, 26 Mar 2020 16:00:35 GMT):
The answer is no, GetStateByPartialCompositeKey function works in 2.0.x as same as in 1.4.x version. Just tested it. Thx

AbdullahJoyia (Thu, 26 Mar 2020 17:36:38 GMT):
Hi. i am using fabric version 2.0, When i run the command ./network.sh deployCC it give the error. Can anybody help me in that peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1 ++ res=1 ++ set +x Error: error getting chaincode bytes: listing deps for pacakge ../chaincode/fabcar/go/ failed: exit status 2 !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! deploying chaincode on channel 'mychannel' Vendoring Go dependencies ... )

PranavBhardwaja67 (Fri, 27 Mar 2020 10:08:25 GMT):
Hello, everytime I trigger a transaction , I am getting 2 chaincode events. First is the event from the last block and then the event from the current transaction/block. How can I stop getting the old event ?

Basil-3 (Sun, 29 Mar 2020 04:40:16 GMT):
Hello, I have developed an application based on hyperledger fabric tuna-app (as per given in course LFS171x at EdX). While running ./startFabric.sh, I am facing this issue: Error: error getting chaincode code abcp: path to chaincode does not exist: /opt/gopath/src/home/basil/ABCP/abcp My bash script is like this: `#!/bin/bash # # SPDX-License-Identifier: Apache-2.0 # This code is based on code written by the Hyperledger Fabric community. # Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/fabcar/startFabric.sh # # Exit on first error set -e # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 starttime=$(date +%s) if [ ! -d ~/.hfc-key-store/ ]; then mkdir ~/.hfc-key-store/ fi # 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 tuna catches 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 abcp -v 1.0 -p ~/ABCP/abcp 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 abcp -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 tuna-app -c '{"function":"initLedger","Args":[""]}' printf "\nTotal execution time : $(($(date +%s) - starttime)) secs ...\n\n" printf "\nStart with the registerAdmin.js, then registerUser.js, then server.js\n\n"` My folder structure is as follows: ~/ABCP/ chaincode/ abcp/ abcp_chaincode.go basic-network/ abcp/ src/ queryEmployee.js ... client/ app.js startFabric.sh ...

Basil-3 (Sun, 29 Mar 2020 04:41:08 GMT):
I indented my folder structure but it removed all whitespaces. Let me know in case of any discrepancy.

yuriiuhlanov (Mon, 30 Mar 2020 11:46:50 GMT):
what I did, in my test file I created a class that extended my `Contract` class and implemented both `Init` and `Invoke` methods from `ChaincodeInterface`. Since I used custom `Context` implementation, I had to instantiate it and assign `stub: ChaincodeMockStub` that both methods accept to `stub` property of my context. Later on, I was able to obtain the function name and arguments and pass them to an appropriate smartcontract from `this`. Do not forget to return `shim.error` or `shim.success`. `mockStub` I created using @theledger/fabric-mock-stub where I passed an instance of my Contract extended with both aforementioned methods. Hope this helps someone else.

yuriiuhlanov (Mon, 30 Mar 2020 11:49:44 GMT):
`shim` is imported from 'fabric-shim'

pritam_01 (Tue, 31 Mar 2020 05:38:02 GMT):
Has joined the channel.

pritam_01 (Tue, 31 Mar 2020 05:47:05 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 abcp -v 1.0 -p ~/ABCP/abcp In -p try -p home/basil/ABCP/abcp cuz -p looks for path after src in your GOPATH

basil34 (Tue, 31 Mar 2020 05:53:10 GMT):
it sure is for path.. Hence I defined it. but i guess instead of tillda, i had to type home/basil. I will continue thread in case of further queries. Thanks!

RemisB (Wed, 01 Apr 2020 10:11:15 GMT):
Has joined the channel.

RemisB (Wed, 01 Apr 2020 10:11:16 GMT):
Can not find docs or samples ho How to setup more than one smartcontract in one chaincode in golang on Hyperledger Fabric 1.4

RemisB (Wed, 01 Apr 2020 10:11:16 GMT):
Can not find docs or samples on How to setup more than one smartcontract in one chaincode in golang on Hyperledger Fabric 1.4

mahoney1 (Thu, 02 Apr 2020 11:10:48 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:10:48 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

braduf (Fri, 03 Apr 2020 03:33:46 GMT):
"If you commit the definition before a channel member has approved the chaincode, the organization will not be able to endorse transactions. As a result, it is recommended that all channel members approve a chaincode before committing the chaincode definition." What about new organizations entering the consortium? Should a chaincode update be done if the new organization also needs to use the chaincode? And does this only counts if the new organisation needs to be able to endorse txs or can it also not query the chaincode?

Amalendu_Palakkatil (Fri, 03 Apr 2020 06:01:40 GMT):
Has joined the channel.

Amalendu_Palakkatil (Fri, 03 Apr 2020 06:01:51 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??

qubing (Fri, 03 Apr 2020 09:42:20 GMT):
Hi guys. How to let the chaincode with private data get endorsement from the peer without private data?

Mms 11 (Sun, 05 Apr 2020 20:34:56 GMT):
Has joined the channel.

letsblockchain (Mon, 06 Apr 2020 07:57:00 GMT):
Has joined the channel.

Adhavpavan (Tue, 07 Apr 2020 15:37:28 GMT):
Has joined the channel.

AbdullahJoyia (Thu, 09 Apr 2020 11:22:11 GMT):

error1.png

AbdullahJoyia (Thu, 09 Apr 2020 11:22:50 GMT):

error.png

vramaiitkgp (Thu, 09 Apr 2020 12:25:24 GMT):
Has joined the channel.

vramaiitkgp (Thu, 09 Apr 2020 12:25:26 GMT):
Hi Fabric gurus. I'm trying out the new chaincode installation lifecycle using the CLI on a 4-org 4-peer network. I'm able to package my chaincode, install it on all 4 peers, and approve it from all 4 peers. But it finally fails at the commit step. Before the commit step, I query for readiness using `peer lifecycle chaincode checkcommitreadiness`. I get a positive status for all 4 orgs as follows: ``` { "approvals": { "CarrierOrgMSP": true, "ExporterOrgMSP": true, "ImporterOrgMSP": true, "RegulatorOrgMSP": true } } ``` But commitment fails with the following error: `Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (ExporterOrgMSP)`. The org name doesn't matter; I tried different permutations of orgs, and the commit failed each time with a similar error. I also tried different chaincodes and chaincode types (Go and Java). Same error each time. Any advice?

Koushik (Fri, 10 Apr 2020 00:37:19 GMT):
Hi guys, does anyone have the release notes for fabric/java-env for all versions of 1.4.x. I am trying to figure out what differences are there between 1.4.0 to 1.4.2 in regards to java sdk. I checked on https://github.com/hyperledger/fabric-sdk-java and see that it just says minor changes, I would like to know what changes.

Koushik (Fri, 10 Apr 2020 00:37:19 GMT):
Hi guys, does anyone have the release notes for fabric/java-env for all versions of 1.4.x. I am trying to figure out what differences are there between 1.4.0 to 1.4.2 in regards to java sdk. I checked on https://github.com/hyperledger/fabric-sdk-java and see that it just says minor changes, I would like to know what changes. I compared the java-env containers from 1.4.0 to 1.4.2 but can see no difference

Nammalvar (Fri, 10 Apr 2020 00:48:46 GMT):
Hello, Im reading the _hyperledger-fabricdocs pdf version 1.4_ and I am very confused by the `anchor` concept in *2.1.1. PROPOSE message format* : \footnotesize anchor contains read version dependencies, or more specifically, key-version pairs (i.e., anchor is a subset of KxN), that binds or “anchors” the PROPOSE request to specified versions of keys in a KVS (see Section 1.2.). If the client specifies the anchor argument, an endorser endorses a transaction only upon read version numbers of corresponding keys in its local KVS match anchor (see Section 2.2. for more details). \normalsize Are they some examples of usage of this type of argument ?

Nammalvar (Fri, 10 Apr 2020 00:53:19 GMT):
Hello, I'm reading the _hyperledger-fabricdocs pdf_ version 1.4 and I am very confused by the _anchor_ concept in *2.1.1. PROPOSE message format* : are they some examples of usages of this type of argument somewhere ?

Nammalvar (Fri, 10 Apr 2020 12:00:15 GMT):

Clipboard - April 10, 2020 1:59 PM

Nammalvar (Fri, 10 Apr 2020 12:00:28 GMT):
(I mean this paragraph) :

Nammalvar (Fri, 10 Apr 2020 12:00:28 GMT):
(I mean this paragraph)

Nammalvar (Fri, 10 Apr 2020 12:04:28 GMT):
For me, this anchor is not associated with the _peer anchor_ concept, as "specified versions of keys" seems not relevant in this context. Or did I miss something ?

KuldeepSrivastava (Sun, 12 Apr 2020 06:53:32 GMT):
Has joined the channel.

KuldeepSrivastava (Sun, 12 Apr 2020 06:53:34 GMT):
Hello everyone, i got this error while invoking the chaincode Error: endorsement failure during invoke. response: status:500 message:"failed to execute transaction ee0240822a56fc6ab8b140ee211a60ebbef3e539936d012a79f5739e3037f992: error sending: chaincode stream terminated" . Any help? Any reason?

Mms 11 (Sun, 12 Apr 2020 20:34:07 GMT):
How do you guys setup the network and your chaincodes, are you building multiple chaincodes or trying to reduces to the maximum? I build a very basic network with chaincodes, two orgs, one peer per each org, two raft orders all that in a single channel. With this setup I noticed a big decrease in performance (both my machine but primarily the network). When I'm deploying and instantiating the second chaincode I see the fall in performance. I can build the poc with only one chaincode deployed, but I was hoping for a more DDD approach, making each chaincode encapsulating the business domain. Also, is the first-network example one that may have many configuration flaws? I based my setup on this example and as mentioned my machine gets it's ass beaten (I have a 16GB MacBookPro, so not the worst).

Rajatsharma (Mon, 13 Apr 2020 10:52:00 GMT):
As per this answer https://stackoverflow.com/questions/51377474/hyperledger-fabric-gossip-bootstrap-gossip-externalendpoints, I tried giving multiple peers in my docker-compose as: ``` - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051 ```

Rajatsharma (Mon, 13 Apr 2020 10:52:00 GMT):
As per this answer https://stackoverflow.com/questions/51377474/hyperledger-fabric-gossip-bootstrap-gossip-externalendpoints, I tried giving multiple peers in my docker-compose as: ``` - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051 ``` But still I'm getting this error in my peer ``` 2020-04-13 10:49:44.276 UTC [gossip.discovery] func1 -> WARN 02a Could not connect to Endpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], InternalEndpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], PKI-ID: , Metadata: : context deadline exceeded 2020-04-13 10:50:12.277 UTC [gossip.discovery] func1 -> WARN 02b Could not connect to Endpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], InternalEndpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], PKI-ID: , Metadata: : context deadline exceeded 2020-04-13 10:50:40.278 UTC [gossip.discovery] func1 -> WARN 02c Could not connect to Endpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], InternalEndpoint: [peer0.org1.rajat.com:7051,peer1.org1.rajat.com:7051], PKI-ID: , Metadata: : context deadline exceeded ``` What's the correct way of doing this ?

letch2010 (Mon, 13 Apr 2020 15:19:58 GMT):
Hello, I have a private Nexus repository from which my chaincode is pulling dependencies. I am getting a Maven build error, 401 (Unauthorized Request), for the dependencies stored in this private repository when I run `peer chaincode instantiate`. I have tried binding my .m2 repository to the peer and cli containers without success: `$HOME/.m2:root/.m2`. How/where should I provide the credentials for my private repository?

letch2010 (Mon, 13 Apr 2020 15:19:58 GMT):
Hello, I have a private Nexus repository from which my chaincode is pulling dependencies. I am getting a Maven build error, 401 (Unauthorized Request), only for the dependencies stored in this private repository when I run `peer chaincode instantiate`. I have tried binding my .m2 repository to the peer and cli containers without success: `$HOME/.m2:root/.m2`. How/where should I provide the credentials for my private repository?

letch2010 (Mon, 13 Apr 2020 17:19:48 GMT):
For anyone encountering this issue, it was fixed by editing the hyperledger/fabric-javaenv image. You just need to make sure your credentials are in that image, since that is what hyperledger fabric uses to build/instantiate chaincodes.

davidkel (Mon, 13 Apr 2020 17:41:28 GMT):
You might want to raise an issue on jira against the Java Chaincode, there could be another way to provide credentials, if not then it sounds like using a private maven repo might be a useful thing other people may do so could be a feature enhancement

Rajatsharma (Tue, 14 Apr 2020 20:08:10 GMT):
Hey,  I was using CouchDB and I tried to spawn a network with more than 2 peers in an organization(I had 5 peers). It was very unusual data in all the CouchDB was not the same. I didn't get this if a peer belongs to an authorized organization, then ideally it should pull data from other peers. Can anyone help me with this?

letch2010 (Tue, 14 Apr 2020 20:16:16 GMT):
In a Java chaincode, how would I go about implementing my own logging framework? Currently, I am using Slf4j implemented by log4j2 configured with a log4j2.yaml file. It runs correctly locally. When I instantiate the chaincode, I check the chaincode container for the logs. I do see some of my logging messages, but it seems the chaincode logging is not configured according to my configuration file.

letch2010 (Tue, 14 Apr 2020 20:20:05 GMT):
I'm wondering if it's a classpath issue or HLF config related.

letch2010 (Wed, 15 Apr 2020 15:21:54 GMT):
For anyone interested, I solved the above issue by adding this transformer, `com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer`, to my maven-shade-plugin. Apparently, log4j2 does not play well with uberjars. See the git project for how to add it to your project's dependency management file.

Taffies (Thu, 16 Apr 2020 06:26:49 GMT):
Hello! How do you create the `go.mod` file in the new 2.0 chaincode lifecycle? How do I know the dependencies required?

Paradox-AT (Thu, 16 Apr 2020 13:39:48 GMT):
yeah the sync should happen, check the block height for each peer

rthatcher (Thu, 16 Apr 2020 14:53:16 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

jaraujo (Thu, 16 Apr 2020 17:43:57 GMT):
Has joined the channel.

jaraujo (Thu, 16 Apr 2020 17:44:51 GMT):
Hi guys! I've tried several times deploying a Java Contract using Fabric 2.0.1 but every time I commit the chaincode, Fabric is unable to create the dev-peer. It's just a simple chaincode that implements ContractInterface. Does anyone know what could it be? I'm using Maven as a dependency tool

Mms 11 (Thu, 16 Apr 2020 20:29:22 GMT):
What error are you getting when commiting the chaincode?

Mms 11 (Thu, 16 Apr 2020 20:30:20 GMT):
BTW, I'm not sure Maven is supported, the examples are using gradle

MHBauer (Thu, 16 Apr 2020 21:16:44 GMT):
Has left the channel.

mvanmeerbeck (Thu, 16 Apr 2020 21:56:44 GMT):
Has joined the channel.

mvanmeerbeck (Thu, 16 Apr 2020 21:56:45 GMT):
Hi there!

mvanmeerbeck (Thu, 16 Apr 2020 21:59:51 GMT):
I'm using chaincode-docker-devmode from fabric-samples 2.0 and i would like to regenerate the certificates of the admin (i have to add a custom attribute). I can't find how the certs materials have been generated for chaincode-docker-devmode.

mvanmeerbeck (Thu, 16 Apr 2020 21:59:51 GMT):
I'm using chaincode-docker-devmode from fabric-samples 2.0. I would like to regenerate the certificates of the admin (i have to add a custom attribute) and unfortunetly there is no CA in devmode. I can't find how the certs materials have been generated for chaincode-docker-devmode.

mvanmeerbeck (Thu, 16 Apr 2020 22:01:23 GMT):
I'm pretty sure cryptogen were used but can't figure which config and how

mvanmeerbeck (Thu, 16 Apr 2020 22:08:24 GMT):
And if you wonder why i need an attribute, i'm using the Attribute-Based Access Control (ABAC) in my contract

mvanmeerbeck (Thu, 16 Apr 2020 22:08:24 GMT):
And if you wonder why i need an attribute, i'm using the Attribute-Based Access Control (ABAC) in my contract. Thanks a lot!

Mms 11 (Thu, 16 Apr 2020 23:33:02 GMT):
Hi there, is there a way to force a given serialization of an object when returning response from a java contract ? I have java LocalDate type in my response dto and it's being serialized to an array of values, like `:\"year\":2020,\"month\":\"MARCH\",\"monthValue\":3,\"dayOfMonth\":31,\"leapYear\":true,"`. Any idea how to force a proper serialization or I need to do it manually ?

letch2010 (Thu, 16 Apr 2020 23:50:54 GMT):
Use the jackson-datatype-jsr310 dependency. You'll need to manage how it gets serialized.

Mms 11 (Fri, 17 Apr 2020 07:38:26 GMT):
@letch2010 Thx, I already have it in my dependencies, but the shim uses some sort of a json serialization mechanism already, I had to force it with JsonSerializer.

davidkel (Fri, 17 Apr 2020 07:45:15 GMT):
technically it's not the shim, this is a feature of the contract api

Mms 11 (Fri, 17 Apr 2020 08:41:25 GMT):
Other question, I'm trying to run my chain codes in dev mode, when starting the uberJar all looks nice, but it stops on this log entry: ``` 08:30:53:896 INFO org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder Configuring channel connection to peer. 08:30:54:027 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Max Pool Size [TP_MAX_POOL_SIZE]5 08:30:54:029 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Queue Size [TP_CORE_POOL_SIZE]5000 08:30:54:031 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Core Pool Size [TP_QUEUE_SIZE]5 08:30:54:033 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Keep Alive Time [TP_KEEP_ALIVE_MS]5000 08:30:54:035 INFO org.hyperledger.fabric.shim.impl.InvocationTaskExecutor Thread pool created 08:30:54:038 INFO org.hyperledger.fabric.shim.impl.ChaincodeSupportClient start making the grpc call 08:30:54:185 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager register Registering new chaincode name: "poc-services:0" ``` I'm runnning Fabric 2.0 with a java chaincode. The dev network is copied from the sample repo. https://github.com/hyperledger/fabric-samples/tree/master/chaincode-docker-devmode

Taffies (Fri, 17 Apr 2020 09:11:03 GMT):
Hello, I'm trying to upgrade to the new chaincode lifecycle in Fabric 2.0. I'm having trouble committing the chaincode to the channel - I think it has something to do with the peers communicating with each other (`--peerAddresses` and `tlsRootCertFiles`). This is what I wrote: `peer lifecycle chaincode commit -o orderer0.orgorderer1:7050 --tls true --cafile /data/orgorderer1-ca-chain.pem --clientauth true --keyfile /data/tls/org1-cli-client.key --certfile /data/tls/org1-cli-client.crt --channelID mychannel --name trade_cc1 --version 1.0 --init-required --sequence 1 --peerAddresses peer0.org1:7051 --tlsRootCertFiles /data/org1-ca-chain.pem --peerAddresses peer0.org2:7051 --tlsRootCertFiles /data/org2-ca-chain.pem` Here's the error message that was returned: `2020-04-17 09:08:04.340 UTC [grpc] createTransport -> DEBU 03a grpc: addrConn.createTransport failed to connect to {peer0.org2:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for peer0.org2, not peer0.org1". Reconnecting...` ... `Error: failed to retrieve endorser client for commit: endorser client failed to connect to peer0.org2:7051: failed to create new connection: context deadline exceeded` When I went to the peer0.org2 logs, it says: `2020-04-17 09:09:46.023 UTC [cauthdsl] func2 -> DEBU 132ac 0xc005646260 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected Org2MSP, got Org1MSP)` (not sure if it's related) Does anyone have any idea why this error occurs? How should I go about troubleshooting it? Thanks a lot in advance!

Taffies (Fri, 17 Apr 2020 09:11:03 GMT):
Hello, I'm trying to upgrade to the new chaincode lifecycle in Fabric 2.0. I'm having trouble committing the chaincode to the channel - I think it has something to do with the peers communicating with each other (`--peerAddresses` and `--tlsRootCertFiles`). This is what I wrote: `peer lifecycle chaincode commit -o orderer0.orgorderer1:7050 --tls true --cafile /data/orgorderer1-ca-chain.pem --clientauth true --keyfile /data/tls/org1-cli-client.key --certfile /data/tls/org1-cli-client.crt --channelID mychannel --name trade_cc1 --version 1.0 --init-required --sequence 1 --peerAddresses peer0.org1:7051 --tlsRootCertFiles /data/org1-ca-chain.pem --peerAddresses peer0.org2:7051 --tlsRootCertFiles /data/org2-ca-chain.pem` Here's the error message that was returned: `2020-04-17 09:08:04.340 UTC [grpc] createTransport -> DEBU 03a grpc: addrConn.createTransport failed to connect to {peer0.org2:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for peer0.org2, not peer0.org1". Reconnecting...` ... `Error: failed to retrieve endorser client for commit: endorser client failed to connect to peer0.org2:7051: failed to create new connection: context deadline exceeded` When I went to the peer0.org2 logs, it says: `2020-04-17 09:09:46.023 UTC [cauthdsl] func2 -> DEBU 132ac 0xc005646260 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected Org2MSP, got Org1MSP)` (not sure if it's related) Does anyone have any idea why this error occurs? How should I go about troubleshooting it? Thanks a lot in advance!

Taffies (Fri, 17 Apr 2020 09:11:03 GMT):
Hello, I'm trying to upgrade to the new chaincode lifecycle in Fabric 2.0. I'm having trouble committing the chaincode to the channel - I think it has something to do with the peers communicating with each other (`--peerAddresses` and `--tlsRootCertFiles`). This is what I wrote: `peer lifecycle chaincode commit -o orderer0.orgorderer1:7050 --tls true --cafile /data/orgorderer1-ca-chain.pem --clientauth true --keyfile /data/tls/org1-cli-client.key --certfile /data/tls/org1-cli-client.crt --channelID mychannel --name chaincode_name --version 1.0 --init-required --sequence 1 --peerAddresses peer0.org1:7051 --tlsRootCertFiles /data/org1-ca-chain.pem --peerAddresses peer0.org2:7051 --tlsRootCertFiles /data/org2-ca-chain.pem` Here's the error message that was returned: `2020-04-17 09:08:04.340 UTC [grpc] createTransport -> DEBU 03a grpc: addrConn.createTransport failed to connect to {peer0.org2:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for peer0.org2, not peer0.org1". Reconnecting...` ... `Error: failed to retrieve endorser client for commit: endorser client failed to connect to peer0.org2:7051: failed to create new connection: context deadline exceeded` When I went to the peer0.org2 logs, it says: `2020-04-17 09:09:46.023 UTC [cauthdsl] func2 -> DEBU 132ac 0xc005646260 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected Org2MSP, got Org1MSP)` (not sure if it's related) Does anyone have any idea why this error occurs? How should I go about troubleshooting it? Thanks a lot in advance!

letch2010 (Fri, 17 Apr 2020 13:32:07 GMT):
Right, you'll need to handle the date conversion manually. See the following link: https://github.com/hyperledger/fabric-chaincode-java/blob/master/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/JSONTransactionSerializer.java

letch2010 (Fri, 17 Apr 2020 13:32:26 GMT):
Make sure your version is set correctly in the repo.

letch2010 (Fri, 17 Apr 2020 13:39:06 GMT):
There does exist an interface for this JsonTransactionSerializer. It seems feasible to replace it with your own serializer. To be frank, I find the HLF serializer lacking. They use org.json, which is a bunk library.

Taaanos (Fri, 17 Apr 2020 16:20:27 GMT):
Has joined the channel.

Taaanos (Fri, 17 Apr 2020 16:21:04 GMT):
Hi, can I use the `fabric-contract-api-go` to make queries to couchdb

Mms 11 (Fri, 17 Apr 2020 17:06:48 GMT):
Can anyone help with this dev-mode setup for fabric 2.0 ?

Mms 11 (Fri, 17 Apr 2020 17:06:49 GMT):
Other question, I'm trying to run my chain codes in dev mode, when starting the uberJar all looks nice, but it stops on this log entry: 08:30:53:896 INFO org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder Configuring channel connection to peer. 08:30:54:027 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Max Pool Size [TP_MAX_POOL_SIZE]5 08:30:54:029 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Queue Size [TP_CORE_POOL_SIZE]5000 08:30:54:031 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Core Pool Size [TP_QUEUE_SIZE]5 08:30:54:033 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager Keep Alive Time [TP_KEEP_ALIVE_MS]5000 08:30:54:035 INFO org.hyperledger.fabric.shim.impl.InvocationTaskExecutor Thread pool created 08:30:54:038 INFO org.hyperledger.fabric.shim.impl.ChaincodeSupportClient start making the grpc call 08:30:54:185 INFO org.hyperledger.fabric.shim.impl.InvocationTaskManager register Registering new chaincode name: "poc-services:0" I'm runnning Fabric 2.0 with a java chaincode. The dev network is copied from the sample repo. https://github.com/hyperledger/fabric-samples/tree/master/chaincode-docker-devmode

Mms 11 (Fri, 17 Apr 2020 17:10:42 GMT):
you should be able to run any query, just call query getQueryResultForQueryString from your shim object

Mms 11 (Fri, 17 Apr 2020 17:10:53 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#cdb-query

Mms 11 (Fri, 17 Apr 2020 17:12:34 GMT):
I managed to make a workaround by using the @JsonSerialization annotation with a custom serializer. Until that will work I'm fine :) Thx guys !

Taaanos (Fri, 17 Apr 2020 17:15:20 GMT):
that would look like TransactionContextInterface.GetStub().getQueryResult(query string)

Taaanos (Fri, 17 Apr 2020 17:15:28 GMT):
Ok this is what I was looking for

Taaanos (Fri, 17 Apr 2020 17:15:31 GMT):
thank you

Mms 11 (Fri, 17 Apr 2020 17:17:15 GMT):
You an test your queries no data that you have on the peer by going to : http://127.0.0.1:5984/_utils/#/_all_dbs change the port to the peers coach db you are interested.

Taaanos (Fri, 17 Apr 2020 17:21:27 GMT):
So the fauxton interface is also available

Taaanos (Fri, 17 Apr 2020 17:21:31 GMT):
good to know

Taaanos (Fri, 17 Apr 2020 17:21:33 GMT):
ty :)

mvanmeerbeck (Fri, 17 Apr 2020 18:03:46 GMT):
Hi, Is the chaincode-dev-mode deprecated ? I can't find it on the 2.x documentation anymore

Mms 11 (Fri, 17 Apr 2020 19:16:58 GMT):
That's what I'm trying to figure out also :)

Rachit-gaur (Fri, 17 Apr 2020 19:57:45 GMT):
Has joined the channel.

Rachit-gaur (Fri, 17 Apr 2020 19:57:46 GMT):
Hi, Anyone online? Need to ask a question about chaincode best practices

Rachit-gaur (Fri, 17 Apr 2020 19:58:15 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=Lk8jwjNxGA9MCe4yE

Rachit-gaur (Fri, 17 Apr 2020 19:58:37 GMT):
[object Object]

Rachit-gaur (Fri, 17 Apr 2020 19:59:03 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=TTJ428zEwATAnTF6S

Mms 11 (Fri, 17 Apr 2020 20:03:10 GMT):
https://medium.com/datadriveninvestor/hyperledger-fabric-best-practices-in-production-1-encrypting-state-database-with-chaincode-8369b0bc345a

Rachit-gaur (Fri, 17 Apr 2020 20:06:03 GMT):
@Mms 11 My question is that what is the best way to take inputs from the rest api? If i want to save an owner. for eg in array like [01,'abcd',24,'xyz@abcd.com'] or in a single index with json as string like ['{id:01,name:"abcd"}']

Rachit-gaur (Fri, 17 Apr 2020 20:06:03 GMT):
My question is that what is the best way to take inputs from the rest api? If i want to save an owner. for eg in array like [01,'abcd',24,'xyz@abcd.com'] or in a single index with json as string like ['{id:01,name:"abcd"}']

Mms 11 (Fri, 17 Apr 2020 20:10:03 GMT):
I think there is non, if you will see the Chaincode implementation -> ChaincodeBase handles the invoke call it handles arrays of Strings. So it depends on your case. It's the same way with traditional facade development, if you have more than 5 params you would traditionally package it into a dto anyways.

Rachit-gaur (Fri, 17 Apr 2020 20:11:42 GMT):
I do have 10 inputs. Shall i use nodejs api to receive the data from the UI and then parse it into array to send to blockchain? or as it is as an obj But how will i validate them?

Mms 11 (Fri, 17 Apr 2020 20:13:24 GMT):
I would pass these 10 inputs in a json object (json represented String) and serialize it to an object back in the chaincode and then do any validation you need to do.

Rachit-gaur (Fri, 17 Apr 2020 20:14:54 GMT):
Won't that increase the processing time?

Mms 11 (Fri, 17 Apr 2020 20:15:40 GMT):
no, it shouldn't

Rachit-gaur (Fri, 17 Apr 2020 20:16:07 GMT):
great. Thanks

Rachit-gaur (Fri, 17 Apr 2020 21:12:38 GMT):
also, to putstate do you guys generate a random id or feed it manually?

Rajatsharma (Fri, 17 Apr 2020 22:14:16 GMT):
I'm running a fabric 1.4.2 network. I created one channel using this profile ``` OneOrgChannel: Consortium: SampleConsortium Application: <<: *ApplicationDefaults Organizations: - *Org1 Capabilities: <<: *ApplicationCapabilities ``` I have a 2 org setup. To my astonishment peers of org2 could also join this channel. Could someone help me understand this.

Taffies (Mon, 20 Apr 2020 07:13:30 GMT):
Hi! I'm using the high level fabric-contract-api-go but I'm receiving this error every time I try to invoke a function other than "Init": `Error: endorsement failure during invoke. response: status:500 message:"Function newTransaction not found in contract SmartContract`. I'm pretty sure I followed the format of fabcar closely. Are you supposed to initialize the functions somewhere (like the Invoke function in the low-level one)? :confused:

Taffies (Mon, 20 Apr 2020 07:13:30 GMT):
Hi! I'm using the high level fabric-contract-api-go but I'm receiving this error every time I try to invoke a function other than "Init": `Error: endorsement failure during invoke. response: status:500 message:"Function newTransaction not found in contract SmartContract`. I'm pretty sure I followed the format of fabcar (https://github.com/hyperledger/fabric-samples/blob/master/chaincode/fabcar/go/fabcar.go) closely. Are you supposed to initialize the functions somewhere (like the Invoke function in the low-level one)? :confused:

Taffies (Mon, 20 Apr 2020 08:17:56 GMT):
Update: Seems like my functions need to start with a capital letter 😅

Taaanos (Mon, 20 Apr 2020 09:58:20 GMT):
Can I start the `chaincode-docker-devmode` with couchDB?

Rachit-gaur (Mon, 20 Apr 2020 18:11:15 GMT):
Hi guys, I have a use case similar to marbles but on huge level So, if i am transferring a number of marbles to another user, I would need to store all the ids inside the user struct for ex User{ Name:"user1", Marbles:["1","2","3"....] } Now I was wondering what would be the impact in terms of storage, I would need to save thousands of marbles in a single user

Rachit-gaur (Mon, 20 Apr 2020 18:11:24 GMT):
Is this the correct implementation

Taaanos (Mon, 20 Apr 2020 22:08:01 GMT):
If I get your question correctly, I think that each marble should have the owner as the user. You will need to update the marle.owner with your user. Now, if you want to create an index or a separate structure for that ok. This follows the concept that each marble is an asset and someone owes them.

ChrisSargent (Tue, 21 Apr 2020 17:10:46 GMT):
Has joined the channel.

ChrisSargent (Tue, 21 Apr 2020 17:31:12 GMT):
Hi Everyone, I am currently knee-deep in developing a simple order book on Fabric. I would like to use `GetQueryResult` because I would like to query the orderbook and sort results based on price, age etc. However, I note in the docs it says that queries are not re-executed on peers when validating. So, given the following sequence of transactions... 1. The query runs on the peer during the 'invoke' and it might identify an order which has 5 units for sale. 2. The cc on this peer runs and 'buys' 1 unit from this order. Effectively, the code is just subtracting 1 from the balance of the order. 3. At the same time, on another peer the same order with 5 units is identified by the query 4. The cc on that peer runs an 'buys' 4 units from this order. 5. At the same time, on another peer the same order with 5 units is identified by the query 6. The cc on that peer runs an 'buys' 1 unit from this order. Assuming there is no verification to see if the order balance goes below 0.... - Will the balance of the order would reduce to -1 (effectively a double spend)? And, assuming this is the case, if the subtract function in the the cc guard against the balance going below zero, with something like: ``` sellOrder.balance -= buyOrder.units if sellOrder.balance < 0 { return errors.New("Transaction failed, negative balance") } ``` - Will the double spend still happen? i.e. is the chaincode logic re-evaluated at validation time? Or, will only one of the transactions happen anyway because of the key versioning? Thanks!

ChrisSargent (Tue, 21 Apr 2020 17:31:12 GMT):
Hi Everyone, I am currently knee-deep in developing a simple order book on Fabric. I would like to use `GetQueryResult` because I would like to query the orderbook and sort results based on price, age etc. However, I note in the docs it says that queries are not re-executed on peers when validating. So, given the following sequence of transactions... 1. The query runs on the peer during the 'invoke' and it might identify an order which has 5 units for sale. 2. The cc on this peer runs and 'buys' 1 unit from this order. 3. At the same time, on another peer the same order with 5 units is identified by the query 4. The cc on that peer runs an 'buys' 4 units from this order. 5. At the same time, on another peer the same order with 5 units is identified by the query 6. The cc on that peer runs an 'buys' 1 unit from this order. Effectively, the code just subtracts an amount from the balance of the order. Assuming there is no verification to see if the order balance goes below 0.... - Will the balance of the order would reduce to -1 (effectively a double spend)? And, assuming this is the case, if the subtract function in the the cc guard against the balance going below zero, with something like: ``` sellOrder.balance -= buyOrder.units if sellOrder.balance < 0 { return errors.New("Transaction failed, negative balance") } ``` - Will the double spend still happen? i.e. is the chaincode logic re-evaluated at validation time? Or, will only one of the transactions happen anyway because of the key versioning? Thanks!

ChrisSargent (Tue, 21 Apr 2020 17:31:12 GMT):
Hi Everyone, I am currently knee-deep in developing a simple order book on Fabric. I would like to use `GetQueryResult` because I would like to query the orderbook and sort results based on price, age etc. However, I note in the docs it says that queries are not re-executed on peers when validating. So, given the following sequence of transactions... 1. The query runs on the peer during the 'invoke' and it might identify an order which has 5 units for sale. 2. The cc on this peer runs and 'buys' 1 unit from this order. 3. At the same time, on another peer the same order with 5 units is identified by the query 4. The cc on that peer runs an 'buys' 4 units from this order. 5. At the same time, on another peer the same order with 5 units is identified by the query 6. The cc on that peer runs an 'buys' 1 unit from this order. Effectively, the code just subtracts an amount from the balance of the order. Assuming there is no verification to see if the order balance goes below 0.... - Will the balance of the order would reduce to -1 (effectively a double spend)? And, assuming this is the case, if the subtract function in the the cc guarded against the balance going below zero, with something like: ``` sellOrder.balance -= buyOrder.units if sellOrder.balance < 0 { return errors.New("Transaction failed, negative balance") } ``` - Will the double spend still happen? i.e. is the chaincode logic re-evaluated at validation time? Or, will only one of the transactions happen anyway because of the key versioning? Thanks!

braduf (Tue, 21 Apr 2020 18:31:24 GMT):
Hi @ChrisSargent , to be safe you should use the GetStateByPartialCompositeKey. You can store all orderers in the book with the same objectType/docType and then use GetStateByPartialCompositeKey(objectType, []string {}) with that objectType and an empty array for the key parts. You can then sort the results returned and don't worry about phantom reads.

braduf (Tue, 21 Apr 2020 18:33:43 GMT):
Because you are not sure in which order the queries are done on the peer and in which order they are included in a block later... So even though you check the balance, you can get wrong results I think. I am also not 100% sure about this, I should think about it some longer. So if you can get someone else to confirm, that would be great.

ChrisSargent (Tue, 21 Apr 2020 18:35:23 GMT):
Hi @braduf , yes, this is how we're doing it right now, before we started to deal with price limits. To 'sort' the results, would we have to loop through the iterator, putting each result in to an array and then sort the array? yeah, I'm also not 100% sure on it - and quite difficult to test.

ChrisSargent (Tue, 21 Apr 2020 18:36:21 GMT):
I'm also thinking of creating an index of the orders, based on their pricing, then using GetStateByRange to find all orders above the current asking price for example.

braduf (Tue, 21 Apr 2020 18:37:36 GMT):
Yes, that could be another way, if price doesn't change, it can be part of the composite key and you can use GetStateByRange

ChrisSargent (Tue, 21 Apr 2020 18:38:10 GMT):
The prices of the orders don't change, no. They would have to be cancelled and recreated.

braduf (Tue, 21 Apr 2020 18:38:53 GMT):
Yes, then you could use the StateByRange

ChrisSargent (Tue, 21 Apr 2020 18:54:50 GMT):
yeah, been trying that. It's kind of strange because if you try to use a key made with `createCompositeKey` it doesn't work (gives the null key error) but if you just concatenate a string for the key it seems to work fine.

ChrisSargent (Tue, 21 Apr 2020 18:55:20 GMT):
(even though the keys were originally made with `createCompositeKey`)

Rachit-gaur (Tue, 21 Apr 2020 19:46:33 GMT):
My question is a little different, I am saving all the marble ids in User as array, if the array size increases to give space to 10000coins, will my chaincodes speed be affected?

Rachit-gaur (Tue, 21 Apr 2020 19:46:33 GMT):
My question is a little different, I am saving all the marble ids in User as array, if the array size increases to give space to 10000 marbles, will my chaincodes speed be affected?

braduf (Tue, 21 Apr 2020 21:12:34 GMT):
Can you explain better where you use the key exactly to know more specificly what's not working

braduf (Tue, 21 Apr 2020 21:12:34 GMT):
Can you explain better where you use the key exactly to know more specificly what's not working, please?

braduf (Tue, 21 Apr 2020 21:13:38 GMT):
in the StateByRange you mean?

ChrisSargent (Tue, 21 Apr 2020 22:43:15 GMT):
``` attrs := := []string{order.assetName, order.Price} key, _ := stub.CreateCompositeKey("index", attrs) keyAsString := "index" + order.assetName + order.Price y, err := stub.GetStateByRange(key, key) // Results in y being void, err being "first character of the key is [" z, err := stub.GetStateByRange(keyAsString, keyAsString) // Works correctly ``` Is this enough for you to follow what I mean?

ChrisSargent (Tue, 21 Apr 2020 22:43:15 GMT):
``` attrs := []string{order.assetName, order.Price} key, _ := stub.CreateCompositeKey("index", attrs) keyAsString := "index" + order.assetName + order.Price y, err := stub.GetStateByRange(key, key) // Results in y being void, err being "first character of the key is [" z, err := stub.GetStateByRange(keyAsString, keyAsString) // Works correctly ``` Is this enough for you to follow what I mean?

Taffies (Wed, 22 Apr 2020 05:28:16 GMT):
Hi, can a function in chaincode (golang) return 3 arguments? It seems to generate an error everytime I try to return 3 values, but it works perfectly well when I reduce the number of arguments to 2.

Taaanos (Wed, 22 Apr 2020 07:41:19 GMT):
Functions of contracts may only return zero, one or two values * If the function is defined to return zero values then a success response will be returned for all calls to that contract function * If the function is defined to return one value then that value may be any of the allowable types listed for parameters (except interface{}) or error. * If the function is defined to return two values then the first may be any of the allowable types listed for parameters (except interface{}) and the second must be error

Taaanos (Wed, 22 Apr 2020 07:42:31 GMT):
source: https://github.com/hyperledger/fabric-contract-api-go/blob/master/tutorials/getting-started.md#writing-contract-functions

MattB97 (Wed, 22 Apr 2020 11:54:01 GMT):
Has joined the channel.

ThomasRalee (Thu, 23 Apr 2020 07:25:28 GMT):
Has joined the channel.

ThomasRalee (Thu, 23 Apr 2020 07:25:30 GMT):
Hi i have a question, is levelDB functionalities good enough to support the general range of applications? or that there are some application design that requires couchDB. For example, a `fx trading platform`

Taaanos (Thu, 23 Apr 2020 07:27:43 GMT):
if you need complex queries then you need couchdb

ThomasRalee (Thu, 23 Apr 2020 07:32:38 GMT):
ok thank you, so in other words. its possible to use levelDB for general applications development?

Taaanos (Thu, 23 Apr 2020 08:01:41 GMT):
Yes, given that for each query you can use only the key to retrieve the current state of the asset. If you want to search by fields of this asset then you need couchdb. Depends on your use case really, but you can have something running initially with leveldb and decide from there if you need more than that.

Taaanos (Thu, 23 Apr 2020 08:02:31 GMT):
for a fx trading platform you will not be satisfied with searching only by a key.

ThomasRalee (Thu, 23 Apr 2020 08:29:30 GMT):
ok thank you @Taaanos

Taaanos (Thu, 23 Apr 2020 09:52:17 GMT):
Can I use chaincode-dev-mode with couchdb? Or the test network is the simplest way?

Taaanos (Thu, 23 Apr 2020 09:52:17 GMT):
Can I use chaincode-dev-mode with couchdb? Or the test network is the simplest way? Want to test a cc

adgupta011 (Thu, 23 Apr 2020 09:56:02 GMT):
Has joined the channel.

theblockstalk (Thu, 23 Apr 2020 13:26:31 GMT):
Has joined the channel.

Rachit-gaur (Thu, 23 Apr 2020 20:07:49 GMT):
Can someone help me? I am getting error sender undefined in this on line sender.Id=1 if sender_user==true{ var sender User }else{ var sender Company } sender.Id=1

lanzay (Fri, 24 Apr 2020 03:45:26 GMT):
Has joined the channel.

Taaanos (Fri, 24 Apr 2020 10:18:35 GMT):
yes, just a had a typo in the yaml

ChrisSargent (Fri, 24 Apr 2020 16:39:10 GMT):
I'm working on something with orders and orderbooks and I'm using key maps extensively. Could use queries but you can't rely on them during execution on peers because they are not re-executed. For any dashboard-like queries it seems its not recommended to use chaincode queries either, see: https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_as_state_database.html#good-practices-for-queries

SuneetBendre (Fri, 24 Apr 2020 17:19:59 GMT):
Has joined the channel.

andrii482 (Mon, 27 Apr 2020 12:33:19 GMT):
Has joined the channel.

Amalendu_Palakkatil (Tue, 28 Apr 2020 03:52:00 GMT):
Hi....I need help in the private data,Could anyone pls help me with this?

Taaanos (Tue, 28 Apr 2020 07:32:39 GMT):
what is your issue?

LabibFarag (Tue, 28 Apr 2020 10:27:24 GMT):

testchaincode.zip

LabibFarag (Tue, 28 Apr 2020 10:27:26 GMT):
I have problem while developing smart contract in type script , after create new class that extend Contract or annotating the class with @Object , the new classes and smart contract doesn't accessible after initiation of chain code ....... I tried to check what file metadata.json to check what is defined I can't see my new classes define in this file ... to generate this file I used the command ` fabric-chaincode-node metadata generate -f metadata.json` any idea why metadata.json doesn't contains new classes and smart contract ?

LabibFarag (Tue, 28 Apr 2020 10:28:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=oyXnv7xq9jFGDhSyK)
testchaincode.zip

awjh (Tue, 28 Apr 2020 10:52:02 GMT):
from what I can see you don't appear to have included your other contract`MyAssetContractTwo` in your `contracts` array located in index.ts

LabibFarag (Tue, 28 Apr 2020 11:18:21 GMT):
Thanks , I just checked that and now I can see that smart contract class is generated in Metadata.json file

LabibFarag (Tue, 28 Apr 2020 11:34:19 GMT):
@awjh can I pass array of Objects from client to smart contract ... when I tried to pass array of object I got below error `Error: can't resolve reference #/components/schemas/Array from id #`

LabibFarag (Tue, 28 Apr 2020 11:48:21 GMT):
I added annotation overt transaction and @Param('orderItems', 'OrderItem[]') and worked correctly

selvaraman (Tue, 28 Apr 2020 14:09:40 GMT):
How to do an end-to-end asymmetric encryption in hyperledger fabric. I just want to same thing like the following article/code 1. https://www.skcript.com/svr/end-to-end-encryption-hyperledger-fabric 2. https://github.com/hyperledger/fabric/blob/release-1.3/examples/chaincode/go/enccc_example/enccc_example.go#L7 How to do same thing using symmetric encryption (encrypt using public key and decrypt using private key) Like this one https://blogs.sap.com/2019/04/17/apply-asymmetric-encryption-in-chaincode/ can you please suggest article/reference code/blog/books?

pritam_01 (Tue, 28 Apr 2020 16:39:05 GMT):
can we send Transient data using shimtest ?

ThomasRalee (Wed, 29 Apr 2020 03:59:29 GMT):
@ChrisSargent key maps extensively => meaning you're using levelDB?

ChrisSargent (Wed, 29 Apr 2020 12:24:38 GMT):
no, I mean I use a kind of lookup table (just a ledger object) which holds the IDs of orders against a particular price. So when someone wants to buy, it's easy to find all the orders that are above or below that price, without searching or looping through the whole ledger. And avoids running a db query by price for example.

Taaanos (Wed, 29 Apr 2020 13:39:38 GMT):
what's the best practice to unmarshal a query result from couch db back a slice of objects?

Taaanos (Wed, 29 Apr 2020 13:39:38 GMT):
what's the best practice to unmarshal a query result from couchdb back to a slice of objects?

Taaanos (Wed, 29 Apr 2020 13:42:27 GMT):
my use case is: I have assets A and I want to find the sum of this A assets in order to create an asset of type B which will represent the aggregated assets (only the sum is enough)

Taaanos (Wed, 29 Apr 2020 13:44:27 GMT):
```json [{ "Key": "0001", "Record": { "docType": "assetA", "price": 2000, "ID": "0001" } }, { "Key": "0002", "Record": { "docType": "assetA", "price": 3000, "ID": "0002" } }] ```

Taaanos (Wed, 29 Apr 2020 13:44:40 GMT):
the result from couchdb

Taaanos (Wed, 29 Apr 2020 13:45:12 GMT):
couchDB result ^^

Taaanos (Wed, 29 Apr 2020 13:46:13 GMT):
and my struct

Taaanos (Wed, 29 Apr 2020 13:46:29 GMT):
```go type Asset struct { ObjectType string `json:"docType"` ID string `json:"id"` Price int `json:"price"` } ```

ThomasRalee (Wed, 29 Apr 2020 14:34:21 GMT):
this is really useful, do you have some codes? I could really need some example to reference to help understand this better

ascatox (Wed, 29 Apr 2020 14:35:52 GMT):
Hi All!I'm implementing a Java Chaincode and I'm using the ContractInterface but in version 2.0 of HLF, Fabric is looking for a main() function, useless using that interface. In version 1.4.5 of HLF my Java chaincode works. Someone can explain me this behaviour of 2.0.0 HLF version? Thanks.

ascatox (Wed, 29 Apr 2020 14:35:52 GMT):
Hi All!I'm implementing a Java Chaincode and I'm using the *ContractInterface* as in [Fabcar Java example](https://github.com/hyperledger/fabric-samples/blob/master/chaincode/fabcar/java/src/main/java/org/hyperledger/fabric/samples/fabcar/FabCar.java) but in version 2.0 of HLF, Fabric is looking for a main() function, useless using that interface. In version 1.4.5 of HLF my Java chaincode works. Someone can explain me this behaviour of 2.0.0 HLF version? Thanks.

ascatox (Wed, 29 Apr 2020 14:35:52 GMT):
Hi All!I'm implementing a Java Chaincode and I'm using the *ContractInterface* as in [Fabcar Java example](https://github.com/hyperledger/fabric-samples/blob/master/chaincode/fabcar/java/src/main/java/org/hyperledger/fabric/samples/fabcar/FabCar.java) but in version *2.0 of HLF*, Fabric is looking for a main() function, useless using that interface. In version *1.4.5 of HLF my Java chaincode works*. Someone can explain me this behaviour of 2.0.0 HLF version? Thanks.

ChrisSargent (Wed, 29 Apr 2020 14:39:37 GMT):

Screenshot 2020-04-29 at 16.39.10.png

ChrisSargent (Wed, 29 Apr 2020 14:41:11 GMT):
```go type OrderBookRow struct { OrderIDs []string RowTotal int } type OrderBook struct { FundID string Side OrderSide Rows map[string]OrderBookRow } ```

ChrisSargent (Wed, 29 Apr 2020 14:41:11 GMT):
```go type OrderBookRow struct { OrderIDs []string RowTotal int } type OrderBook struct { OrderbookID string Side string Rows map[string]OrderBookRow } ```

ThomasRalee (Wed, 29 Apr 2020 14:42:14 GMT):
this starts to make better sense, so you're querying OrderBookRow to retrieve the set of IDS then retrieving them from the OrderBook?

ChrisSargent (Wed, 29 Apr 2020 14:42:23 GMT):
Then the orderbook has some methods on for adding new orders and deleting orders - and if a row becomes 'empty' it is deleted.

ChrisSargent (Wed, 29 Apr 2020 14:42:38 GMT):
Exactly

ThomasRalee (Wed, 29 Apr 2020 14:43:01 GMT):
so when a new order is created, it creates/update 2 row of data? - OrderBookRow - OrderBook

ChrisSargent (Wed, 29 Apr 2020 14:43:14 GMT):
Also, because the ids are in a slice, they are maintained in the order they're appended - i.e. sorted by creation date.

ThomasRalee (Wed, 29 Apr 2020 14:43:46 GMT):
if you want to add additional filters, you just create a separate row?

ThomasRalee (Wed, 29 Apr 2020 14:45:23 GMT):
i have another question, this may sound really lame. But how do you create these unique orderBookID? Using conventional sql or mongodb, the ids are automatically created. But when i look at the examples on fabric docs. Apparently you have to create them individually.

ChrisSargent (Wed, 29 Apr 2020 14:46:43 GMT):
We use the `stub.GetTxID()` and then use a key like `OrderTxID` using `stub.CreateCompositeKey()`

ChrisSargent (Wed, 29 Apr 2020 14:47:30 GMT):
About additional filters - I'm not 100% sure. I would think that to filter on another field, you'd probably need another 'book'.

ChrisSargent (Wed, 29 Apr 2020 14:48:46 GMT):
In my case I had to be able to quickly add up the total parts for sale above or below a certain price, so you probably wouldn't need that 'column' if you didn't have that need.

ThomasRalee (Wed, 29 Apr 2020 14:49:52 GMT):
TIL

ThomasRalee (Wed, 29 Apr 2020 14:50:23 GMT):
This is really helpful @ChrisSargent, i am going to experiment around with what you just shared to have a better understanding on how to design the flow

ThomasRalee (Wed, 29 Apr 2020 14:50:28 GMT):
Thank you very much!

ChrisSargent (Wed, 29 Apr 2020 14:52:48 GMT):
No worries - just note that one problem is that whenever an order happens, the orderbook would need to be updated, which means if you're expecting many transactions per second from different peers, you'd likely get some failed transactions - because they're trying to update an item with the same key (the orderbook) at the same time, even if the transactions are not 'related'. Right now, I haven't thought of a way around that!

ThomasRalee (Wed, 29 Apr 2020 14:53:13 GMT):
That is a really good point

ThomasRalee (Wed, 29 Apr 2020 14:54:07 GMT):
what is your opinion on using a local database along side the ledger, from the hyperledger doc link you shared previously

ChrisSargent (Wed, 29 Apr 2020 14:54:39 GMT):
actually, you could possible keep each 'row' with its own key on the ledger - that would mean it would only clash if an order is happening at the same price.

ChrisSargent (Wed, 29 Apr 2020 14:55:47 GMT):
Re: DB - I think for doing write transactions, you'd run in to the same problems as running queries in CouchDB. But I'm not sure.

ThomasRalee (Wed, 29 Apr 2020 14:56:33 GMT):
need some hands on before coming onto conclusion

ChrisSargent (Wed, 29 Apr 2020 14:56:38 GMT):
right.

ThomasRalee (Wed, 29 Apr 2020 14:57:39 GMT):
are you using go, node-js or java for your smart contract?

ChrisSargent (Wed, 29 Apr 2020 14:57:48 GMT):
go.

ThomasRalee (Wed, 29 Apr 2020 14:58:19 GMT):
ermmm ok, do you think the language of the chaincode affects the performance of the transaction?

ChrisSargent (Wed, 29 Apr 2020 14:59:37 GMT):
I can't answer that, sorry. Other than that I don't think the performance of the system should be the main factor in choosing the language :-)

ThomasRalee (Wed, 29 Apr 2020 15:00:04 GMT):
good point! ok i will go and get my hands dirty with this new knowledge. I will be back!

sureshappana (Wed, 29 Apr 2020 19:37:10 GMT):
Has joined the channel.

sureshappana (Wed, 29 Apr 2020 19:37:12 GMT):
Hi, I am trying to run HLF in k8s cluster, I am at the instantiation step. Getting error Error: could not send: EOF, I see chaincode container started successfully (and also runs without quitting/restarting). But after few minutes peer is getting the above error message. I have attached peer logs above Running HLF 1.4.6 Using golang chaincode (chaincode_example02) from fabric-samples

sureshappana (Wed, 29 Apr 2020 19:37:18 GMT):

peer logs.txt

selvaraman (Thu, 30 Apr 2020 08:41:38 GMT):
From my understanding, server creates PKI and sends public key with some basic server details to certificate authority (CA). CA verifies server details and include those details and public key in the certificate and signs and issues certificate of the server. If this is true, while registering user we have to follow same thing. But I can not see creating PKI of a user in this code 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('Org1MSP', enrollment.certificate, enrollment.key.toBytes()); await wallet.import('user1', userIdentity); console.log('Successfully registered and enrolled admin user "user1" and imported it into the wallet'); Can you please explain what I misunderstood here.

Mms 11 (Thu, 30 Apr 2020 10:40:09 GMT):
How can we deploy the chaincode with indexes for a java chaincode ? I have my index.json file in resource (META-INF/statedb/couchdb/indexes) but when I ran the chaincode installer the index does not get installed. I'm using the shadowJar gradle plugin to package the project, is there something that I need to add when deploying the cc, like when we set collections ?

mahoney1 (Thu, 30 Apr 2020 12:22:37 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

mahoney1 (Thu, 30 Apr 2020 12:22:37 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

Mms 11 (Thu, 30 Apr 2020 13:09:30 GMT):
Can anybody help me with the indexes issue ? I cannot see any log entry like "Created Index" when checking peer logs, like the docs are stating: https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed My json file is named: pocServicesIdx.json and contains: ``` { "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" } ``` I tested this index syntax on Fauxton and it worked. Anybody ?

Mms 11 (Thu, 30 Apr 2020 13:09:30 GMT):
Can anybody help me with the indexes issue ? I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs, like the docs are stating: https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed My json file is named: pocServicesIdx.json and contains: ``` { "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" } ``` I tested this index syntax on Fauxton and it worked. Anybody ?

selvaraman (Thu, 30 Apr 2020 18:05:01 GMT):
Hi! can some one please answer to this question?

selvaraman (Thu, 30 Apr 2020 18:05:08 GMT):
https://discourse.skcript.com/t/node-sdk-for-public-key-encryption-decryption-and-signing/1615

vishnupradeepmahe (Thu, 30 Apr 2020 18:55:02 GMT):
Has joined the channel.

Mms 11 (Thu, 30 Apr 2020 19:51:00 GMT):
Anyone ? https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=9guiyHJZyv3EFHJ3E

Mms 11 (Fri, 01 May 2020 10:53:48 GMT):
Anyone can help with this index issue? Anyone was able to create custom index when building a java chaincode ?

Dangana (Mon, 04 May 2020 00:52:26 GMT):
Has joined the channel.

Taffies (Tue, 05 May 2020 10:33:14 GMT):
Hello, has anyone encountered this error before? `Error create supporting document chaincode: Cannot use metadata. Metadata did not match schema:` `1. components.schemas..required: Array must have at least 1 items` I'm using golang/couchdb.

ashlinSajan (Tue, 05 May 2020 11:33:27 GMT):
Hello has anyone faced this issue?

ashlinSajan (Tue, 05 May 2020 11:33:29 GMT):
invoke chaincode proposal resulted in an error :: Error: Failed to get marble: GET_STATE failed: transaction ID: ae51f65b3ad434e2c48c2574d2db292437439c6a932dc9389eda091244a3fcd5: private data matching public hash version is not available. Public hash version = {BlockNum: 4, TxNum: 0}, Private data version =

icarrascol (Tue, 05 May 2020 18:16:43 GMT):
does the new contract api work with node sdk v1.4?

Mms 11 (Tue, 05 May 2020 20:16:38 GMT):
Anyone got a problem, when calling the CouchDB from a java chaincode for a large data collection, that the result would be process long ? I can see that the ChaincodeInvocationTask.invoke got the response rather quick but when it is passed as a response that is taking a long time to process. This class is created from the response, `QueryResultsIteratorImpl` in the InvocationStubImpl. Anyone had this when calling `InvocationStubImplgetQueryResult`

tommyjay (Fri, 08 May 2020 16:17:40 GMT):
hey there, why's it important to mount my `/var/run/docker.sock` into the peer container?

pritam_01 (Sat, 09 May 2020 06:56:57 GMT):
because peer container has to start the chaincode container by its own for that peer container need to give command to the host docker demon to start the chaincode container. by mounting the docker.sock , peer container is able to give command to the host docker demon.

pritam_01 (Sat, 09 May 2020 07:02:12 GMT):
you need to place your index in this folder structure META-INF/statedb/couchdb/indexes/.json

pritam_01 (Sat, 09 May 2020 07:02:12 GMT):
currently there is no feature of such kind , but if you real want to use this try Homomorphic Encryption in you chaincode (I haven't tried it yet) https://en.wikipedia.org/wiki/Homomorphic_encryption

pritam_01 (Sat, 09 May 2020 07:09:01 GMT):
currently there is no such feature but if you want to have this , you can try Homomorphic encryption in chaincode(I haven't tried it yet! ) https://en.wikipedia.org/wiki/Homomorphic_encryption

pritam_01 (Sat, 09 May 2020 07:10:29 GMT):
you need to place you index in this folder structure META-INF/statedb/couchdb/indexes/.json

AbdullahJoyia (Sat, 09 May 2020 10:22:08 GMT):
Hello everyone. I am facing issue in setting gopath. I have installed hyperledger fabric 2.0. What can i do to change the path in Vim ~/.bashrc using terminal. Can anybody help me in that.

ChrisSargent (Sun, 10 May 2020 09:06:04 GMT):
I was thinking about this some more and using query results in transactions. As far as I can tell and referencing this link: https://hyperledger-fabric.readthedocs.io/en/release-2.0/readwrite.html, the reason is because the query doesn't add anything to the read-set in a transaction. So, something like this could result in phantom reads (because there is no read set) - GetQueryResult - Loop QueryResult.Items - Do something to QueryResult.Item - Put QueryResult Item But something like this, should be okay because we explicitly create a read set for the items we're interested in from the query - GetQueryResult - Loop QueryResult.Items - GetStateByKey(QueryResult.Item.ID) - Do something to QueryResult.Item - Put QueryResult.Item Does anyone have any thoughts on this or can shed some light on whether this would work?

c0deh0use (Mon, 11 May 2020 10:24:52 GMT):
Has joined the channel.

tommyjay (Mon, 11 May 2020 13:05:07 GMT):
is this a security risk? i explained here: https://chat.hyperledger.org/channel/fabric-peer-endorser-committer?msg=mF3Rs5N4iaebYzRbv

mahoney1 (Thu, 14 May 2020 08:30:54 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

nkalichynskyi (Thu, 14 May 2020 11:55:23 GMT):
Has joined the channel.

nkalichynskyi (Thu, 14 May 2020 11:59:16 GMT):
Hi everyone. Is there any information on chaincode server for node.js chaincodes? I've found jira ticket https://jira.hyperledger.org/browse/FABCJ-215 but there is no activity there. Does anyone know if this is being implemented or at least planned?

nkalichynskyi (Thu, 14 May 2020 11:59:16 GMT):
Hi everyone. Is there any information on chaincode server functionality for node.js chaincodes? I've found jira ticket https://jira.hyperledger.org/browse/FABCJ-215 but there is no activity there. Does anyone know if this is being implemented or at least planned?

LabibFarag (Thu, 14 May 2020 12:36:17 GMT):
what is the max number of indexes can be used in couchDB without affecting performance ... according to https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#cdb-best `Adding too many indexes, or using an excessive number of fields in an index, will degrade the performance`

mahoney1 (Thu, 14 May 2020 15:33:26 GMT):
hi folks, from today's Fabric Application Developer community call, I'm sharing a proposed design for a Fabric docs website (an example of how it might look, offering different persona perspectives) The site is: https://warm-reaches-04614.herokuapp.com/ - we would really appreciate it if you would have a quick browse, try it out, tell us what you think in a short survey! much appreciated, Paul (Community lead)

mahoney1 (Thu, 14 May 2020 15:33:26 GMT):
hi folks, from today's Fabric Application Developer community call, I'm sharing a proposed design for a Fabric docs website (an example of how it might look, offering different persona perspectives) The site is: https://warm-reaches-04614.herokuapp.com/ - we would really appreciate it if you would have a quick browse, try it out, tell us what you think in a short survey here https://www.surveymonkey.co.uk/r/RRJ9P2C ! much appreciated, Paul (Community lead)

mahoney1 (Thu, 14 May 2020 15:33:26 GMT):
hi folks, from today's Fabric Application Developer community call, I'm sharing a proposed design for the Fabric docs website (an example of how it might look, offering different persona perspectives) The site is: https://warm-reaches-04614.herokuapp.com/ - we would really appreciate it if you would have a quick browse, try it out, tell us what you think in a short survey here https://www.surveymonkey.co.uk/r/RRJ9P2C ! much appreciated, Paul (Community lead)

knowledgebroker (Fri, 15 May 2020 02:14:36 GMT):
Has joined the channel.

c0deh0use (Fri, 15 May 2020 12:25:21 GMT):
Hi there, could I please ask someone for help with my performance problem inside chaincode (java chaincode) I have created and almost copy-pasted the existing FabCar java chain code, I only changed it to fit my logic. I'm not able to go to times of execution of the getQueryResult that is for a FabCar. The data are of similar volume: 125- 126 records. Bellow you have my repo with two chaincodes and client apps to test the two: https://github.com/Marek00Malik/fabric-samples/tree/chaincode-performance-test Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app. You will start the network and deploy both chaincodes by running ./startFabric.sh fabcar from the poc-services folder (the client app) The results are 3.5 seconds for the FabCar and around 31 seconds for my chaincode. Can someone review and help me with this one ?

mvanmeerbeck (Tue, 19 May 2020 16:26:17 GMT):
Hello guys! I know it's possible to use multiple contracts in one chaincode. But is it possible to specify a contract with the peer cli (peer chaincode query) ? The closest option is -n to specify the name of the chaincode. My 2 contracts are contained in the chaincode but the peer always send the command to the first contract

mvanmeerbeck (Tue, 19 May 2020 16:29:05 GMT):
In the Java SDK, it's possible to specify the chaincode and the contract: ```network.getContract(chaincodeId, contractName)```

mvanmeerbeck (Tue, 19 May 2020 16:29:52 GMT):
(i should add i'm on hyperledger 2.0)

sureshappana (Tue, 19 May 2020 17:01:44 GMT):
Hi, I am trying to setup HLF in K8s, when I run instantiation command, its starting the chaincode container successfully. But the instantiation step is exiting with EOF. When I perform any query execution I am getting the following error: ``` Error: endorsement failure during query. response: status:500 message:"make sure the chaincode test_cc has been successfully instantiated and try again: chaincode test_cc not found" ```

sureshappana (Tue, 19 May 2020 17:05:18 GMT):

query_logs.txt

sureshappana (Tue, 19 May 2020 17:05:20 GMT):

instantiation_logs.txt

c0deh0use (Tue, 19 May 2020 17:07:04 GMT):
What do you mean by Contract ? The ContractInterface implementation (I guess you are running a java chaincode, right) ? If yes, the as far as I know you should have only one Contract implementation per container that you ran. Either merge the two Contract implementations together or make separate jar files that will be deployed separately, these will need to have chaincode names\chaincodeId that differ.

icarrascol (Tue, 19 May 2020 21:41:30 GMT):
i know this isnt java but it is related as chaincode in js on version 2.1 allows to have multiple smart contracts in one chaincode package, and they can be accessed using the sdk, but the problem is that it isnt explained how to access them from the cli :S

c0deh0use (Wed, 20 May 2020 07:21:00 GMT):
so if you have one package that gets deployed you need to name it when installing on the peer. That name is used in the invoke command: https://hyperledger-fabric.readthedocs.io/en/release-2.1/commands/peerchaincode.html#peer-chaincode-invoke ``` peer chaincode instantiate -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C ${CHANNEL_NAME} -n ${CHAINCODE_NAME} $PEER_CONN_PARMS -c '{"Args":["chaincode-method-name", "arg1", "arg2", "..." ]}' ```

davidkel (Wed, 20 May 2020 07:45:49 GMT):
The first question I would ask is what goal are you trying to achieve having 2 contracts in a single chaincode as opposed to having contracts in their own individual chaincode package. For example contracts in the same chaincode have direct access to each other's data whereas if you deploy them in separate chaincodes then they don't but are still stored on the same ledger

davidkel (Wed, 20 May 2020 07:45:49 GMT):
The first question I would ask is what goal are you trying to achieve having 2 contracts in a single chaincode as opposed to having contracts in their own individual chaincode package. For example contracts in the same chaincode have direct access to each other's data whereas if you deploy them in separate chaincodes then they don't but are still stored on the same ledger, providing a level of isolation and therefore protection

davidkel (Wed, 20 May 2020 07:51:18 GMT):
If you still want to have 2 contracts in the same chaincode then the first contract you declare is the default contract and you don't have to qualify the method names with the contract namespace, the second contract requires that you invoke it's methods by prefixing it with that contract's namespace. An example can be seen here https://github.com/hyperledger/fabric-chaincode-node/blob/eb579589906fe8f05e3a6302fcc900a5a590ece9/test/e2e/scenario.js#L40 where the test is invoking a contract built in contract whose namespace is `org.hyperledger.fabric` and the method name is `GetMetadata`. I would suggest raising a Jira on https://jira.hyperledger.org if you couldn't find any documentation about it

randyshu (Wed, 20 May 2020 09:07:02 GMT):
Has joined the channel.

randyshu (Wed, 20 May 2020 09:13:06 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 09:13:26 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`

mvanmeerbeck (Wed, 20 May 2020 09:40:39 GMT):
I'm running a go chaincode with 2 contracts (ContractInterface indeed). But i want them in the same chaincode which is possible in the SDK js and Java as icarrascol said.

davidkel (Wed, 20 May 2020 09:42:37 GMT):
The fabric-contract-api-go contract api is available for fabric 2.0 and later and should support multiple contracts in the same chaincode

davidkel (Wed, 20 May 2020 09:42:37 GMT):
The fabric-contract-api-go contract api is available for fabric 2.0 and later and should support multiple contracts in the same chaincode, but I am not an expert on this, I've never delved much into the go version of the contract api

mvanmeerbeck (Wed, 20 May 2020 09:49:38 GMT):
Thank you all! @davidkel you nailed it, you have to prefix the method name with the name of the contract. With the peer cli: ```peer chaincode query -c {"Args":["name.of.the.contract:Method"]} (...)```

mvanmeerbeck (Wed, 20 May 2020 09:53:39 GMT):
fabric-contract-api-go does support multiple contracts, i'm using it but i only had trouble with the peer cli

mvanmeerbeck (Wed, 20 May 2020 09:54:13 GMT):
``` chaincode, err := contractapi.NewChaincode(contracts...)```

randyshu (Wed, 20 May 2020 09:58:58 GMT):
I'm confused with this api ` invokeChaincode(chaincodeName: string, args: string[], channel: string): Promise; ` any sample for using it?

randyshu (Wed, 20 May 2020 09:59:21 GMT):
I'm confused with this api `invokeChaincode(chaincodeName: string, args: string[], channel: string): Promise; ` any sample for using it?

SpecialAgentCooper (Wed, 20 May 2020 10:22:59 GMT):
Has joined the channel.

SpecialAgentCooper (Wed, 20 May 2020 10:23:52 GMT):
Hi everyone, I have a workflow that I'm attempting to implement as chaincode using the node sdk. 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?

LabibFarag (Wed, 20 May 2020 19:21:45 GMT):
hello I'm facing the same issue reported here https://lists.hyperledger.org/g/fabric/message/7645 any one can advise how to solve this ?

icarrascol (Wed, 20 May 2020 22:10:27 GMT):
yes thank u both, and you were right there isnt any documentation about this topic ... and about having a chaincode with multiple contracts i dont know if it is not recommended but what would you do with a chaincode that gets really big as in lines of code?, i think multiple contracts allow me to split the chaincode in assets that are related and need to communicate

randyshu (Thu, 21 May 2020 07:02:15 GMT):
Does fabric-contract-api support calling invokeChaincode ?

randyshu (Thu, 21 May 2020 07:04:05 GMT):

Clipboard - May 21, 2020 3:03 PM

randyshu (Thu, 21 May 2020 07:05:25 GMT):
I call it as above and get an error: `INVOKE_CHAINCODE failed: transaction ID: 6d68b71125dcd21e669606d17e80210c804c3a3228b279a4cc48dd06c116e3d3: execute failed: error sending: txid: 6d68b71125dcd21e669606d17e80210c804c3a3228b279a4cc48dd06c116e3d3(ch1) exists`

randyshu (Thu, 21 May 2020 11:11:14 GMT):
Hi, experts : Can sub-contracts call each other?

deepakwipro (Fri, 22 May 2020 09:14:16 GMT):
Has joined the channel.

deepakwipro (Fri, 22 May 2020 09:14:17 GMT):
I am new to fabric. I was trying to upgrade my network from 1.4 to 2.0 but when i am upgrading it, peer and orderer container upgraded to 2.0 but chaincode containers stopped. What we have to change in our chaincode before doing this? Please explain in detail. Please also mention the respective commands and steps to do it.

deepakwipro (Fri, 22 May 2020 09:25:43 GMT):
when i am executing this command for Submitting the config update transaction ``` peer channel update -f config_update_in_envelope.pb -c $CH_NAME -o $ORDERER_CONTAINER --tls true --cafile $TLS_ROOT_CA ``` then i am getting this error ``` Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: error validating DeltaSet: policy for [Value] /Channel/Orderer/Capabilities not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied ```

AaronWilmoth (Sat, 23 May 2020 17:05:06 GMT):
Has joined the channel.

pankajcheema (Sun, 24 May 2020 09:15:39 GMT):
Hi all , in fabric 2.0 we are not having shin foleder inside the hyperledger directory in go path

pankajcheema (Sun, 24 May 2020 09:15:39 GMT):
Hi all , in fabric 2.0 we are not having shim folder inside the hyperledger directory in go path

pankajcheema (Sun, 24 May 2020 09:15:48 GMT):
What is the alternate for that

pankajcheema (Sun, 24 May 2020 09:17:17 GMT):
So the process of building a sample chaincode throwing error package shim not found

SuneetBendre (Sun, 24 May 2020 09:18:47 GMT):
Wht error ur getting? Why chaincode language ?

pankajcheema (Sun, 24 May 2020 09:19:38 GMT):
I am getting package shim not found

pankajcheema (Sun, 24 May 2020 09:20:17 GMT):
I am getting package shim not found

SuneetBendre (Sun, 24 May 2020 09:20:47 GMT):
Language ? And how are you adding dependency?

pankajcheema (Sun, 24 May 2020 09:21:08 GMT):
Am no writing any big chaincode just added the import statement to hello word sample

pankajcheema (Sun, 24 May 2020 09:21:08 GMT):
Am not writing any big chaincode just added the import statement to hello word sample

pankajcheema (Sun, 24 May 2020 09:21:25 GMT):
And tried to build the same file

pankajcheema (Sun, 24 May 2020 09:21:40 GMT):
Golang

SuneetBendre (Sun, 24 May 2020 09:22:52 GMT):
Have you build the contract before deploying ? Dependency shld get download before shiping

SuneetBendre (Sun, 24 May 2020 09:32:38 GMT):
Hello All, Any good design for config file for contract? Without deploying contract ? Similar to config server of spring.

SuneetBendre (Sun, 24 May 2020 09:32:38 GMT):
Hello All, Any good design for config file for contract? Without redeploying contract ? Similar to config server of spring.

pankajcheema (Sun, 24 May 2020 09:36:06 GMT):
I am trying to run before deployed

pankajcheema (Sun, 24 May 2020 09:36:20 GMT):
Means just trying to build

Matrixik (Mon, 25 May 2020 08:26:13 GMT):
Has joined the channel.

BrajeshA (Tue, 26 May 2020 06:12:49 GMT):
Has joined the channel.

cryptopatrick (Tue, 26 May 2020 19:54:09 GMT):
Has joined the channel.

y0zg (Wed, 27 May 2020 15:14:01 GMT):
Has joined the channel.

y0zg (Wed, 27 May 2020 15:15:48 GMT):
hi everyone! Do you have an idea how to solve this dependency erro? ``` git clone https://github.com/hyperledger/fabric-sdk-go.git dep init -v ... ... (524) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (523) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (522) ← backtrack: no more versions of github.com/golangci/golangci-lint to try (97) ? continue github.com/golangci/golangci-lint with 25 pkgs; 1 more versions to try (522) try github.com/golangci/golangci-lint@test-reporting (522) ✗ package github.com/golangci/golangci-lint/internal/cache does not exist within project github.com/golangci/golangci-lint panic: runtime error: index out of range goroutine 1 [running]: github.com/golang/dep/gps.(*solver).findValidVersion(0xc00030c000, 0xc00201a460, 0xc000b3f860, 0x19, 0x19, 0x0, 0xc000b3f860) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:945 +0x4cc github.com/golang/dep/gps.(*solver).backtrack(0xc00030c000, 0xadbdc0, 0xc000028160, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:1079 +0xbdc github.com/golang/dep/gps.(*solver).solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0x5, 0xc0001f0158, 0xc0000dd698) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:510 +0x872 github.com/golang/dep/gps.(*solver).Solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0xc00019e5d0, 0xc000026077, 0xd, 0xc00050fa70) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:440 +0x1eb main.(*initCommand).Run(0xc00014b772, 0xc0000c6880, 0xc00016a680, 0x0, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/init.go:155 +0x5ad main.(*Config).Run(0xc000078f00, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:212 +0x111c main.main() /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:84 +0x636 ```

y0zg (Wed, 27 May 2020 15:15:48 GMT):
hi everyone! Do you have an idea how to solve this dependency error? ``` git clone https://github.com/hyperledger/fabric-sdk-go.git dep init -v ... ... (524) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (523) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (522) ← backtrack: no more versions of github.com/golangci/golangci-lint to try (97) ? continue github.com/golangci/golangci-lint with 25 pkgs; 1 more versions to try (522) try github.com/golangci/golangci-lint@test-reporting (522) ✗ package github.com/golangci/golangci-lint/internal/cache does not exist within project github.com/golangci/golangci-lint panic: runtime error: index out of range goroutine 1 [running]: github.com/golang/dep/gps.(*solver).findValidVersion(0xc00030c000, 0xc00201a460, 0xc000b3f860, 0x19, 0x19, 0x0, 0xc000b3f860) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:945 +0x4cc github.com/golang/dep/gps.(*solver).backtrack(0xc00030c000, 0xadbdc0, 0xc000028160, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:1079 +0xbdc github.com/golang/dep/gps.(*solver).solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0x5, 0xc0001f0158, 0xc0000dd698) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:510 +0x872 github.com/golang/dep/gps.(*solver).Solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0xc00019e5d0, 0xc000026077, 0xd, 0xc00050fa70) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:440 +0x1eb main.(*initCommand).Run(0xc00014b772, 0xc0000c6880, 0xc00016a680, 0x0, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/init.go:155 +0x5ad main.(*Config).Run(0xc000078f00, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:212 +0x111c main.main() /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:84 +0x636 ```

y0zg (Wed, 27 May 2020 15:15:48 GMT):
hi everyone! Do you have an idea how to solve this dependency error? ``` git clone https://github.com/hyperledger/fabric-sdk-go.git cd fabric-sdk-go dep init -v ... ... (524) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (523) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (522) ← backtrack: no more versions of github.com/golangci/golangci-lint to try (97) ? continue github.com/golangci/golangci-lint with 25 pkgs; 1 more versions to try (522) try github.com/golangci/golangci-lint@test-reporting (522) ✗ package github.com/golangci/golangci-lint/internal/cache does not exist within project github.com/golangci/golangci-lint panic: runtime error: index out of range goroutine 1 [running]: github.com/golang/dep/gps.(*solver).findValidVersion(0xc00030c000, 0xc00201a460, 0xc000b3f860, 0x19, 0x19, 0x0, 0xc000b3f860) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:945 +0x4cc github.com/golang/dep/gps.(*solver).backtrack(0xc00030c000, 0xadbdc0, 0xc000028160, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:1079 +0xbdc github.com/golang/dep/gps.(*solver).solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0x5, 0xc0001f0158, 0xc0000dd698) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:510 +0x872 github.com/golang/dep/gps.(*solver).Solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0xc00019e5d0, 0xc000026077, 0xd, 0xc00050fa70) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:440 +0x1eb main.(*initCommand).Run(0xc00014b772, 0xc0000c6880, 0xc00016a680, 0x0, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/init.go:155 +0x5ad main.(*Config).Run(0xc000078f00, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:212 +0x111c main.main() /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:84 +0x636 ```

davidkel (Wed, 27 May 2020 16:58:42 GMT):
you might want to ask on the dedicated go sdk channel #fabric-sdk-go

AbdullahJoyia (Wed, 27 May 2020 19:07:24 GMT):
Has left the channel.

kapilAtrey (Thu, 28 May 2020 12:53:28 GMT):
Hi i was trying perform cross chaincode invokation, i installed two chaincodes on fresh balance tranfder example and using docker images 1.4.3 for peer and orderer and using fabric SDK version 1.4.0 `func invokeOther(stub shim.ChaincodeStubInterface, args []string) pb.Response { str := []string{"invoke", "createconsolidated", "key", "indexRefKey"} chainCodeArgs := getArgsForCrossChaincode(str) response := stub.InvokeChaincode("chaincode2", chainCodeArgs, "channelName") if response.Status != shim.OK { return shim.Error(response.Message) } return shim.Success(nil) } `

mahoney1 (Thu, 28 May 2020 14:01:55 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

toddinpal (Thu, 28 May 2020 18:53:21 GMT):
Does anyone have examples of using the QSCC from chaincode? I want to be able to get the details of a key's history using the getHistoryForKey, but from within chaincode.

SuneetBendre (Thu, 28 May 2020 18:55:16 GMT):
You can call api from Shim lib. Can you elaborate how are you doing now ?

toddinpal (Thu, 28 May 2020 19:03:44 GMT):
That will get me an iterator over KeyModifications, but those only contain the txId. I want to get the details of those transactions.

maiconramones (Sun, 31 May 2020 19:29:19 GMT):
Has joined the channel.

maiconramones (Sun, 31 May 2020 19:29:21 GMT):
Hello, guys. I want to send events from commit transaction listener to some message brokers like rabbitmq or apache kafka, my intention is notify others systems to do some action. I found something similar using compose in hyperledger 1.X but how can I achive this using HF 2?

aguel (Mon, 01 Jun 2020 12:01:36 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 {}```

SpecialAgentCooper (Mon, 01 Jun 2020 14:13:38 GMT):
Came here to ask this exact question. Something like this https://github.com/wearetheledger/fabric-mock-stub but for 2.1 would be great

mbwhite (Mon, 01 Jun 2020 14:43:59 GMT):
yes - know what you mean; wondering if we have something with in the unit tests of the repo itself.

mbwhite (Mon, 01 Jun 2020 14:44:32 GMT):
FYI - the Wasm Smart Contract RFC is now available - this is the successor to the ledger api. RFC.. Feedback welcome

aguel (Tue, 02 Jun 2020 01:17:49 GMT):
i agree, i think it might be a good idea to add a sample in the official fabric-node-sdk repo

c0deh0use (Tue, 02 Jun 2020 09:21:22 GMT):
I'm testing performance on a Java Chaincode, I noticed long lasting calls for string new data. What would be the prefered steps to analys where I could be able to fix this?

c0deh0use (Tue, 02 Jun 2020 09:21:51 GMT):
The DB is storing data in about 1.1 seconds. the entire request takes about 40-50 seconds.

toddinpal (Tue, 02 Jun 2020 13:23:57 GMT):
Anyone have an example of retrieving a transactions details such as endorsements, submitter, etc., from chaincode?

toddinpal (Tue, 02 Jun 2020 13:23:57 GMT):
Anyone have an example of retrieving historical transaction details such as endorsements, submitter, etc., from chaincode?

tommyjay (Thu, 04 Jun 2020 17:52:30 GMT):
how fast is chanincode instantiation through the peer cli/binary?

tommyjay (Thu, 04 Jun 2020 17:52:30 GMT):
how fast is chaincode instantiation through the peer cli/binary?

toddinpal (Thu, 04 Jun 2020 20:01:27 GMT):
Slow! It creates a new Docker image which requires pulling all the required packages, building the chaincode, building the image, starting the image...

GmoneyCoder (Thu, 04 Jun 2020 22:37:57 GMT):
Has joined the channel.

SpecialAgentCooper (Fri, 05 Jun 2020 15:41:45 GMT):
Enabling history on the state database feels like cheating from an audit perspective - anyone got any implementation tips for chaincode that queries the history of assets on the blockchain directly?

toddinpal (Fri, 05 Jun 2020 19:24:55 GMT):
What do you mean enabling history on the state database?

SpecialAgentCooper (Mon, 08 Jun 2020 10:59:44 GMT):

getHistoryForKey chaincode stub docs

SpecialAgentCooper (Mon, 08 Jun 2020 11:02:10 GMT):
Whenever you run a chaincode query, it hits the state database and not the blockchain. This means that to look at an assets history, you need to have recorded that history in the database. This is a more efficient query, but to an auditor I can't see how it's any better than just having an encrypted database - I'd like to directly verify that this history matches the one on the actual blockchain. Does anyone know of a way to directly query the blocks?

toddinpal (Mon, 08 Jun 2020 15:14:36 GMT):
The various SDKs provide APIs to query the actual ledger, i.e., get a block or tx.

SpecialAgentCooper (Mon, 08 Jun 2020 15:18:03 GMT):
If you can point me to the part of the node sdk that does that for v2.1 I'll be very surprised. It was there in 1.4 but unfortunately I'm using 2.1 and those methods aren't there. I'm currently investigating the use of query system chaincode from within the node sdk.

SpecialAgentCooper (Mon, 08 Jun 2020 15:18:03 GMT):
If you can point me to the part of the node sdk that does that for v2.1 I'll be very grateful but very surprised. It was there in 1.4 but unfortunately I'm using 2.1 and those methods aren't there. I'm currently investigating the use of query system chaincode from within the node sdk.

toddinpal (Mon, 08 Jun 2020 15:39:52 GMT):
Have you looked at this article? https://www.systutorials.com/how-to-query-transaction-by-id-in-hyperledger-fabric-2-0/

SpecialAgentCooper (Mon, 08 Jun 2020 15:42:24 GMT):
That's great, thanks. I've had a few helpful responses today, this chatroom has been immensely helpful. I think I'll try running QSCC functions from the Node SDK and see how that goes.

garyclark (Tue, 09 Jun 2020 15:03:49 GMT):
Has joined the channel.

garyclark (Tue, 09 Jun 2020 15:03:49 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

garyclark (Tue, 09 Jun 2020 15:03:49 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 and collect the partial matched records.

garyclark (Tue, 09 Jun 2020 16:15:37 GMT):
Ok did some research yes I there are apis do what I want.

garyclark (Tue, 09 Jun 2020 17:38:14 GMT):
cts.stub.CreateCompositeKey and GetStateByPartialCompositeKey

z3100 (Wed, 10 Jun 2020 04:53:48 GMT):
Has joined the channel.

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Has joined the channel.

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Hello team! When trying deploy chaincode on test network like described in documentation here: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html#starting-a-chaincode-on-the-channel By run the command "./network.sh deployCC" in dir "test-network" see next error. If anyone face with this error before and/or know how it can be resolved - will be very thankful for him ./network.sh deployCC -l java deploying chaincode on channel 'mychannel' Compiling Java code ... /opt/hyperledger_fabric/fabric-samples/chaincode/fabcar/java /opt/hyperledger_fabric/fabric-samples/test-network ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. /opt/hyperledger_fabric/fabric-samples/test-network Finished compiling Java code Using organization 1 ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/java/build/install/fabcar --lang java --label fabcar_1 ++ res=1 ++ set +x 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] func1 -> ERRO 001 Visit ../chaincode/fabcar/java/build/install/fabcar failed: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory 2020-06-10 05:46:08.267 UTC [chaincode.platform.java] GetDeploymentPayload -> ERRO 003 Error writing java project to tar package lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory Error: error getting chaincode bytes: failed to create chaincode package: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ERROR !!! Deploying chaincode failed

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Hello team! When trying deploy chaincode on test network like described in documentation here: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html#starting-a-chaincode-on-the-channel By run the command "./network.sh deployCC" in dir "test-network" see next error. If anyone face with this error before and/or know how it can be resolved - will be very thankful for him ./network.sh deployCC -l java deploying chaincode on channel 'mychannel' Compiling Java code ... /opt/hyperledger_fabric/fabric-samples/chaincode/fabcar/java /opt/hyperledger_fabric/fabric-samples/test-network ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. /opt/hyperledger_fabric/fabric-samples/test-network Finished compiling Java code Using organization 1 ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/java/build/install/fabcar --lang java --label fabcar_1 ++ res=1 ++ set +x 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] func1 -> ERRO 001 Visit ../chaincode/fabcar/java/build/install/fabcar failed: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE IS ERROR 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory 2020-06-10 05:46:08.267 UTC [chaincode.platform.java] GetDeploymentPayload -> ERRO 003 Error writing java project to tar package lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory Error: error getting chaincode bytes: failed to create chaincode package: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ERROR !!! Deploying chaincode failed

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Hello team! When trying deploy chaincode on test network like described in documentation here: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html#starting-a-chaincode-on-the-channel By run the command "./network.sh deployCC" in dir "test-network" see next error. If anyone face with this error before and/or know how it can be resolved - will be very thankful for him ``` ./network.sh deployCC -l java deploying chaincode on channel 'mychannel' Compiling Java code ... /opt/hyperledger_fabric/fabric-samples/chaincode/fabcar/java /opt/hyperledger_fabric/fabric-samples/test-network ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. /opt/hyperledger_fabric/fabric-samples/test-network Finished compiling Java code Using organization 1 ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/java/build/install/fabcar --lang java --label fabcar_1 ++ res=1 ++ set +x 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] func1 -> ERRO 001 Visit ../chaincode/fabcar/java/build/install/fabcar failed: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE IS ERROR 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory 2020-06-10 05:46:08.267 UTC [chaincode.platform.java] GetDeploymentPayload -> ERRO 003 Error writing java project to tar package lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory Error: error getting chaincode bytes: failed to create chaincode package: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ERROR !!! Deploying chaincode failed

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Hello team! When trying deploy chaincode on test network like described in documentation here: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html#starting-a-chaincode-on-the-channel By run the command "./network.sh deployCC" in dir "test-network" see next error. If anyone face with this error before and/or know how it can be resolved - will be very thankful for him ``` ./network.sh deployCC -l java deploying chaincode on channel 'mychannel' Compiling Java code ... /opt/hyperledger_fabric/fabric-samples/chaincode/fabcar/java /opt/hyperledger_fabric/fabric-samples/test-network ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. /opt/hyperledger_fabric/fabric-samples/test-network Finished compiling Java code Using organization 1 ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/java/build/install/fabcar --lang java --label fabcar_1 ++ res=1 ++ set +x 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] func1 -> ERRO 001 Visit ../chaincode/fabcar/java/build/install/fabcar failed: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory <<<<<< HERE IS ERROR 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory 2020-06-10 05:46:08.267 UTC [chaincode.platform.java] GetDeploymentPayload -> ERRO 003 Error writing java project to tar package lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory Error: error getting chaincode bytes: failed to create chaincode package: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ERROR !!! Deploying chaincode failed

pleyades (Wed, 10 Jun 2020 06:01:18 GMT):
Hello team! When trying deploy chaincode on test network like described in documentation here: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html#starting-a-chaincode-on-the-channel By run the command "./network.sh deployCC" in dir "test-network" see next error. If anyone face with this error before and/or know how it can be resolved - will be very thankful for him ``` ./network.sh deployCC -l java deploying chaincode on channel 'mychannel' Compiling Java code ... /opt/hyperledger_fabric/fabric-samples/chaincode/fabcar/java /opt/hyperledger_fabric/fabric-samples/test-network ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. /opt/hyperledger_fabric/fabric-samples/test-network Finished compiling Java code Using organization 1 ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/java/build/install/fabcar --lang java --label fabcar_1 ++ res=1 ++ set +x 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] func1 -> ERRO 001 Visit ../chaincode/fabcar/java/build/install/fabcar failed: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory <<<<<< HERE IS ERROR 2020-06-10 05:46:08.267 UTC [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory 2020-06-10 05:46:08.267 UTC [chaincode.platform.java] GetDeploymentPayload -> ERRO 003 Error writing java project to tar package lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory Error: error getting chaincode bytes: failed to create chaincode package: lstat ../chaincode/fabcar/java/build/install/fabcar: no such file or directory !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!! ERROR !!! Deploying chaincode failed

pleyades (Wed, 10 Jun 2020 06:01:57 GMT):
There is no such cases described in "Troubleshooting"

Shubh_awesome (Wed, 10 Jun 2020 14:38:45 GMT):
Has joined the channel.

rmnattas (Wed, 10 Jun 2020 17:15:28 GMT):
Has joined the channel.

mahoney1 (Thu, 11 Jun 2020 08:45:37 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

govindvb (Fri, 12 Jun 2020 18:07:19 GMT):
Has joined the channel.

HichamTAHIRI (Sun, 14 Jun 2020 15:57:42 GMT):
Has joined the channel.

kapilAtrey (Mon, 15 Jun 2020 08:31:48 GMT):
Hi all can we use getStateByRange() function in cross chaincode query, I mean i want to a do range query of chaincode1 in chaincode2

mahoney1 (Tue, 16 Jun 2020 15:22:22 GMT):
you should be able to - check out the [docs](https://hyperledger-fabric.readthedocs.io/en/release-2.0/developapps/chaincodenamespace.html#cross-chaincode-access) and someone has tried something similar here -> https://stackoverflow.com/questions/53375791/invokechaincode-returning-protos-response

selvaraman (Wed, 17 Jun 2020 00:55:01 GMT):
Hi! I am running 2 org, 4 peer, 2 peers on each org, 2 ca, 1 orderer. After the instantiation, the block count is 4. I understand that while creating channel, it creates 1 genesis block. It creates another block while instantiation. Totally 2. Then where it comes from 2 blocks.? Can someone please explanin.

theblockstalk (Thu, 18 Jun 2020 15:32:05 GMT):
when a tx is made in a data collection, only a hash of the tx input is sent to the channel. This hash is sent in a transaction to the channel. Who signs this transaction, and what chaincode does it run in?

theblockstalk (Thu, 18 Jun 2020 15:32:05 GMT):
when a tx is made in a data collection, only a hash of the tx input is sent to the channel. This hash is sent in a transaction to the channel. Who signs this transaction, and what channel chaincode does it run in?

SuneetBendre (Thu, 18 Jun 2020 15:34:50 GMT):
Transactions are signed by the peer nodes as per your channel policy.. E.g Org1.peer1 and org2.peer1 It is also signed by endoser peer

SuneetBendre (Thu, 18 Jun 2020 15:36:22 GMT):
Initial blocks or anchor peer are also added . We have 1 anchor peer per org

SuneetBendre (Thu, 18 Jun 2020 15:36:22 GMT):
Initial blocks of anchor peer are also added . We have 1 anchor peer per org

theblockstalk (Thu, 18 Jun 2020 15:40:13 GMT):
so it's signed by any peers specified in the channel policy + the private transaction endorser(s) [may be more than one depending on the private tx]?

theblockstalk (Thu, 18 Jun 2020 15:40:38 GMT):
thanks SunnetBendre

theblockstalk (Thu, 18 Jun 2020 15:41:38 GMT):
this tx only contains of a hash of the private tx (run on a chaincode in the data collection). the tx on the channel with the hash also must run in a channel chaincode right?

theblockstalk (Thu, 18 Jun 2020 15:41:49 GMT):
which stores the hashes in order...

SuneetBendre (Thu, 18 Jun 2020 15:42:06 GMT):
Yes.. peer who is validating ( per policy )+ endoser. So this helps and varified at the time of transaction commit

theblockstalk (Thu, 18 Jun 2020 15:42:51 GMT):
is this put in the system contract?

SuneetBendre (Thu, 18 Jun 2020 15:44:21 GMT):
Yes. Orderer will decide the sequence and committer will put in the ledger. Orderer also keep each block in their ledger

theblockstalk (Thu, 18 Jun 2020 15:45:16 GMT):
does the system contract keep track of which hashes are for which data collection?

theblockstalk (Thu, 18 Jun 2020 15:45:43 GMT):
do all peers in the channel get the system contract chaincode?

SuneetBendre (Thu, 18 Jun 2020 15:50:08 GMT):
Track of trnx, yes system chaincode, you also refer merkel tree. No all peer get it. It depends on their roles Committer will get chaincode to validate and update ledger

SuneetBendre (Thu, 18 Jun 2020 15:50:08 GMT):
Track of trnx, yes system chaincode, you also refer merkel tree. No all peer get it. It depends on their roles Committer will get chaincode to validate and update ledger Endoser will have previlage to execute chaincode

theblockstalk (Thu, 18 Jun 2020 15:51:19 GMT):
so not all peers in a channel have the system chaincode? who decides this?

SuneetBendre (Thu, 18 Jun 2020 15:53:16 GMT):
Your initial configuration. Configtx.yml

theblockstalk (Thu, 18 Jun 2020 15:54:19 GMT):
thank you, very good to understand

theblockstalk (Thu, 18 Jun 2020 15:54:36 GMT):
can you point me the implementation of the system chaincode that tracks data collection hashes?

SuneetBendre (Thu, 18 Jun 2020 15:58:45 GMT):
Just few ref :kiss_mm: https://github.com/hyperledger/fabric/blob/master/core/committer/txvalidator/v14/vscc_validator.go

SuneetBendre (Thu, 18 Jun 2020 15:58:45 GMT):
Just few ref - https://github.com/hyperledger/fabric/blob/master/core/committer/txvalidator/v14/vscc_validator.go

SuneetBendre (Thu, 18 Jun 2020 15:59:41 GMT):
https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go You might find more reference around

theblockstalk (Thu, 18 Jun 2020 16:09:34 GMT):
what I understand from here is that the tx will contain the chaincodeID, even though it is a chaincode in a data colection. is that right?

theblockstalk (Thu, 18 Jun 2020 16:09:35 GMT):
https://github.com/hyperledger/fabric/blob/master/core/committer/txvalidator/v14/vscc_validator.go#L252

theblockstalk (Thu, 18 Jun 2020 16:13:39 GMT):
all other peers on the channel will see both the identity, data collection and chaincode ID of txs in data collections

theblockstalk (Thu, 18 Jun 2020 16:14:15 GMT):
and chaincode name

SuneetBendre (Thu, 18 Jun 2020 16:14:47 GMT):
Will have to look this code. I havent gone through earlier .. i will getback to you on this.

theblockstalk (Thu, 18 Jun 2020 16:14:49 GMT):
they will not see the tx inputs, or be able to execute and see tx state or private data, but that is quite a lot of metadata

theblockstalk (Thu, 18 Jun 2020 16:14:49 GMT):
they will not see the tx inputs, or be able to execute and see tx state or private data, but that is quite a lot of metadata they can see

theblockstalk (Thu, 18 Jun 2020 16:15:18 GMT):
thanc-s!

theblockstalk (Thu, 18 Jun 2020 16:15:18 GMT):
thancks! :smiley:

ItaloCarrasco (Thu, 18 Jun 2020 19:27:52 GMT):
hello i am having errors installing a chaincode, i think it is because grpc library got updated 2 hours ago, i have different proyects working and tried to redeploy some of them to test and none work anymore, they all fail installing the chaincode with a grpc library error

ItaloCarrasco (Thu, 18 Jun 2020 19:27:52 GMT):
hello i am having errors invoking a chaincode, i think it is because grpc library got updated 2 hours ago, i have different proyects working and tried to redeploy some of them to test and none work anymore, they all fail invoking the init in the chaincode with a grpc library error

mbwhite (Fri, 19 Jun 2020 14:20:04 GMT):
Yes; I've just confirmed that now.. if you add a dependency to your chaincode of `@grpc/grpc-js@1.0.5` things work

mbwhite (Fri, 19 Jun 2020 14:20:23 GMT):
The depending we have marked is `^1.0.3`

mbwhite (Mon, 22 Jun 2020 10:46:05 GMT):
And today there's a dependency problem with the logging library. https://github.com/winstonjs/winston/issues/1814

mbwhite (Mon, 22 Jun 2020 10:46:11 GMT):
we're looking to fix.

SpecialAgentCooper (Mon, 22 Jun 2020 11:30:33 GMT):
I had to restart my test-network today and I'm getting the following error when I get to the chaincode installation: ``` Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: E rror returned from build: 1 "+ INPUT_DIR=/chaincode/input ```

SpecialAgentCooper (Mon, 22 Jun 2020 11:31:16 GMT):
```+ OUTPUT_DIR=/chaincode/output + cp -R /chaincode/input/src/. /chaincode/output + cd /chaincode/output + '[' -f package-lock.json -o -f npm-shrinkwrap.json ] + npm ci '--only=production' npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno ENOENT npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/DABH/diagnostics.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent ``` This is the rest of the error. I've not run into this issue before and this is the same chaincode I deployed with the same scripts on Friday. Any ideas?

mbwhite (Mon, 22 Jun 2020 13:36:43 GMT):
@SpecialAgentCooper this is caused by the Winston issue; it's broken quite a considerable number of systems. We're running PRs are the moment to lock our dependency onto an older version of Winston

SpecialAgentCooper (Mon, 22 Jun 2020 13:39:17 GMT):
Thanks for the update, best of luck!

PJHaga (Tue, 23 Jun 2020 12:25:29 GMT):
Has joined the channel.

jrasm91 (Tue, 23 Jun 2020 18:28:40 GMT):
In the 1.4 fabric-sdk-node library there is a method `channel.queryTransaction(txId)` to lookup a transaction by id. In the 2.1.1 version of the library this method no longer exists. Has it been moved, or does anyone know why it was removed? If it is no longer available, what's the recommended way to query the blockchain by transaction id from a client?

adityanalge (Tue, 23 Jun 2020 18:32:02 GMT):
Has joined the channel.

adityanalge (Tue, 23 Jun 2020 18:32:02 GMT):
Is there anyway to avoid the fabric shim install step? I have the network running behind a proxy and do not have access to npm registry to install fabric shim when chaincode is instantiated

adityanalge (Tue, 23 Jun 2020 18:32:39 GMT):
Will modifying the base peer docker image by adding fabric-shim solve the problem?

RafaelAPB (Wed, 24 Jun 2020 10:29:39 GMT):
Has joined the channel.

RafaelAPB (Wed, 24 Jun 2020 10:29:40 GMT):
Hello everyone!

RafaelAPB (Wed, 24 Jun 2020 10:30:22 GMT):
Are smart contracts in Fabric compiled to an intermediate representation (such as bytecode in Solidity)? Do you have idea on how smart contracts could be converted between languages?

RafaelAPB (Wed, 24 Jun 2020 10:30:22 GMT):
Are smart contracts in Fabric compiled to an intermediate representation (such as bytecode in Solidity)? Do you have idea on how smart contracts could be converted between languages? @mbwhite

adityanalge (Wed, 24 Jun 2020 17:40:39 GMT):
How can I run chaincodes on a blockchain without internet acess?

adityanalge (Wed, 24 Jun 2020 17:41:07 GMT):
I need to preinstall the fabric shim image?

Aniket.1 (Thu, 25 Jun 2020 07:58:27 GMT):
Hello evryone, I am getting this error while invoking chaincode: `Chat stream with peer - on error: %j "Error: 14 UNAVAILABLE: No connection established\n at Object.callErrorFromStatus (/usr/local/src/node_modules/@grpc/grpc-js/build/src/call.js:30:26)\n at Object.onReceiveStatus (/usr/local/src/node_modules/@grpc/grpc-js/build/src/client.js:390:49)\n at Object.onReceiveStatus (/usr/local/src/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:304:181)\n at Http2CallStream.outputStatus (/usr/local/src/node_modules/@grpc/grpc-js/build/src/call-stream.js:115:74)\n at Http2CallStream.maybeOutputStatus (/usr/local/src/node_modules/@grpc/grpc-js/build/src/call-stream.js:154:22)\n at Http2CallStream.endCall (/usr/local/src/node_modules/@grpc/grpc-js/build/src/call-stream.js:140:18)\n`

Aniket.1 (Thu, 25 Jun 2020 07:58:41 GMT):
same setup is working fine on different machine

Aniket.1 (Thu, 25 Jun 2020 07:58:49 GMT):
My network is TLS enabled

Aniket.1 (Thu, 25 Jun 2020 07:58:58 GMT):
can some one help

nkalichynskyi (Thu, 25 Jun 2020 13:05:18 GMT):
Hi everyone I'm trying to install go chaincode which uses fabric-contract-api-go/contractapi in fabric 1.4, but getting `cannot find package "github.com/hyperledger/fabric-contract-api-go/contractapi" in any of...`. I've tried fabcar chaincode and got the same result, although when I login into ccenv based container, mount into it my chaincode and run `go build` everything works, all dependencies are fetched and chaincode is built. Can anyone explain how are chaincodes being built and why it doesn't fetch all needed dependencies?

mahoney1 (Thu, 25 Jun 2020 13:44:44 GMT):
please note that today's Fabric Application Developer Community call has been cancelled (per email) - the next call planned is on 9th July.

sijo.c (Fri, 26 Jun 2020 18:21:17 GMT):
Has joined the channel.

nkalichynskyi (Wed, 01 Jul 2020 08:59:35 GMT):
Hi everyone, is it possible to return custom error code(e.g. 404) when chaincode is based on `github.com/hyperledger/fabric-contract-api-go/contractapi`?

awjh (Wed, 01 Jul 2020 09:10:34 GMT):
The contract-api works by checking to see if a value returned is an error type and then forwards the value of that straight to shim.Error

awjh (Wed, 01 Jul 2020 09:11:31 GMT):
There is no way to customise what comes back bar the message in the error

awjh (Wed, 01 Jul 2020 09:13:51 GMT):
You would have to use the lower level fabric-chaincode-go implementing your own invoke and init to return custom pb.response values

TimFrHunter (Wed, 01 Jul 2020 14:20:06 GMT):
Has joined the channel.

TimFrHunter (Wed, 01 Jul 2020 14:20:07 GMT):
Hi guys, I'm trying to compile the peer binary and there is one file changes that get not compile, file who doesn't get compile is in protos/utils/, the command I run to compile the peer is : make -B peer . The command doesn't stuck or something else and works but not the changes that I make in the specific file. Is there some flags that I need to add ..? Great thanks.

nkalichynskyi (Thu, 02 Jul 2020 04:36:00 GMT):
thanks

RasDwivedi (Thu, 02 Jul 2020 04:39:11 GMT):
Has joined the channel.

RasDwivedi (Thu, 02 Jul 2020 04:39:12 GMT):
Hi guys, I am trying to implement a modified version of hash based time locks. I need to use last block number in the chaincode. Is it possible to get ledger height in the chaincode?

SpecialAgentCooper (Mon, 06 Jul 2020 10:08:42 GMT):
Use Query System Chaincode - https://hyperledger-fabric.readthedocs.io/en/release-2.0/smartcontract/smartcontract.html?highlight=system%20chaincode#system-chaincode You can load it the same way you get any contract from a channel (`const qsccContract = await network.getContract('qscc'); `) There's a list of the functions you can invoke here: https://godoc.org/github.com/hyperledger/fabric/core/scc/qscc#pkg-constants I'm using this to query blocks directly in my app, hope it helps

SpecialAgentCooper (Mon, 06 Jul 2020 10:18:31 GMT):
I'm not sure but I don't think so, not without passing it in - transactions are first simulated by your endorsing peers, then ordered into blocks and then finally committed to the ledger by the committing peers. For this to succeed, the same results must be generated by the endorsers and the committers, but since time passes between the two evaluations the block height may have changed: the committers would produce a different result so the transaction would be rejected. It may be the case that hash based time locks are not possible with fabric because of the separation of ordering and evaluating transactions. Maybe you could achieve it by modifying the transaction context to hold a timestamped record of the block height at the time the transaction was submitted. Good luck!

MeSSeRz (Mon, 06 Jul 2020 17:57:18 GMT):
Hi all. I created 2nd endorsing peer for the same org. Then I installed chaincodes on that peer, but chaincodes disappeared from the 1st peer. Anyone have thoughts about it?

MeSSeRz (Mon, 06 Jul 2020 21:09:56 GMT):
ok, I found my fail. I must install the same chaincode package for all endorsing peers of the same org, instead of rebuilding the package for each peer.

JohnD (Tue, 07 Jul 2020 16:27:26 GMT):
Has joined the channel.

BilalAhmad (Wed, 08 Jul 2020 14:06:13 GMT):
Hi everyone i get this error while instantiating the chain code (syntax error: unexpected shim, expecting comma or ) it install just fine it was working fine i restarted the network and this error apeared

rnivi (Thu, 09 Jul 2020 07:28:47 GMT):
Has joined the channel.

rthatcher (Thu, 09 Jul 2020 11:43:31 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

Abhishekkishor (Fri, 10 Jul 2020 05:25:32 GMT):
Hello Guys, Hope you are doing well. I need your help and guidance in Hyperledger Fabric. Can you please suggest me good resources on how to generate crypto materials (manualy) using fabric ca in hyperledger? Also the answers of few questions My questions are: 1) which testing framework to use for fabric contract api chaincode (node.js) testing? 2) How to handle crypto certificates in production projects? How to generate certificates ? Where & how to store certificates ? I'll be waiting for your all your response and suggestions. Thanks & regards, Abhishek

kunalsinha (Fri, 10 Jul 2020 07:33:27 GMT):
Has joined the channel.

glad (Fri, 10 Jul 2020 08:09:19 GMT):
Has joined the channel.

c0deh0use (Fri, 10 Jul 2020 08:44:38 GMT):
Hi guys, what can be the cause that the blockchain chaincode gets executed 2 minutes after I made the call from the gateway? I'm uploading around 70Kb of data, the `ContractRouter` class logger gets executed around 2 minutes later. I'm usinge java as the lang for both gateway and chaincode and I'm on HLF 2.1.1.

sarva_v (Mon, 13 Jul 2020 04:49:23 GMT):
Has joined the channel.

Vanitha (Tue, 14 Jul 2020 13:45:37 GMT):
Has joined the channel.

suncowbee (Wed, 15 Jul 2020 16:54:18 GMT):
Has joined the channel.

suncowbee (Wed, 15 Jul 2020 16:54:18 GMT):
hello

HLFPOC (Wed, 15 Jul 2020 19:55:22 GMT):
Hi Team, my chaincode container got crashed after successful installation on the peers. Got below error message while starting the chaincode. ``` panic: Error creating TTChaincode. Contracts are required to have at least 1 (non-ignored) public method. Contract tt.chaincode has none. Method names that have been ignored: GetAfterTransaction, GetBeforeTransaction, GetInfo, GetName, GetTransactionContextHandler, GetUnknownTransaction, GetIgnoredFunctions and GetEvaluateTransactions ``` Currently using fabric v2.1 and fabric-contract-api-go v1.0.0 for chaincode. Any suggestions what could be wrong/missing?

davidkel (Wed, 15 Jul 2020 21:02:54 GMT):
do you have any public methods in your contract ? Any method that doesn't start with a capital letter is not a public method in Go

LazarLukic95 (Thu, 16 Jul 2020 14:11:23 GMT):
Has joined the channel.

LazarLukic95 (Thu, 16 Jul 2020 14:11:23 GMT):
Also note `func (s *SmartContract) YourFuncName (ctx contractapi.TransactionContextInterface)`

HLFPOC (Thu, 16 Jul 2020 16:39:14 GMT):
It got fixed after making a method public. Thanks for the inputs.

sijo.c (Thu, 16 Jul 2020 20:43:45 GMT):
Hi, in local test-network, with couchdb , how do I get to the couchdb to do a direct query. I tried exec into peer container , but is not connected ``` wget http://couchdb:5984/ ```

metadata (Fri, 17 Jul 2020 09:29:27 GMT):
Hello, I have a question about implicit private data. In case of private collection, we can set blockToLive to any number. In case of implicit-private data, Is there any way to set blockToLive property? Is there any concept of blockToLive in implicit-private data?

metadata (Fri, 17 Jul 2020 09:29:27 GMT):
Hello All, I have a question about implicit private data. In case of private collection, we can set blockToLive to any number. In case of implicit-private data, Is there any way to set blockToLive property? Is there any concept of blockToLive in implicit-private data?

FarhanShafiq (Fri, 17 Jul 2020 11:44:16 GMT):
Has joined the channel.

FarhanShafiq (Fri, 17 Jul 2020 11:44:17 GMT):
I forgot to include the collection policy at the time of chaincode commiting. Now I'm trying to commit again with collection policy but it giving me error `Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to define the current sequence (1) for namespace fabcar, but: Collections do not match` Is there anyway to update the collection policy and/or getting the old collection policy?

FarhanShafiq (Fri, 17 Jul 2020 11:56:47 GMT):
As per the document statement to update the collection policy ``` If a collection configuration is specified when updating the chaincode definition, a definition for each of the existing collections must be included. ``` But the problem is that I don't know what were the existing collections.

Romern (Sat, 18 Jul 2020 16:47:39 GMT):
Has joined the channel.

Romern (Sat, 18 Jul 2020 16:47:39 GMT):
Hi, I am writing a chaincode in go and when an error occurs (through shim.Error("test") for example) the client (for example curl) does not get a reply and times out. In the logs for the chaincode itself nothing appears, and in the peer I get "simulateProposal() resulted in chaincode name:"mycc" response status 500 for txid: XXX" without a message. How/where do I see the error message and how do I prevent the timeout?

Romern (Sat, 18 Jul 2020 17:44:24 GMT):
It seems the REST-API included in fabric-starter ( https://github.com/olegabu/fabric-starter-rest/ ) does not return them for some reason, using other ways it works.

zainhasantirmizi (Sun, 19 Jul 2020 21:55:54 GMT):
Has joined the channel.

zainhasantirmizi (Sun, 19 Jul 2020 21:55:55 GMT):
Hi .. How can I use multiple objects in a Contract ... for example If I need to create 2 objects like items and customers. How would that work ? because while query in fabcar it just calls everything. How would I query each object separately?

awjh (Mon, 20 Jul 2020 08:37:07 GMT):
When storing your objects use a composite key with a different objectType value for each object. You can create this by calling the createCompositeKey method of the stub and using that as the key in your write. You can then get all of a specific type by using getByPartialCompositeKey supplying only the object type

andrikur (Mon, 20 Jul 2020 11:50:46 GMT):
Has joined the channel.

andrikur (Mon, 20 Jul 2020 11:53:11 GMT):
@awjh how about using namespace in fabric-contract-api-go (for fabric v 2.x) instead of fabric-chaincode-go ?

FarhanShafiq (Mon, 20 Jul 2020 14:26:57 GMT):
Hello, I'm trying to approve chaincode definition from endorsers with default LifecycleEndorsement "majority" policy and I used two endorsers out of four to endorsed the definition and both endorsers are successfully able to fetch private data but other peers are not able to do so. 1. To my knowledge, approving chaincode definition should give me an error if I don't provide enough endorsements but In my case, it's not giving me any error even if definition endorsed by 1 out of 4 peers. 2. I don't seem to understand why other peers are not able to fetch private data if they don't take part in definition endorsement. Is this the normal behavior?

andrikur (Mon, 20 Jul 2020 19:01:47 GMT):
I'll try to answer you question as I know it. I'm still learning HF too 1. approveformyorg doesn't give you error. it simply say you have approved chaincode definition in your org as an admin orgs. when you try to commit chaincode "peer lifecycle chaincode commit", it will give you an error when majority of the other org doesn't approve chaincode yet 2. I'm not clearly understand the question. however the private data in chaincode, you should declare it in json file. private data collection json file define collection name and read/write access in org. you could read in more detail in https://hyperledger-fabric.readthedocs.io/en/release-2.0/private_data_tutorial.html. that's my 2 cents answers

awjh (Tue, 21 Jul 2020 09:15:48 GMT):
The namespace in fabric-contract-api-go is for different sub-contracts within a chaincode rather than different objects. Although objectType in the composite key can practically be thought of as key namespacing

vishnupradeepmahe (Tue, 21 Jul 2020 19:31:31 GMT):
Hi all I have developed a custom chaincode for my application in nodejs, I need to perform unit test to validate the functionality using any frameworks such as jest mocha chai, etc. I did did find Hyperledger fabric mock stub testing but it doesnt support fabric-contract-api as far as my knowledge. I also read about some truffle method but did not try. Is there any way to test chaincode in nodejs.

ItaloCarrasco (Tue, 21 Jul 2020 20:24:47 GMT):
hello i am using the new contract interface to write chaincodes using node, i have a doubt about the chaincode responses, in the old way we used shim.success and shim.error when the transaction finished, on the sdk we got the same object with a status and our payload, what is the recomended way to handle this using the new contract interface?, can i still use shim or is there another way to answer with a status code and get it on the node sdk

FarhanShafiq (Wed, 22 Jul 2020 07:57:39 GMT):
Thanks @andrikur for the reply, you're correct but I'm also not getting any error when committing definition using one endorser. I have specified the collection config where declared the signature policy as any of two organization can persist the private data but they're still unable to fetch private data while giving me error. ``` [[36m2018-12-21 17:54:24.932 KST [gossip/discovery] periodicalSendAlive -> DEBU 2a96[[0m Sleeping 5s [[36m2018-12-21 17:54:25.238 KST [gossip/privdata] fetch -> DEBU 2a97[[0m Total members in channel: [] [[36m2018-12-21 17:54:25.238 KST [gossip/privdata] fetch -> DEBU 2a98[[0m Total members that fit some digest: [] [[33m2018-12-21 17:54:25.238 KST [gossip/privdata] fetch -> WARN 2a99[[0m Do not know any peer in the channel( kosgldcurkrw ) that matches the policies , aborting [[33m2018-12-21 17:54:25.238 KST [gossip/privdata] fetchFromPeers -> WARN 2a9a[[0m Failed fetching private data for block 1832 from peers: Empty membership ``` But I was able to resolve that issue by providing the endorsement of all four peers at the time of chaincode definition endorsement.

FarhanShafiq (Wed, 22 Jul 2020 08:29:41 GMT):
Hello, I'm trying to fetch peers from discover CLI but result giving me only target peer information. Is this the default behavior or should I expect all four peers information? Note: I have set the "CORE_PEER_GOSSIP_EXTERNALENDPOINT" on all four anchor peers but still no way of knowing that gossip is running properly since, peers logs contain no warning and error.

SpecialAgentCooper (Wed, 22 Jul 2020 09:26:42 GMT):
I've found nothing for 2.1, there really does need to be a mocking framework for HFL chaincode

andrikur (Wed, 22 Jul 2020 10:21:34 GMT):
Hello, Does anyone in here have interest to enroll certification Hyperleger Fabric Developer (CHFD) from linuxfoundation? and Has anyone been certified already?

SuneetBendre (Wed, 22 Jul 2020 10:23:43 GMT):
I plan to take

andrikur (Wed, 22 Jul 2020 10:27:58 GMT):
Yes, i'm going to take it too. But i have been comparing between CHFD from linux foundation and CBDH from Blockchain training alliance. How do you think ? Which one is more prestigious?

SuneetBendre (Wed, 22 Jul 2020 10:30:26 GMT):
I prefer to learn myself. Let me know if you have any doubts or need any help

andrikur (Wed, 22 Jul 2020 10:41:22 GMT):
I dont mean i'll take training. But CBDH (Certified Blockchain Developer Hyperledger) its certification from another org which is "Blockchain Training Alliance". It's compared head to head with CHFD. So Which one is more worthy to take it ?

SuneetBendre (Wed, 22 Jul 2020 10:41:59 GMT):
Ohh.then Linux foundation

andrikur (Wed, 22 Jul 2020 11:17:11 GMT):
i have register for the CHFD and waiting to schedule exam.

SuneetBendre (Wed, 22 Jul 2020 11:18:20 GMT):
👍

mahoney1 (Thu, 23 Jul 2020 08:20:33 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

kleebeard (Thu, 23 Jul 2020 19:48:36 GMT):
Has joined the channel.

vishnupradeepmahe (Fri, 24 Jul 2020 21:21:19 GMT):
https://github.com/ampretia/fabric-application-examples/tree/master/contracts/cp-ts-extended/test check this out, got this reference from Bret Logan

vanitas92 (Sat, 25 Jul 2020 18:21:34 GMT):
Has joined the channel.

vanitas92 (Sat, 25 Jul 2020 18:25:46 GMT):
Hi everyone, has somebody been able to implement unit testing in golang based chaincodes with the new contractapi definition? Looking from the docs (https://pkg.go.dev/github.com/hyperledger/fabric-contract-api-go/contractapi?tab=doc#TransactionContextInterface), there is no MockStub defined as in the old shim definition (https://pkg.go.dev/github.com/hyperledger/fabric/core/chaincode/shim?tab=doc#MockStub). A little guidance would be extremely appreciated! Thanks!

pronoob (Sun, 26 Jul 2020 11:30:36 GMT):
Has joined the channel.

riteek21 (Mon, 27 Jul 2020 04:16:03 GMT):
Has joined the channel.

ItaloCarrasco (Mon, 27 Jul 2020 21:12:35 GMT):
are there debug logs on node chaincode?

ChrisSargent (Tue, 28 Jul 2020 11:37:43 GMT):
I have only done unit tests in the old version. From what I understand, you should write your own mocks... See here: https://lists.hyperledger.org/g/fabric/topic/39649948 (this is Node but I think principals are the same)

ChrisSargent (Tue, 28 Jul 2020 11:39:30 GMT):
Also here - https://github.com/ampretia/fabric-application-examples/tree/master/contracts/cp-ts-extended/test Referenced from another answer a few questions above yours.

Taaanos (Tue, 28 Jul 2020 13:44:03 GMT):
Have you checked the tests in commercial paper example?

jrasm91 (Tue, 28 Jul 2020 23:07:13 GMT):
In the chaincode that I've written, I've been able to see their logs. You can use this environment variable (set on the peer) ```CORE_CHAINCODE_LOGGING_LEVEL=info``` Is this what you are talking about?

ysai (Wed, 29 Jul 2020 05:36:29 GMT):
Has joined the channel.

andrikur (Wed, 29 Jul 2020 11:46:32 GMT):
You still can use fabric-chaincode-go/shimtest. With adding contractname:funcname in mockinvoke when you have multiple smartcontract in one chaincode

andrikur (Wed, 29 Jul 2020 11:48:32 GMT):
Hai, is there anyone know how to add couchdb index in private data collection ? or its not suppported ?

andrikur (Wed, 29 Jul 2020 11:59:58 GMT):
Nevermind, I have found myself an answer of my question

ItaloCarrasco (Wed, 29 Jul 2020 17:20:44 GMT):
yes ty

riteek21 (Thu, 30 Jul 2020 13:14:00 GMT):
riteek@riteek-VirtualBox:~/fabric-samples/test-network$ peer lifecycle chaincode commit -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --channelID mychannel --name marbles --version 1.0 --sequence 1 --signature-policy "OR('Org1MSP.member','Org2MSP.member')" --init-required --tls --cafile $ORDERER_CA --peerAddresses localhost:7051 --tlsRootCertFiles $ORG1_CA --peerAddresses localhost:9051 --tlsRootCertFiles $ORG2_CA Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (Org1MSP)

riteek21 (Thu, 30 Jul 2020 13:15:36 GMT):
Getting this error even after approving the chaincode definition. Is it a bug?

yehia67 (Sat, 01 Aug 2020 20:27:01 GMT):
Has joined the channel.

yehia67 (Sat, 01 Aug 2020 20:27:01 GMT):
Hello everyone, I am from a public Blockchain (Ethereum) background. I want to create Blockchain accounts for my users. In Etherum, I need to generate public/private key for users to make a blockchain account. For Hyperledger Fabric what is the best way to do so? (I found two options) option 1: Is using shim API 'clientIdentity' (https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/fabric-shim.ClientIdentity.html) is it a good option? Or it wouldn't matter because I am deploying my network on a single instance. option 2: Is to save users data as assets make their email as ID and encrypt their passwords and save them. Is that could be a better solution?

sebastiantf (Mon, 03 Aug 2020 12:19:18 GMT):
Has joined the channel.

sebastiantf (Mon, 03 Aug 2020 12:22:23 GMT):
Hey there

sebastiantf (Mon, 03 Aug 2020 12:24:27 GMT):
1. If multiple smart contracts are defined in the same chaincode, how can i use the `peer chaincode invoke` command to specify which contract i want to invoke from the chaincode?

sebastiantf (Mon, 03 Aug 2020 12:24:27 GMT):
If multiple smart contracts are defined in the same chaincode, how can i use the `peer chaincode invoke` command to specify which contract i want to invoke from the chaincode?

sebastiantf (Mon, 03 Aug 2020 12:26:17 GMT):
This is a pretty confusing thing for many. This might be easy while using the Node SDK for the client applications to select a specific contract inside a chaincode while using the getContract() function

sebastiantf (Mon, 03 Aug 2020 12:27:06 GMT):
But the docs doesn't specify much about how to do the same with the `peer chaincode invoke` command

sebastiantf (Mon, 03 Aug 2020 12:28:41 GMT):
Some googling does bring up something about using namespaces like `AssetContract:MyTransaction`, but isn't clear

sebastiantf (Mon, 03 Aug 2020 12:29:06 GMT):
Can the devs please clarify this?

rokoko (Mon, 03 Aug 2020 17:27:32 GMT):
Hello People, using the test-network of fabric-samples v2.1.1, trying to fetch records from couchdb using getQueryResults(query), only getting 100 results. Is there a limit? Checked the core.yaml wherein the default limits are way more.

Rachit-gaur (Mon, 03 Aug 2020 22:11:41 GMT):
Hi, What happens to all the putstates if at the end shim.Error is reached? Are all of them reverted or are the changes made?

jrasm91 (Mon, 03 Aug 2020 22:25:09 GMT):
If you are using the contract-api (https://www.npmjs.com/package/fabric-contract-api) the name you pass to `super("MyContract")` can be used as a prefix.

AshutoshKumar7 (Tue, 04 Aug 2020 14:58:55 GMT):
Has joined the channel.

mbwhite (Tue, 04 Aug 2020 15:09:27 GMT):
there was an issue with the node chaincode that limited the number of records; this has been resolved.. using the latest chaincode would solve this

sebastiantf (Tue, 04 Aug 2020 15:21:17 GMT):
Thanks. But can you please share how the `peer chaincode invoke` command would really look like in that case?

sebastiantf (Tue, 04 Aug 2020 15:21:29 GMT):
It's really confusing

ChrisSargent (Tue, 04 Aug 2020 15:40:26 GMT):
I believe if the peer response is not a success with a 200 status code, the proposal is rejected, hence none of the putstates are recorded on the ledger. Couldn't find exact documentation on it, but did see this: https://jira.hyperledger.org/browse/FABN-1214

jrasm91 (Tue, 04 Aug 2020 15:52:02 GMT):
```peer chaincode invoke -C $CHANNEL_NAME -n $CHAINCODE_NAME -c '{ "Args": ["MyContract:methodName", "{}"] }'```

jrasm91 (Tue, 04 Aug 2020 15:52:21 GMT):
peer chaincode invoke -C $CHANNEL_NAME -n $CHAINCODE_NAME -c '{ "Args": ["MyOtherContract:methodName", "{}"] }'

jrasm91 (Tue, 04 Aug 2020 15:52:21 GMT):
```peer chaincode invoke -C $CHANNEL_NAME -n $CHAINCODE_NAME -c '{ "Args": ["MyOtherContract:methodName", "{}"] }'```

jrasm91 (Tue, 04 Aug 2020 15:59:21 GMT):
If you leave the contract name out, it uses the first (default) contract ```peer chaincode invoke -C $CHANNEL_NAME -n $CHAINCODE_NAME -c '{ "Args": ["methodName", "{}"] }'```

jrasm91 (Tue, 04 Aug 2020 16:02:49 GMT):
The code for this is in `chaincodefromcontract.js`. Code that loads contracts into memory: https://github.com/hyperledger/fabric-chaincode-node/blob/master/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L160 Code that parses contract name / function name: https://github.com/hyperledger/fabric-chaincode-node/blob/master/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L418 And what I find the most useful (interesting), the mapping from the low level interface to the contract interface:

jrasm91 (Tue, 04 Aug 2020 16:02:49 GMT):
The code for this is in `chaincodefromcontract.js`. Code that loads contracts into memory: https://github.com/hyperledger/fabric-chaincode-node/blob/master/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L160 Code that parses contract name / function name: https://github.com/hyperledger/fabric-chaincode-node/blob/master/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L418 And what I find the most useful (interesting), the mapping from the low level interface to the contract interface: https://github.com/hyperledger/fabric-chaincode-node/blob/master/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js#L375-L401

sebastiantf (Tue, 04 Aug 2020 16:11:13 GMT):
Great. That was really useful.

sebastiantf (Tue, 04 Aug 2020 16:11:28 GMT):
Really appreciate you helping out like this

sebastiantf (Tue, 04 Aug 2020 16:11:48 GMT):
Its much clear now

sebastiantf (Tue, 04 Aug 2020 16:13:05 GMT):
I had DMed @pandrejko about this and he asked me to create an issue on Jira and assign it to him

sebastiantf (Tue, 04 Aug 2020 16:14:01 GMT):
And I did that: https://jira.hyperledger.org/browse/FAB-18109

jrasm91 (Tue, 04 Aug 2020 16:15:21 GMT):
Sounds good. I agree the documentation could be improved. Luckily, it is an open-source project and whenever I'm confused I can at least try to look over the code to figure out what is going on :grinning:

sebastiantf (Tue, 04 Aug 2020 16:29:18 GMT):
Yeah. Being open source is the best thing about it. Glad you could sort this out.

rokoko (Tue, 04 Aug 2020 17:46:40 GMT):
By chaincode you mean the fabric-shim/fabric-contract-api version?

davidkel (Tue, 04 Aug 2020 18:12:34 GMT):
@Rachit-gaur That all depends on what your client application does. The client application decides whether to send to the orderer or not. The gateway apis in node/java/go will not submit to the orderer and responses from peers that return an error status for example.

davidkel (Tue, 04 Aug 2020 18:12:34 GMT):
@Rachit-gaur That all depends on what your client application does. The client application decides whether to send the responses to the orderer or not. The gateway apis in node/java/go will not submit to the orderer and responses from peers that return an error status for example.

davidkel (Tue, 04 Aug 2020 18:12:34 GMT):
@Rachit-gaur That all depends on what your client application does. The client application decides whether to send the responses to the orderer or not. The gateway apis in node/java/go will not submit to the orderer any responses from peers that return an error status for example.

rokoko (Tue, 04 Aug 2020 18:21:20 GMT):
Hey, resolved by updating shim. Thanks a lot

julian (Tue, 04 Aug 2020 18:48:30 GMT):
Has joined the channel.

julian (Tue, 04 Aug 2020 18:49:48 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.

Rachit-gaur (Tue, 04 Aug 2020 22:43:59 GMT):
Thanks for your answers, yes so the conclusion being the changes are reverted

mbwhite (Wed, 05 Aug 2020 07:39:38 GMT):
The version2 Node.js client does have this feature - it was a contribution from a new contributor. We are looking for a contributor as well to finish the same function for Java

riteek21 (Wed, 05 Aug 2020 09:42:42 GMT):
While using the test network for tutorial(using deployCC to deploy the chaincode instance onto the test network), instead of getting the list of cars I'm getting chaincode initialization not required. can someone explain what's the problem here?

julian (Wed, 05 Aug 2020 10:02:35 GMT):
OK. I couldn't find it in the documentation, but on inspecting the code I see the ChaincodeServer class. Thank you for your help.

ChrisSargent (Wed, 05 Aug 2020 10:29:31 GMT):
I've seen that ShimTest is deprecated from the fabric-chaincode-go package and will be removed (see: https://github.com/hyperledger/fabric-chaincode-go/blob/master/shimtest/mockstub.go) this is kind of worrying me... I see this Jira issue too: https://jira.hyperledger.org/browse/FAB-15367 The mockstub is a pretty extensive file, it seems crazy to me that it's expected that it's expected that this is re-implemented in its entirety by developers using fabric?? Does anyone have knowledge around the rationale for this?

mbwhite (Wed, 05 Aug 2020 11:44:53 GMT):
@ChrisSargent the problem with that specific 'mockstub' is that it's more like a 'fake server' .. i.e. a pretend fabric, with matching function; Experience has shown that whilst this is seemingly attractive it causes problems later on. A Fake Server is never going to have 100% Fidelity with the real thing, plus as time goes on with new features etc, it has a high maintenance cost. Personally I can cite several instances where developers have (unintentionally) relied on the behaviour of a fake server, and then hit issues when moving into production. Yes it's a trade-off, and yes it would be great to some half way house. Tools such as the VSCode extension are there to try and make development and debug simpler. The advice is that for your given use case, if you need to get putState to throw and error use a mocking library specific for your language. and do FV tests against a real fabric. (We do this in the SDK and Chaincode repos for example)

ChrisSargent (Wed, 05 Aug 2020 12:13:49 GMT):
Hey @mbwhite - thanks for that. Okay, I understand the need for maintenance and not letting the mockstub get out of sync with the real thing. But, for example, I have a bunch of integration tests that run multiple getstate, putstate, getstatebypartial etc etc. and several test rely on multiple previous operations too - i.e. tests rely on ledger state being maintained during the test (as well as changing creators before invoking different functions etc.) I basically rely on those unit/integration tests to avoid having to deploy new code every time I make a change and then run the integration tests... It would be useful if there was some documentation on how to write this or some examples - maybe you could provide a link to something in the chaincode repo please?

ChrisSargent (Wed, 05 Aug 2020 12:14:31 GMT):
At the moment, I'm just not sure where to even start creating my own mocks vs using those provided by shimtest.

mbwhite (Wed, 05 Aug 2020 12:15:30 GMT):
Sure.. are you nodejs/java/go?

mbwhite (Wed, 05 Aug 2020 12:16:11 GMT):
(the chaincode, not yourself personally :-) )

ChrisSargent (Wed, 05 Aug 2020 12:36:23 GMT):
Go

mbwhite (Wed, 05 Aug 2020 13:20:50 GMT):
ah that's my repo :-) I should update it! But yes this has been a topic of recent discussion

mbwhite (Thu, 06 Aug 2020 07:51:33 GMT):
Hello - you either return a value from the transaction function, or throw an error; Treat them as just any other function.

mbwhite (Thu, 06 Aug 2020 07:53:14 GMT):
Just to clarify, the changes aren't reverted, they are never made.

mahoney1 (Thu, 06 Aug 2020 10:18:02 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 - today's agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

ChrisSargent (Thu, 06 Aug 2020 11:04:41 GMT):
Hey Paul - is this in the HL Calendar, I don't see it here and would like to add it to my calendar (without adding the 100's of other meetings). Thanks, Chris https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings

mahoney1 (Thu, 06 Aug 2020 13:32:29 GMT):
hi Chris - yep, its missing - I'll get the calendar schedule updated (seems the last repeat calendar event expired), will let you know when its added later today.

Rajatsharma (Fri, 07 Aug 2020 13:59:34 GMT):
Has anyone tried using the common/flogging package in user chaincode. We had written a system chaincode and a part of that was shifter to a user chaincode, now we're facing issues with logging. Can anyone suggest me a way to make common/flogging package work in go user chaincode ??

Rajatsharma (Sat, 08 Aug 2020 17:04:31 GMT):
I've tried adding log in v1.4.2 using ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!") logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

Rajatsharma (Sat, 08 Aug 2020 17:04:31 GMT):
I've tried adding log in v1.4.2 using ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!")logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

Rajatsharma (Sat, 08 Aug 2020 17:04:31 GMT):
I've tried adding log in v1.4.2 using ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!")logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

Rajatsharma (Sat, 08 Aug 2020 17:04:31 GMT):
I've tried adding log in v1.4.2 using ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!")logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

mahoney1 (Mon, 10 Aug 2020 08:19:06 GMT):
@ChrisSargent I'm told that you should subscribe to the ICS calendar feed at https://lists.hyperledger.org/ics/1902217/3131022486068381536/feed.ics (albeit the rendered calendar at https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings is not synchronized yet).

mahoney1 (Mon, 10 Aug 2020 08:19:06 GMT):
@ChrisSargent FYI.. I'm told that you should subscribe to the ICS calendar feed at https://lists.hyperledger.org/ics/1902217/3131022486068381536/feed.ics (albeit the rendered calendar at https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings is not synchronized yet).

mahoney1 (Mon, 10 Aug 2020 08:19:06 GMT):
@ChrisSargent FYI.. I'm told that you should subscribe to the ICS calendar feed at https://lists.hyperledger.org/ics/1902217/3131022486068381536/feed.ics (albeit the rendered calendar displayed at https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings is not synchronized yet).

SpecialAgentCooper (Mon, 10 Aug 2020 14:27:11 GMT):
Anyone with any experience with custom chaincode builders? I'm setting the `CORE_CHAINCODE_BUILDER` environment variable on my peers to my custom chaincode builder image (which exists on my machine locally): ``` / # env | grep BUILDER CORE_CHAINCODE_BUILDER=max/fabric-nodeenv:latest ``` but when it comes time to install chaincode, the `hyperledger/fabric-nodeenv:2.2` image is used instead of the one referenced. Is this a bug or are there more settings I need?

PJHaga (Mon, 10 Aug 2020 15:11:06 GMT):
Has left the channel.

RafaelAPB (Mon, 10 Aug 2020 16:27:30 GMT):
Hello all. I appreciate help in this matter. I have the latest images (2.2.0, CA 1.4.8), but I'm getting the error: `failed to invoke chaincode lifecycle, error: timeout expired while executing transaction` I couldn't find an answer to this anywhere. Can someone provide guidance?

SpecialAgentCooper (Mon, 10 Aug 2020 16:34:10 GMT):
I'd look into the logs of your containers, see what was going on in the nodes at the time that happened. It can be that part of the network has not finished initialising, or it could be that the nodes are not connected properly (or it could be something else entirely!)

SpecialAgentCooper (Mon, 10 Aug 2020 16:34:59 GMT):
Just to update, I can't get chaincode to install with any node but `hyperledger/fabric-nodeenv:2.2`, regardless of what `CORE_CHAINCODE_BUILDER` is set to. Is this a bug?

SpecialAgentCooper (Mon, 10 Aug 2020 16:34:59 GMT):
Just to update, I can't get chaincode to install with any node env but `hyperledger/fabric-nodeenv:2.2`, regardless of what `CORE_CHAINCODE_BUILDER` is set to. Is this a bug?

RafaelAPB (Mon, 10 Aug 2020 16:46:37 GMT):
Yeah, I thought so. Thanks for the feedback. I thought it was related to timeouts and therefore I'm trying to increase it

ChrisSargent (Mon, 10 Aug 2020 16:49:48 GMT):
Thanks - I still don't see this particular meeting topic though. How often is it recurring?

ChrisSargent (Mon, 10 Aug 2020 16:51:44 GMT):
Hi Rajat - do you mean you're trying to get access to logs output from your custom chaincode (application)?

ChrisSargent (Mon, 10 Aug 2020 16:51:44 GMT):
Hi Rajat - do you mean you're trying to write to flogger from your custom chaincode (application)?

RafaelAPB (Mon, 10 Aug 2020 16:53:13 GMT):
It turns out that increasing the timeout with CORE_CHAINCODE_EXECUTETIMEOUT=80s was useless

RafaelAPB (Mon, 10 Aug 2020 16:53:13 GMT):
It turns out that increasing the timeout with CORE_CHAINCODE_EXECUTETIMEOUT=300s was useless

RafaelAPB (Mon, 10 Aug 2020 16:53:13 GMT):
It turns out that increasing the timeout with CORE_CHAINCODE_EXECUTETIMEOUT=300s was useless @SpecialAgentCooper

mahoney1 (Mon, 10 Aug 2020 16:56:11 GMT):
every 2 weeks (from Thurs 6th Aug). I'm hoping they will fix this lag (clearly that feed isn't sync-ed yet), but I've been told its best to subscribe to the Fabric calendar directly at https://lists.hyperledger.org/g/fabric/calendar?calstart=2020-08-06

RafaelAPB (Mon, 10 Aug 2020 16:57:30 GMT):
Logs: https://gist.github.com/RafaelAPB/0494c7b349394bbfdfa31f12157c9f5f

ChrisSargent (Mon, 10 Aug 2020 17:09:00 GMT):
Ok.... I _think_ I've done it but created my own event in my calendar just in case!

ChrisSargent (Mon, 10 Aug 2020 17:09:03 GMT):
Thanks.

RafaelAPB (Mon, 10 Aug 2020 17:09:27 GMT):
can someone indicate me the env variables to increase the timeouts regarding chaincode packing/installing?

Rajatsharma (Mon, 10 Aug 2020 18:12:33 GMT):
Yes, I've tried adding log in v1.4.2 using: ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!")logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

Rajatsharma (Mon, 10 Aug 2020 18:13:18 GMT):
I was using flogging package in system chaincode and wanted to use some code in user chaincode so that's why I was thinking of opting this solution.

ChrisSargent (Mon, 10 Aug 2020 18:29:50 GMT):
ah right, sorry you're on 1.4. I was going to say that it's not recommended to use Flogger but that's only from 2.0: https://hyperledger-fabric.readthedocs.io/en/release-2.2/logging-control.html#chaincode

ChrisSargent (Mon, 10 Aug 2020 18:31:09 GMT):
In the case of 1.4, it seems it should be set in core.yaml - see: https://hyperledger-fabric.readthedocs.io/en/release-1.4/logging-control.html, towards the end.

ChrisSargent (Mon, 10 Aug 2020 18:32:11 GMT):
or, as you suggested via env vars.

Rajatsharma (Mon, 10 Aug 2020 18:32:21 GMT):
I have done that it's still not working.

ChrisSargent (Mon, 10 Aug 2020 18:32:25 GMT):
But sorry, I can't help anymore.

Rajatsharma (Mon, 10 Aug 2020 18:32:31 GMT):
Oh Okay

ChrisSargent (Mon, 10 Aug 2020 18:33:13 GMT):
sorry.

Rajatsharma (Mon, 10 Aug 2020 18:34:01 GMT):
No issues. I couldn't find anything anywhere.

ChrisSargent (Mon, 10 Aug 2020 18:34:35 GMT):
did you set the env var before everything was started (like in a Docker config) or trying to set it via cmd line?

Rajatsharma (Mon, 10 Aug 2020 18:35:30 GMT):
I've tried both the methods, I'll still check again. It should work maybe I'm missing something.

ChrisSargent (Mon, 10 Aug 2020 18:36:56 GMT):
and maybe if you plan to move to 2.0, implement your own logger too. Relatively straight forward to use zap logger or similar. Good luck!

Rajatsharma (Mon, 10 Aug 2020 18:38:42 GMT):
Oh But this won't work in system chaincode ? I was trying to use some modules common in user and system chaincode ?

ChrisSargent (Mon, 10 Aug 2020 18:47:05 GMT):
Not 100% sure - I haven't used 'system' chaincode. I just know that in 2.0 you are encouraged to use your own logging mechanism from application (user) chaincode.

Rajatsharma (Mon, 10 Aug 2020 18:57:41 GMT):
Yes. I'll move the logger in 2.0.0. But need to find a solution for now.

ChrisSargent (Mon, 10 Aug 2020 18:58:29 GMT):
are you in Go?

Rajatsharma (Mon, 10 Aug 2020 18:58:36 GMT):
Yes

ChrisSargent (Mon, 10 Aug 2020 18:59:08 GMT):
did you try using the `logger.SetLevel` too?

ChrisSargent (Mon, 10 Aug 2020 19:01:02 GMT):
there's few 'gotchas' that might be relevant for you here: https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/release_notes/v1.4.0.txt

Rajatsharma (Mon, 10 Aug 2020 19:01:41 GMT):
I had used this `chaincode.logging.level`.

Rajatsharma (Mon, 10 Aug 2020 19:01:57 GMT):
I'll go over this.

ChrisSargent (Mon, 10 Aug 2020 19:02:35 GMT):
maybe check this: "Requests to GET /logspec on the operations endpoint will return with a JSON payload that contains the active spec."

ChrisSargent (Mon, 10 Aug 2020 19:02:35 GMT):
maybe check this: `Requests to GET /logspec on the operations endpoint will return with a JSON payload that contains the active spec.`

ChrisSargent (Mon, 10 Aug 2020 19:03:26 GMT):
might give you some clue?

Rajatsharma (Mon, 10 Aug 2020 19:09:36 GMT):
I got this as output chaincode.logging.level=debug:logging.level=debug:info, still not getting any debug messages in the output.

Rajatsharma (Mon, 10 Aug 2020 19:09:44 GMT):
This is really stangre

ChrisSargent (Mon, 10 Aug 2020 19:12:13 GMT):
hmm, not sure then. Maybe set the log level explicity for your logger (I think you can use some colon syntax to target the named logger?)

Rajatsharma (Mon, 10 Aug 2020 19:13:17 GMT):
Okay let me try that .

Rajatsharma (Mon, 10 Aug 2020 19:14:32 GMT):
No still not working.

mahoney1 (Tue, 11 Aug 2020 08:46:05 GMT):
Have you tried to increase the values (eg 600) in your docker-compose file? The main exported peer variable/setting is CORE_CHAINCODE_EXECUTETIMEOUT=600s but if that doesn't help, try CORE_CHAINCODE_STARTUPTIMEOUT=600s and CORE_CHAINCODE_DEPLOYTIMEOUT=600s

RafaelAPB (Tue, 11 Aug 2020 09:00:48 GMT):
will try, thanks

RafaelAPB (Tue, 11 Aug 2020 09:17:06 GMT):
@mahoney1 unfortunately, it does not work. I've added those env vars to docker-compose-test-net.yaml

dachrillz (Tue, 11 Aug 2020 09:27:21 GMT):
Has joined the channel.

dachrillz (Tue, 11 Aug 2020 09:29:03 GMT):
Hello all! I noticed that when I initiate a chaincode contract the 'init invocation' adds an item to the ledger. Namely, ``` [ { "Key": "\u0000􏿿initialized", "Record": 1 } ] ``` Anyone has any idea what this is? Thanks in advance

RafaelAPB (Tue, 11 Aug 2020 10:02:46 GMT):
Logs from the orderer: https://gist.github.com/RafaelAPB/4ff52c2f6cb561a481c20cf072d59641

RafaelAPB (Wed, 12 Aug 2020 12:08:40 GMT):
Any suggestoin?

Rachit-gaur (Wed, 12 Aug 2020 19:31:12 GMT):
How can I make sure that if org1 has user1, org2 should not register user1?

jtonline (Thu, 13 Aug 2020 10:28:48 GMT):
Hi @dachrillz, I think it's related to the v2 lifecycle init required functionality https://github.com/hyperledger/fabric/blob/c799dcc188d76c5d3f3e2cdab931f30a00273d17/core/chaincode/chaincode_support.go#L28

dachrillz (Thu, 13 Aug 2020 11:31:29 GMT):
Nice! Thanks :)

pouya (Mon, 17 Aug 2020 07:19:11 GMT):
Has joined the channel.

riteek21 (Tue, 18 Aug 2020 02:01:53 GMT):
You don't every organization user is provided with a unique digital certificate from the CA.

Priya.P (Tue, 18 Aug 2020 10:34:18 GMT):
Has joined the channel.

rthatcher (Thu, 20 Aug 2020 14:18:52 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

SpecialAgentCooper (Thu, 20 Aug 2020 15:42:19 GMT):
Following on from the community call, could someone give a use case for State-Based Endorsement (see https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-sbe )? I'm struggling to think of a reason to enforce this at the endorsement level rather than just checking the MSP of the transaction proposer from within the chaincode itself.

SpecialAgentCooper (Thu, 20 Aug 2020 15:46:04 GMT):
Further to this, what was the motivation to move to more abstract samples? Personally, I liked the 'real world' use cases of the old samples. Perhaps it's just a failure of imagination, but I'm struggling to think of contexts where I would actually want to use some of the features showcased by the new samples.

sadalmelik828 (Fri, 21 Aug 2020 00:12:06 GMT):
Has joined the channel.

RafaelAPB (Fri, 21 Aug 2020 01:37:35 GMT):
Update: I'm sure the issue is because I'm trying to install the chaincode behind a VPN. But I can't figure a way to solve it

lamnguyen (Fri, 21 Aug 2020 11:07:02 GMT):
Has joined the channel.

jcldnatv (Sat, 22 Aug 2020 17:24:54 GMT):
Has joined the channel.

SpecialAgentCooper (Mon, 24 Aug 2020 09:35:40 GMT):
Does no one want to discuss this? @bestbeforetoday any thoughts?

bestbeforetoday (Tue, 25 Aug 2020 09:18:48 GMT):
I'm not an expert in this area so hopefully somebody with better knowledge will reply too

bestbeforetoday (Tue, 25 Aug 2020 09:18:52 GMT):
The docs suggest that state-based (or key-based) endorsement policies can be less restrictive than the chaincode or collection-based endorsement policy, which I guess is something you could not achieve with programmatic enforcement in chaincode implementation, since transactions would still need to meet those default endorsement policies: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#validation

bestbeforetoday (Tue, 25 Aug 2020 09:20:49 GMT):
I guess the policy changes will be recorded on the ledger so are retained historically even if chaincode implementations and their programmatic enforcement are updated over time

bestbeforetoday (Tue, 25 Aug 2020 09:28:42 GMT):
And perhaps it avoids any concerns over different chaincode implementations providing consistent enforcement?

bestbeforetoday (Tue, 25 Aug 2020 09:29:27 GMT):
There might be some rationale in the documentation associated with the Jira: https://jira.hyperledger.org/browse/FAB-8812

RafaelAPB (Tue, 25 Aug 2020 13:17:04 GMT):
I'm trying to instantiate a node chaincode behind a proxy. I understand I have to set the npm proxy env variables inside the chaincode container, but how to do that before the container is instantiated?

RafaelAPB (Tue, 25 Aug 2020 13:17:04 GMT):

RafaelAPB (Tue, 25 Aug 2020 17:37:20 GMT):
Do we have the " - CORE_CHAINCODE_NODE_RUNTIME" variable that can be set at the docker file to parametrize the runtime environment (with a custom image)?

ysai (Tue, 25 Aug 2020 23:11:45 GMT):
Hi everyone, does anyone have experience testing Typescript chaincode? My Fabric 2.2 chaincode uses a custom transaction context by overriding the `createContext()` method of `Contract` class. However, during test, I want to use a test context instead of the one created by `createContext()`, because the testContext is able to act as different test users and load test states. Currently I tried to stub `createContext() using `sinon.stub(contract, 'createContext').returns(testCtx);`. But from the log I can still see the original `createContext()` being called. How can I substitute the custom context with a test context? Any help would be much appreciated!

ysai (Tue, 25 Aug 2020 23:11:45 GMT):
Hi everyone, does anyone have experience testing Typescript chaincode? My Fabric 2.2 chaincode uses a custom transaction context by overriding the `createContext()` method of `Contract` class. However, during test, I want to use a test context instead of the one created by `createContext()`, because the testContext is able to act as different test users and load test states. Currently I tried to stub `createContext() using `sinon.stub(contract, 'createContext').returns(testCtx);`. But from the log I can still see the original `createContext()` being called. How can I substitute the custom context with a test context? Any help would be much appreciated!

ysai (Tue, 25 Aug 2020 23:11:45 GMT):
Hi everyone, does anyone have experience testing Typescript chaincode? My Fabric 2.2 chaincode uses a custom transaction context by overriding the `createContext()` method of `Contract` class. However, during test, I want to use a test context instead of the one created by `createContext()`, because the testContext is able to act as different test users and load test states. Currently I tried to stub `createContext()` using `sinon.stub(contract, 'createContext').returns(testCtx);`. But from the log I can still see the original `createContext()` being called. How can I substitute the custom context with a test context? Any help would be much appreciated!

TanguyLaucournet (Thu, 27 Aug 2020 09:47:21 GMT):
Has joined the channel.

Paradox-AT (Thu, 27 Aug 2020 22:30:25 GMT):
Hey Guys, I was trying to query data with the 2.2 network but after getting all the data when it is returning the value I am getting: Error creating blockit chaincode: Cannot use metadata. Metadata did not match schema: 1. components.schemas.AssessmentReasons.required: Array must have at least 1 items 2. components.schemas.MetaData.required: Array must have at least 1 items 3. components.schemas.RiskAssessment.required: Array must have at least 1 items 4. components.schemas.User.required: Array must have at least 1 items% ``` Anyone have any idea how to solve it? ```

Paradox-AT (Thu, 27 Aug 2020 22:30:25 GMT):
Hey Guys, ``` I was trying to query data with the 2.2 network but after getting all the data when it is returning the value I am getting: Error creating blockit chaincode: Cannot use metadata. Metadata did not match schema: 1. components.schemas.AssessmentReasons.required: Array must have at least 1 items 2. components.schemas.MetaData.required: Array must have at least 1 items 3. components.schemas.RiskAssessment.required: Array must have at least 1 items 4. components.schemas.User.required: Array must have at least 1 items% ``` Anyone have any idea how to solve it? ```

Paradox-AT (Thu, 27 Aug 2020 22:30:25 GMT):
Hey Guys, ``` I was trying to query data with the 2.2 network but after getting all the data when it is returning the value I am getting: Error creating blockit chaincode: Cannot use metadata. Metadata did not match schema: 1. components.schemas.AssessmentReasons.required: Array must have at least 1 items 2. components.schemas.MetaData.required: Array must have at least 1 items 3. components.schemas.RiskAssessment.required: Array must have at least 1 items 4. components.schemas.User.required: Array must have at least 1 items% ``` Anyone have any idea how to solve

Paradox-AT (Thu, 27 Aug 2020 22:30:25 GMT):

bestbeforetoday (Fri, 28 Aug 2020 09:20:36 GMT):
You asked exactly the same question in the #fabric-questions channel and there is a thread of conversation there: https://chat.hyperledger.org/channel/fabric-questions?msg=3uZid5xTT82uDqcKC

Paradox-AT (Fri, 28 Aug 2020 10:38:28 GMT):
Yeah I posted it here as well because I thought the problem is from the chaincode part

bestbeforetoday (Fri, 28 Aug 2020 10:39:52 GMT):
This is a good place to post it but it's not good to have two separate threads in different channels answering the same question. I want to direct any follow-up conversation to the existing thread to keep it in one place

Paradox-AT (Fri, 28 Aug 2020 10:49:25 GMT):
okay

RafaelAPB (Fri, 28 Aug 2020 12:31:38 GMT):
Has left the channel.

ItaloCarrasco (Fri, 28 Aug 2020 19:11:13 GMT):
hello everyone, i have some doubts about the chaincode, to commit and invoke it from the cli some tls certs of the peers that will endorse the transaction need to be passed on to the command, the point is when the network is distributed in multiple hosts each org has its own cli, those cli need access to these files, this allows anyone with access to the cli to invoke the chaincode with its own data, isnt this like super insecure?

crestrer (Sat, 29 Aug 2020 15:57:19 GMT):
Has joined the channel.

mahoney1 (Thu, 03 Sep 2020 13:53:49 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

mholdmann (Thu, 03 Sep 2020 16:44:01 GMT):
Good morning everyone, I hope all are healthy and safe. I am sharing our post from the Hyperledger telegram channel. Please comment, ask questions, we are a small team presently and will do best to reply as soon as possible
 
We are releasing the first 2 videos of our eXtensible Blockchain Object Model (XBOM) running on Hyperledger Fabric. The first video is a Functional Overview of XBOM, a first class object model architecture, running on Hyperledger and loading new class object dynamically on a functioning Hyperledger Fabric network. These are technical videos and geared to the #developer #engineer community. I would ask all of my business side contacts that are involved in projects that utilize #blockchain #hyperledger #smartcontracts to request your technical teams to review and comment on the technology. Please comment, ask questions, we are a small team presently and will do best to reply as soon as possible. https://youtu.be/2P37UmQpI3g

mholdmann (Thu, 03 Sep 2020 16:44:14 GMT):
Prasaga, CTO David Beberman presents Class and Object concepts in XBOM, Prasaga’s next paradigm for managing smart contracts on the blockchain. https://youtu.be/pqrhkCvVfK0

mholdmann (Sat, 05 Sep 2020 16:06:08 GMT):
Good Morning, as we move through XBOM development, we are happy to update the community on our latest capability @Prasagaofficial video #3 - The Class Object Inspect method #XBOM returns #JSON #schema for methods & argument types of class & ancestor classes of XBOM object, enables dynamic interaction w/ XBOM objects Please feel free to review and comment. We are looking for PoC opportunities now to developer class trees on hyperledger Fabric. https://youtu.be/x_FnXb6u3b8

mholdmann (Sat, 05 Sep 2020 16:06:08 GMT):
Good Morning, as we move through XBOM development, we are happy to update the community on our latest capability @Prasagaofficial video #3 - The Class Object Inspect method #XBOM returns #JSON #schema for methods & argument types of class & ancestor classes of XBOM object, enables dynamic interaction w/ XBOM objects Please feel free to review and comment. We are looking for PoC opportunities now to develop class trees on hyperledger Fabric. https://youtu.be/x_FnXb6u3b8

Jakeeyturner (Mon, 07 Sep 2020 10:10:09 GMT):
Has joined the channel.

jorgeRodriguez (Tue, 08 Sep 2020 02:51:03 GMT):
Has joined the channel.

krabradosty (Tue, 08 Sep 2020 10:16:44 GMT):
Hi. When I'm trying to get contract-api go pacckage with command `go get github.com/hyperledger/fabric-contract-api-go@v1.1.0`, I'm getting this error: ``` verifying github.com/cucumber/godog@v0.8.0/go.mod: checksum mismatch downloaded: h1:FQ2MobPXycdSajAK3inNgLSAKGFmZqbE4S/CExz41Ys= sum.golang.org: h1:Cp3tEV1LRAyH/RuCThcxHS/+9ORZ+FMzPva2AZ5Ki+A= SECURITY ERROR This download does NOT match the one reported by the checksum server. The bits may have been replaced on the origin server, or an attacker may have intercepted the download attempt. For more information, see 'go help module-auth' ``` Any idea why?

krabradosty (Tue, 08 Sep 2020 10:16:44 GMT):
Hi. When I'm trying to get contract-api go package with command `go get github.com/hyperledger/fabric-contract-api-go@v1.1.0`, I'm getting this error: ``` verifying github.com/cucumber/godog@v0.8.0/go.mod: checksum mismatch downloaded: h1:FQ2MobPXycdSajAK3inNgLSAKGFmZqbE4S/CExz41Ys= sum.golang.org: h1:Cp3tEV1LRAyH/RuCThcxHS/+9ORZ+FMzPva2AZ5Ki+A= SECURITY ERROR This download does NOT match the one reported by the checksum server. The bits may have been replaced on the origin server, or an attacker may have intercepted the download attempt. For more information, see 'go help module-auth' ``` Any idea why?

schinivision (Tue, 08 Sep 2020 12:17:19 GMT):
Has joined the channel.

schinivision (Tue, 08 Sep 2020 12:18:12 GMT):
Hi Guys. I hope someone can point me in the correct direction. In Particular... is there a limit on how large a history (number of entries) of a key can get? I am kind of irritated of a "magic" number (100k entries in history).. I am somehow stuck on where to look for or in what kind of limitation I am running into? stub.GetHistoryForKey will only return 100k of entries within the iterator.. Am I doing something wrong or am I hitting any sort of limit that I am not aware of? Btw. I am on Hyperledger 1.3

BrettLogan (Tue, 08 Sep 2020 12:35:40 GMT):
Has joined the channel.

BrettLogan (Tue, 08 Sep 2020 12:35:55 GMT):
This setting is configured in core.yaml: https://github.com/hyperledger/fabric/blob/master/sampleconfig/core.yaml#L620

BrettLogan (Tue, 08 Sep 2020 12:36:31 GMT):
What version of go are you running `go version`

schinivision (Tue, 08 Sep 2020 13:04:51 GMT):
@BrettLogan Thanks for the hint. Do you also know if you can query the history in reverse order. Basically stating give me the last 100k entries and not "from the beginning of time" Or make it a sort of sliding window?

krabradosty (Tue, 08 Sep 2020 15:17:24 GMT):
@BrettLogan I've tried with go1.15 darwin/amd64 and go1.13.15 darwin/amd64 on macOS 10.15.5

BrettLogan (Tue, 08 Sep 2020 15:24:27 GMT):
Are you using Go Modules for your chaincode

schinivision (Wed, 09 Sep 2020 12:27:18 GMT):
Hi. Is there any possibility to query the history with pagination to overcome the totalQueryLimit? How to extract a History that is above the totalQueryLimit? Is there any other way? Because raising the limit will only postpone the problem not solve it?

krabradosty (Thu, 10 Sep 2020 18:44:53 GMT):
@BrettLogan Sorry for delay. Yes, go modules for dependancy management

saiteja12 (Thu, 10 Sep 2020 19:13:09 GMT):
Has joined the channel.

saiteja12 (Thu, 10 Sep 2020 19:13:10 GMT):
I have a quick question i am new to hyper ledger fabric , I started learning hyper ledger fabric 2 weeks before and i have learned a little bit my question is I am using the asset-transfer-baic module provided by the hyper ledger fabric and I am following the docs provided by the hyper ledger fabric.org and I was able to query all the aasests (which are written in assest-transfer-basic module)from the ledger and transfer the ownership of the assests but my question is whether this operations and update of this ledger will be recorded in the blockchain? my second question is can we write some data into the block chain using hyper ledger fabric and check whether that data is in the blockchain?

ascatox (Fri, 11 Sep 2020 12:27:01 GMT):
Hi All! Someone knows if it's possible to develop some kind of interceptors, in order to execute some logic in a a transparent way in each chaincode method, importing a go lib or something of similar?

dbeberman (Sat, 12 Sep 2020 18:27:54 GMT):
Has joined the channel.

dbeberman (Sat, 12 Sep 2020 18:35:06 GMT):
@ascatox We are in the middle of doing a first PoC for implementing an object-oriented, on-chain system that uses Golang. This is known as a first-class object model, using a class manager infrastructure. The classes are written in Golang and are compiled as plugin shared libraries. The plugins are then dynamically loaded as needed by each peer. The class objects and ordinary objects state are all stored on the blockchain. This uses late dynamic binding. When you send a message to an object either from a client or from other class code, message to method resolution using the class inheritance tree determines which method is run. You can send any message to any object, although the object's class and ancestor classes may not handle the message, which just results in a not implemented error return.

dbeberman (Sat, 12 Sep 2020 18:35:36 GMT):
The product is called the Extensible Blockchain Object Model (XBOM).

dbeberman (Sat, 12 Sep 2020 18:36:27 GMT):
We are working right now on getting together a minimal development environment for people to expirement with using the test-network model for Hyperledger Fabric.

dbeberman (Sat, 12 Sep 2020 18:36:47 GMT):
Maybe something like what you are looking for?

lquintai (Mon, 14 Sep 2020 08:15:17 GMT):
Has joined the channel.

ascatox (Mon, 14 Sep 2020 08:50:11 GMT):
It may be very useful for my goal!!!

ascatox (Mon, 14 Sep 2020 08:52:03 GMT):
Could you give me some link to discover something about XBOM?

ascatox (Mon, 14 Sep 2020 08:52:03 GMT):
Could you give me some links to discover something about XBOM?

ascatox (Mon, 14 Sep 2020 15:44:28 GMT):
Is it possible to create a your own [grpc Interceptor](https://www.blog.dsb.dev/2019/06/14/creating-grpc-interceptors-in-go.html) and attach it to the grpc server running in the peer?

mholdmann (Mon, 14 Sep 2020 21:21:14 GMT):
The first video is a Functional Overview of XBOM, a first class object model architecture, running on Hyperledger and loading new class object dynamically on a functioning Hyperledger Fabric network. https://youtu.be/2P37UmQpI3g

mholdmann (Mon, 14 Sep 2020 21:21:14 GMT):
Hi @ascatox I am Michael Holdmann CEo at Prasaga, here are the 3 relevant links. The first video is a Functional Overview of XBOM, a first class object model architecture, running on Hyperledger and loading new class object dynamically on a functioning Hyperledger Fabric network. https://youtu.be/2P37UmQpI3g

mholdmann (Mon, 14 Sep 2020 21:21:14 GMT):
Hi @ascatox I am Michael Holdmann CEO at Prasaga, here are the 3 relevant links. The first video is a Functional Overview of XBOM, a first class object model architecture, running on Hyperledger and loading new class object dynamically on a functioning Hyperledger Fabric network. https://youtu.be/2P37UmQpI3g

mholdmann (Mon, 14 Sep 2020 21:21:30 GMT):
Prasaga, CTO David Beberman presents Class and Object concepts in XBOM, Prasaga’s next paradigm for managing smart contracts on the blockchain. https://youtu.be/pqrhkCvVfK0

mholdmann (Mon, 14 Sep 2020 21:21:42 GMT):
@Prasagaofficial video #3 - The Class Object Inspect method #XBOM returns #JSON #schema for methods & argument types of class & ancestor classes of XBOM object, enables dynamic interaction w/ XBOM objects Please feel free to review and comment. We are looking for PoC opportunities now to develop class trees on hyperledger Fabric. https://youtu.be/x_FnXb6u3b8

vishnupradeepmahe (Tue, 15 Sep 2020 12:12:20 GMT):
@theledger/fabric-mock-stub npm package did the work for me dont know if it might help anyone :innocent:

schinivision (Wed, 16 Sep 2020 07:44:01 GMT):
Hi can someone help me with this error message. My iterator for key history dies within the hasNext() method with this error and I have no idea how to interpret this or how to fix it ` QUERY_STATE_NEXT failed: transaction ID: e4371f586c6ab9d54c3a5b9158638913d4fd632bb6e6ee3ae6b7afb95027460c: no ledger context`

vineeta (Wed, 16 Sep 2020 09:23:49 GMT):
Has joined the channel.

mahoney1 (Thu, 17 Sep 2020 11:14:39 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

mahoney1 (Thu, 17 Sep 2020 15:00:32 GMT):
@rjones why is https://zoom.us/my/hyperledger.community asking for meeting password?

rjones (Thu, 17 Sep 2020 15:00:32 GMT):
Has joined the channel.

SpecialAgentCooper (Thu, 17 Sep 2020 15:02:39 GMT):
does anyone have the password for the call? is it written anywhere?

jmason900 (Thu, 17 Sep 2020 15:06:33 GMT):
what's the meeting password ?? It's not in the invite

rjones (Thu, 17 Sep 2020 15:18:20 GMT):
https://zoom.us/my/hyperledger.community?pwd=THVoQXVHYUVWbHIwOFdvME0xN0lCZz09

rjones (Thu, 17 Sep 2020 15:18:43 GMT):
this is a change from Zoom - not sure why it's rolled out here, it's supposed to be the 25th

rjones (Thu, 17 Sep 2020 15:19:53 GMT):
@jmason900 @SpecialAgentCooper @mahoney1 ^^^

jmason900 (Thu, 17 Sep 2020 15:24:31 GMT):
agree that was supposed to be the date Zoom started meeting passwords. maybe we are a "secret pilot" .. LOL

mahoney1 (Thu, 17 Sep 2020 15:25:16 GMT):
ok all - so the meeting is open now - password is THVoQXVHYUVWbHIwOFdvME0xN0lCZz09 when prompted

mahoney1 (Thu, 17 Sep 2020 15:30:12 GMT):
FYI a recording of today's call will be available at the usual wiki page https://wiki.hyperledger.org/pages/viewpage.action?pageId=6423554

mbwhite (Fri, 18 Sep 2020 13:18:49 GMT):
[ANN] We've formally released the Tech Preview of the Rust Smart Contracts and Wasm Chaincode Today; read more here https://lists.hyperledger.org/g/fabric/message/9031 and watch the demo https://www.youtube.com/watch?v=9QChDsuKwgc&feature=youtu.be

amolpednekar (Mon, 21 Sep 2020 06:35:20 GMT):
There is a function in the the *asset-transfer-private-data* chaincode which checks whether clientMSP matches peerMSP, and returns and error response if there is no match https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561 I had a endorsment policy of Org1 AND Org2 MSP for this, which failed when the check happened ( I was sending the transaction from an Org1 client). But when I removed this check from the chaincode, it passed. memberOnlyRead & memberOnlyRead for the corresponding PDC was set to `true` Can someone tell how this function is different from what memberOnlyRead/memberOnlyWrite property in collections config does?

amolpednekar (Mon, 21 Sep 2020 06:35:20 GMT):
There is a function in the the *asset-transfer-private-data* chaincode which checks whether clientMSP matches peerMSP, and returns and error response if there is no match https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561 I had a endorsment policy of Org1 AND Org2 MSP for this, which failed when the check happened ( I was sending the transaction from an Org1 client). But when I removed this check from the chaincode, it passed. memberOnlyRead & memberOnlyRead for the corresponding PDC was set to `true` Can someone tell how this function is different from what memberOnlyRead/memberOnlyWrite property in collections config (https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#private-data-collection-definition) does?

amolpednekar (Mon, 21 Sep 2020 06:35:20 GMT):
There is a function in the the *asset-transfer-private-data* chaincode which checks whether clientMSP matches peerMSP, and returns and error response if there is no match https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561 I had a endorsment policy of `AND(Org1MSP, Org2MSP)` for this, which failed when the check happened ( I was sending the transaction from an Org1 client). But when I removed this check from the chaincode, it passed. memberOnlyRead & memberOnlyRead for the corresponding PDC was set to `true` Can someone tell how this function is different from what memberOnlyRead/memberOnlyWrite property in collections config (https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#private-data-collection-definition) does?

amolpednekar (Mon, 21 Sep 2020 06:35:20 GMT):
There is a function in the the *asset-transfer-private-data* chaincode which checks whether clientMSP matches peerMSP, and returns and error response if there is no match https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561 I had a endorsment policy of `AND(Org1MSP, Org2MSP)` for this, which failed when the check happened ( I was sending the transaction from an Org1 client). But when I removed this check from the chaincode, it passed. memberOnlyRead & memberOnlyRead for the corresponding PDC was set to `true` Can someone tell how this function is different from what memberOnlyRead/memberOnlyWrite property in collections config (https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#private-data-collection-definition) does? Update: Think I answered this myself => memberOnlyWrite allows anyone from collection to write PDC data, whereas the check in the CC enforces that only THAT specific org's member is allowed to invoke that chaincode on that org.

erin-hughes (Mon, 21 Sep 2020 07:56:36 GMT):
Has joined the channel.

FarhanShafiq (Mon, 21 Sep 2020 09:43:05 GMT):
Hey, Is there anyway to fetch publicKey from certificate inside the chaincode?

mvkillu (Tue, 22 Sep 2020 15:37:44 GMT):
Has joined the channel.

seanyoung (Tue, 22 Sep 2020 16:23:36 GMT):
Has joined the channel.

seanyoung (Tue, 22 Sep 2020 16:27:31 GMT):
Hello, I'm just looking at the wasm chaincode tech preview. I'm interested to see if I can compile Solidity to wasm chaincode using my Solang project, see https://solang.readthedocs.io/en/latest/ My first observation is that wapc is quite a complex protocol for fairly simple functions (like get state and put state). Plain wasm functions get_state and put_state would make it much easier to implement for Solang.

jdo1 (Wed, 23 Sep 2020 06:30:48 GMT):
Has joined the channel.

mbwhite (Wed, 23 Sep 2020 07:25:29 GMT):
Hello, thanks for taking look at the preview... We went with waPC as the import export functions from host-wasm could only pass integers, anything more complex would need some data handling and data marshalling. We could have written this ourself, but decided to go with a solution already written. It's true there are plans for additions to Wasm, that would help here in the future.. More than happy to discuss further

mbwhite (Wed, 23 Sep 2020 07:29:02 GMT):
My first question would be - how does solang cross the boundary between wasm and the host?

seanyoung (Wed, 23 Sep 2020 07:48:52 GMT):
solang is a compiler which can target different chains, so it can do whatever is required. Currently it works with ewasm, sawtooth, and substrate. These chains use their own data marshalling, call "abi encoded" for ethereum or SCALE codec for Substrate.

mbwhite (Wed, 23 Sep 2020 07:52:10 GMT):
where's the best place to look to get an idea how this works and how it could be fitted in ?

seanyoung (Wed, 23 Sep 2020 08:05:55 GMT):
we could do a call and discuss this

mbwhite (Wed, 23 Sep 2020 08:06:12 GMT):
sounds good...

mbwhite (Wed, 23 Sep 2020 08:06:46 GMT):
I've got a webex address would that work?

mbwhite (Wed, 23 Sep 2020 08:08:01 GMT):
have sent you a dm

james604 (Thu, 24 Sep 2020 10:31:20 GMT):
Has joined the channel.

pkirkinezis (Tue, 29 Sep 2020 12:45:24 GMT):
Has joined the channel.

pkirkinezis (Tue, 29 Sep 2020 12:45:25 GMT):
Hi to the team . I would like to ask a question . I currently developing a go smart contract couch db . How is it possible to sort with a specific column ? For example i have a document with id, date, sum. I would like to make a sorting with date . Is that possible ?

pkirkinezis (Tue, 29 Sep 2020 12:48:28 GMT):
When i user "sort":[{"creationDate":"desc"}]} is says that "error handling CouchDB request. Error:no_usable_index, Status Code:400, Reason:No index exists for this sort, try indexing by the sort fields."

pkirkinezis (Tue, 29 Sep 2020 12:50:31 GMT):
My total query is "{"selector":{"_id": {"$gt":null},"docType":{"$eq":"receivable"},"BuyerVAT":{"$eq":"11234234"}},"sort":[{"date":"desc"}]}"

davidkel (Tue, 29 Sep 2020 13:21:20 GMT):
As the error says, you need an index before you can sort fields. This page in the fabric documentation should help you https://hyperledger-fabric.readthedocs.io/en/release-2.2/couchdb_tutorial.html?highlight=rich%20query%20index#create-an-index

pkirkinezis (Tue, 29 Sep 2020 14:00:18 GMT):
So i have to create indexes and place them to metadata folder ?

pkirkinezis (Tue, 29 Sep 2020 14:01:21 GMT):
Fo the folder META-INF/statedb/couchdb/indexes I have to manually create it ?

davidkel (Tue, 29 Sep 2020 15:14:20 GMT):
yep you will need to understand couchdb indexes, implement them, place them in the right directory location and ensure you package them into your chaincode package (I assume they are still part of the chaincode package for 2.2. But I'm not familiar yet with 2.2 chaincode packaging and life-cycle)

pkirkinezis (Tue, 29 Sep 2020 18:01:21 GMT):
I will try to package it with chaincode

Fabricuser (Wed, 30 Sep 2020 11:45:02 GMT):
Has joined the channel.

charyorde (Wed, 30 Sep 2020 16:05:54 GMT):
Hello, why dont we have enough DeFi examples in fabric chaincode?

rthatcher (Thu, 01 Oct 2020 13:10:33 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

jtonline (Fri, 02 Oct 2020 14:21:51 GMT):
Hi, has anyone tried out the Wasm tech preview by writing a Rust contract from scratch at all? I'm interested in feedback about returning `Result` from transaction functions. Specifically I'm wondering if the custom `ContractError` type is the right thing to do here. It seems like it could make handling errors in the transaction function more awkward but I'm still new to Rust so very interested to here whether there are better ways it could be done. Thanks! (Any other feedback about the tech preview is also very welcome!)

pkirkinezis (Sun, 04 Oct 2020 16:11:24 GMT):
is there a SUM sql command for couch db to use it on my chaincode?

braduf (Mon, 05 Oct 2020 21:05:36 GMT):
Hi all, I have always used the mocks in shimtest to unit test my chaincode in Go. But I just noticed the following comment in the package: ``` // Deprecated: ShimTest will be removed in a future release. // Future development should make use of the ChaincodeStub Interface // for generating mocks ``` Does this mean the chaincode packages will not include any mocks anymore in the future? And does anyone knows the reason or the problems with the mocks in shimtest because of which they will be deprecated? Just to not repeat the same in my own mocks of the ChaincodeStubInterface... Thanks a lot!

braduf (Mon, 05 Oct 2020 21:05:36 GMT):
Hi all, I have always used the mocks in shimtest to unit test my chaincode in Go. But I just noticed the following comment in the package: ``` // Deprecated: ShimTest will be removed in a future release. // Future development should make use of the ChaincodeStub Interface // for generating mocks ``` Does this mean the chaincode packages will not include any mocks anymore in the future? And does anyone know the reason or the problems with the mocks in shimtest because of which they will be deprecated? Just to not repeat the same in my own mocks of the ChaincodeStubInterface... Thanks a lot!

adambach (Tue, 06 Oct 2020 01:54:14 GMT):
Has joined the channel.

mholdmann (Tue, 06 Oct 2020 17:25:52 GMT):
*Prasaga Major Milestone Announcement* Prasaga team is proud to release XBOM Development Environment & TestNet on Hyperledger Fabric. To register account, accept dev. license and access XBOM repositories XBOM.io. once registered- Gitlab access Xbom.io/resources 2 video tutorials for overview of environment: Xbom.io/documentation XBOM-DEV-QUICKSTART Instructional walk-through on how to set up the developer environment which sets up hyperledger test network with XBOM and the necessary code for creating and adding classes, objects and accounts dynamically to the functioning hyperledger network. XBOM-DEV-Class Build Tutorial 1 eXtensible Blockchain Object Model (XBOM) Class Build Tutorial 1- Build path what it takes to compile code, have ready to dynamically load by Class Manager Infrastructure. Xbom.io/overview Other videos detailing XBOM: - XBOM Video 1 - Functional overview of XBOM   - XBOM Video 2 - Class and object concepts in XBOM - XBOM Video 3 - Class Object Inspector We have set up a telegram developer group https://t.me/joinchat/GudkRlQFFK7jPhD2ywYWAw for support interaction with the prasaga dev team. Look forward to engage w/incredible projects built w/ XBOM & #hyperledger across #Supplychain, #Fintech, #Regtech, #Healthcare....#blockchain #smartcontracts

kingaj (Wed, 07 Oct 2020 19:11:36 GMT):
Has joined the channel.

kingaj (Wed, 07 Oct 2020 19:13:01 GMT):
newbie question: running the tutorial from fabric-chaincode-api-go ... the docker cli process keeps crashing (running on Windows 10 / WSL)

kingaj (Wed, 07 Oct 2020 19:13:01 GMT):
newbie question: running the tutorial from fabric-chaincode-api-go ... the docker cli process keeps crashing (running on Windows 10 / WSL) - help!

kingaj (Wed, 07 Oct 2020 19:20:53 GMT):
answered it: just use `docker-compose -f docker-compose-simple.yaml up -d cli`

kingaj (Wed, 07 Oct 2020 19:23:19 GMT):
nope - still dies right way

kingaj (Wed, 07 Oct 2020 19:53:03 GMT):
script.sh needs to be converted - seems to be a dos file - `dos2unix script.sh`

SasinduFdo (Fri, 09 Oct 2020 09:45:57 GMT):
Has joined the channel.

lzev (Sun, 11 Oct 2020 01:50:40 GMT):
Has joined the channel.

anweiss (Mon, 12 Oct 2020 14:56:08 GMT):
Has joined the channel.

anweiss (Mon, 12 Oct 2020 14:56:08 GMT):
hey all ... I'm using the `fabric-contract-api-go` SDK to implement a contract, but if I update the data model for the contract, when I attempt to query transactions that were previously committed using the old model, I get all kinds of `Additional property is not allowed` and `,omitempty is required` errors ... is there a trick to disregard these schema errors for old transactions?

mbwhite (Mon, 12 Oct 2020 14:57:25 GMT):
hello!

mbwhite (Mon, 12 Oct 2020 14:57:59 GMT):
So what approach are you taking for structuring the data? The errors you're getting - where are they coming from?

anweiss (Mon, 12 Oct 2020 14:58:24 GMT):
hey hey! so I have a pretty basic contract object .. per instructions at https://github.com/hyperledger/fabric-contract-api-go/blob/master/tutorials/managing-objects.md#defining-an-object

anweiss (Mon, 12 Oct 2020 14:58:57 GMT):
I also have `contract-metadata/metadata.json` which describes the schema for the object

mbwhite (Mon, 12 Oct 2020 14:59:38 GMT):
are these errors coming from when you get data out of the ledger?

anweiss (Mon, 12 Oct 2020 14:59:46 GMT):
correct

anweiss (Mon, 12 Oct 2020 14:59:50 GMT):
when evaluating a transaction

anweiss (Mon, 12 Oct 2020 14:59:53 GMT):
`[10/12/2020 10:52:19 AM] [ERROR] Error evaluating transaction: Error handling success response. Value did not match schema:`

mbwhite (Mon, 12 Oct 2020 15:01:31 GMT):
ok; admit that I'm not familiar with the JSON marshalling in Go, but I suspect that in this case it's not tolerant of the missing properties

mbwhite (Mon, 12 Oct 2020 15:01:54 GMT):
I know you can write your own to handle the data...

mbwhite (Mon, 12 Oct 2020 15:02:35 GMT):
accept that we do need to make some docs clearer on the limits of what can be done - and how to move from one model to the next...

mbwhite (Mon, 12 Oct 2020 15:02:46 GMT):
can be tricky to solve..

anweiss (Mon, 12 Oct 2020 15:03:05 GMT):
yea ... that's what I'm trying to figure out ... how to override the default schema validation behavior, but to your point, it's not clear from the `fabric-contract-api-go` docs how to do that

mbwhite (Mon, 12 Oct 2020 15:04:49 GMT):
Better brush up on my go... unless @awjh is around ?

awjh (Mon, 12 Oct 2020 15:14:22 GMT):
I am! So validation of the schema occurs during the serialization process. The standard serializer is the serializer.JSONSerializer which only validates when passed a non-nil paramMetadata value. I would suggest to bypass the validation create your own struct which meets the serializer.TransactionSerializer interface and have the methods of it return a call to the same method of JSONSerializer but passing nil instead of the paramMetadata value. To assign your custom serializer, after getting the value back from NewChaincode set the TransactionSerializer property of the returned value to be your custom serializer

awjh (Mon, 12 Oct 2020 15:18:36 GMT):
In the case of ToString on the JSONSerializer it is the returns that needs to be set to nil

awjh (Mon, 12 Oct 2020 15:18:36 GMT):
In the case of ToString on the JSONSerializer it is the returns that needs to be passed as nil

awjh (Mon, 12 Oct 2020 15:19:24 GMT):
https://github.com/hyperledger/fabric-contract-api-go/blob/4c6ff12b4f96acbfead9c83cfccf8b4f2161381a/serializer/json_transaction_serializer.go#L40

awjh (Mon, 12 Oct 2020 15:21:53 GMT):
On an aside is it possible to use in your model the `metadata: ", optional" tag on the property in your struct?

awjh (Mon, 12 Oct 2020 15:22:11 GMT):
If you have specced your own schema maybe remove the property from the required field?

anweiss (Mon, 12 Oct 2020 15:31:25 GMT):
this is very helpful thanks @awjh and @mbwhite! ...

anweiss (Mon, 12 Oct 2020 15:32:33 GMT):
with that being said, I'm assuming that the general process by which schemas should be updated so as not to impact previously committed transactions is to create a custom Serializer/Deserializer?

awjh (Mon, 12 Oct 2020 15:34:16 GMT):
Yes, I would suggest that, you would then be able to write custom validation of the schema since you will be given it so you could possibly use flags in your data to change the schema validation to run for different versions of the data

anweiss (Mon, 12 Oct 2020 15:36:41 GMT):
ok awesome ... let me give that a whirl

anweiss (Mon, 12 Oct 2020 15:39:15 GMT):
also, if I have custom contract metadata, is there a way to allow nil values?

anweiss (Mon, 12 Oct 2020 15:39:56 GMT):
so for example, my `metadata.json` allows for an array of `string` for a particular field ... but I still get `Invalid type. Expected: array, given: null` errors

awjh (Mon, 12 Oct 2020 15:40:56 GMT):
Hmm I am not sure around that actually, I guess it expects an empty array rather than null

awjh (Mon, 12 Oct 2020 15:41:10 GMT):
I'm sure I have seen someone mention this before but I'm not sure where

anweiss (Mon, 12 Oct 2020 15:41:29 GMT):
gotcha ... yea I guess I'm trying to use `metadata.json` to potentially get around having to write a custom serializer

anweiss (Mon, 12 Oct 2020 15:41:55 GMT):
if I can finagle the schema to support changes to the data model without impacting previously committed transactions

awjh (Mon, 12 Oct 2020 15:43:33 GMT):
Is the array field marked as optional in the metadata? I would say a required array cannot be null it must have a value and be the correct length, a slice could be null?

anweiss (Mon, 12 Oct 2020 15:44:36 GMT):
``` { "name": "fieldNames", "required": false, "schema": { "type": "array", "items": { "type": "string" } } } ```

awjh (Mon, 12 Oct 2020 15:45:06 GMT):
Is the corresponding Go property a slice or an array?

anweiss (Mon, 12 Oct 2020 15:45:28 GMT):
it's a slice ... `[]string`

awjh (Mon, 12 Oct 2020 15:46:15 GMT):
Hmm, I would expect that to be allowed to be null if not marked as optional. I wonder if the required part isn't being picked up

awjh (Mon, 12 Oct 2020 15:52:16 GMT):
If you run a getMetadata query is the returned JSON the same as your custom schema?

anweiss (Mon, 12 Oct 2020 16:17:23 GMT):
so I'm still getting the same validation errors even if I set `paramMetadata` and `returns` to nil

anweiss (Mon, 12 Oct 2020 16:17:40 GMT):
`,omitempty is required`

anweiss (Mon, 12 Oct 2020 16:17:53 GMT):
` is not allowed`

anweiss (Mon, 12 Oct 2020 16:19:09 GMT):
``` type CustomSerializer struct { *serializer.JSONSerializer } func (cs *CustomSerializer) FromString(param string, fieldType reflect.Type, paramMetadata *metadata.ParameterMetadata, components *metadata.ComponentMetadata) (reflect.Value, error) { return cs.JSONSerializer.FromString(param, fieldType, nil, components) } func (cs *CustomSerializer) ToString(result reflect.Value, resultType reflect.Type, returns *metadata.ReturnMetadata, components *metadata.ComponentMetadata) (string, error) { return cs.JSONSerializer.ToString(result, resultType, nil, components) } ```

anweiss (Mon, 12 Oct 2020 16:19:49 GMT):
``` chaincode, err := contractapi.NewChaincode(new(SmartContract)) chaincode.TransactionSerializer = new(CustomSerializer) ```

anweiss (Mon, 12 Oct 2020 17:09:20 GMT):
ok so I got this to work by removing all `",omitempty"`'s and `metadata:",optional"`'s

sijo.c (Tue, 13 Oct 2020 20:41:26 GMT):
how can I find the chaincode metadata from a running peer? `peer chaincode list --instantiated` did not return anything. I need to see the exact SmartContract name & func names running on the peer

mbwhite (Wed, 14 Oct 2020 08:30:32 GMT):
the actual contract metadata is returned by invoking a transaction... For example in the nodejs sdk ``` let data = await contract.evaluateTransaction('org.hyperledger.fabric:GetMetadata'); console.log(data.toString()); ```

seanyoung (Thu, 15 Oct 2020 11:59:44 GMT):
@mbwhite yesterdays wasm chaincode was very informative, thanks. Does a wasm contract have access to all the wasi host functions, including filesystem, time, and random?

mbwhite (Thu, 15 Oct 2020 12:01:43 GMT):
thanks... It should so yes; in the examples we've run wasi isn't there. but there's no reason it's limited.

seanyoung (Thu, 15 Oct 2020 12:03:31 GMT):
That makes wasm smart contracts non-deterministic.

seanyoung (Thu, 15 Oct 2020 12:03:45 GMT):
Is that a concern?

mbwhite (Thu, 15 Oct 2020 12:04:25 GMT):
the same exists today with any Fabric chaincode.. if you use random or call out to a rest endpoint say.

mbwhite (Thu, 15 Oct 2020 12:05:21 GMT):
if the contracts have different results they won't be committed to the eldger.

seanyoung (Thu, 15 Oct 2020 12:06:40 GMT):
With access to the filesystem, random sources, and network it is not secure either. I am not following what the design is. I thought the point of wasm was sandboxing? Why use wasm?

mbwhite (Thu, 15 Oct 2020 12:11:00 GMT):
today I don't think the wasi is there so they couldn't be accessed... To the point on secure, the trade-off fabric makes for using general purpose languages. Fabric will get the contracts run all the peers of all the organizations that are required to endorse the transactions. Random behaviour will cause that to fail... Fabric typically would only be exposed to organizations as well.

mbwhite (Thu, 15 Oct 2020 12:12:23 GMT):
as to why Wasm - well partly was could it be done? is it practical? would it extend the range of languages but without having lots of libraries.

seanyoung (Thu, 15 Oct 2020 12:15:32 GMT):
ok, thanks. That makes some sense. I guess this depends on all parties trusting each other enough not to submit dodgy transactions.

seanyoung (Thu, 15 Oct 2020 12:16:46 GMT):
I did want to make the other point that protobuf is non-deterministic, but I guess that is not important.

mbwhite (Thu, 15 Oct 2020 12:20:24 GMT):
but not trust each other enough to use a shared database :-) The endorsement policies are essential - plus individual keys / states can have their own policies. Non-deterministic serialization is a concern true - though in this particular case - this is only serialization over the network; Fabric works on the basis of read/write sets of the state changes.. this has to be deterministic.. otherwise you'll get failures in the same manner as if random numbers were used.

rthatcher (Thu, 15 Oct 2020 13:12:45 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

seanyoung (Thu, 15 Oct 2020 13:43:32 GMT):
Thank you for explaining this. So, only key/states are synced on the network, not transactions?

mbwhite (Thu, 15 Oct 2020 13:45:41 GMT):
Some details of the TX are synced... https://hyperledger-fabric.readthedocs.io/en/latest/readwrite.html has the major detail... not 100% confident I'll get it correct!

sichen (Thu, 15 Oct 2020 15:20:55 GMT):
Has joined the channel.

robmurgai (Thu, 15 Oct 2020 15:55:49 GMT):
Has joined the channel.

mholdmann (Fri, 16 Oct 2020 15:46:01 GMT):
Hello to everyone, we have had our first review of XBOM on Hyperledger and I wanted to share the conversation from our Telegram Developer Group Michael Holdmann prasaga.com/overview, [15.10.20 08:38] Here are some snippets of a conversation between @DavidBeberman and our community member @kctam from the s. KC has been doing a deep dive evaluation of our code, he is a amongst other things Hyperledger instructor. KC Tam, [13.10.20 23:36] @DavidBeberman I have tested both AWS Linux and Ubuntu Linux. They work. Just one part: in v2.0.0 branch, either XBOMVERSION changed to v2.0.0 or skip the line 82-84 as I have already checked out v2.0.0. KC Tam, [13.10.20 23:38] I can also see the state updated in couchdb and InitBootstrap and Invoke ObjectSend work as expected. David Beberman, [14.10.20 15:39] Next up - some additional methods for the XBOMContainer class - it needs an iterator over children capability, Some updates to the ClassClassFileLoader — although for this stage, going to stay with local filesystem plugin loading, will add HTTPS URL support at a later date. Would make sense to be able to pull from built plugins from locations like github.com in the future. We are also doing a simplified example of a swap pool. David Beberman, [14.10.20 17:19] thanks. had not used couchdb. Will have to take a look at the results too. Nice to know that worked. KC Tam, [14.10.20 17:36] I just double check the latest master branch. It works perfectly in Ubuntu. Now you can update the Readme to include Ubuntu as well. David Beberman, [14.10.20 17:37] thanks. I will be working on a doc on how to write new classes as well. KC Tam, [14.10.20 17:40] 👍 KC Tam, [15.10.20 08:06] with @DavidBeberman help (yes, hands-on is always the most effective way to learn), and those videos in the site (which are very condensed and informative), I start appreciating what XBOM is doing for platform like fabric. Interesting approach. Please do register at xbom.io and check out the videos and development environment, this completely changes Smart Contracts/Chaincode forever.

mholdmann (Fri, 16 Oct 2020 15:46:01 GMT):
Hello to everyone, we have had our first review of XBOM on Hyperledger and I wanted to share the conversation from our Telegram Developer Group Michael Holdmann prasaga.com/overview, [15.10.20 08:38] Here are some snippets of a conversation between @DavidBeberman and our community member @kctam. KC has been doing a deep dive evaluation of our code, he is a amongst other things Hyperledger instructor. KC Tam, [13.10.20 23:36] @DavidBeberman I have tested both AWS Linux and Ubuntu Linux. They work. Just one part: in v2.0.0 branch, either XBOMVERSION changed to v2.0.0 or skip the line 82-84 as I have already checked out v2.0.0. KC Tam, [13.10.20 23:38] I can also see the state updated in couchdb and InitBootstrap and Invoke ObjectSend work as expected. David Beberman, [14.10.20 15:39] Next up - some additional methods for the XBOMContainer class - it needs an iterator over children capability, Some updates to the ClassClassFileLoader — although for this stage, going to stay with local filesystem plugin loading, will add HTTPS URL support at a later date. Would make sense to be able to pull from built plugins from locations like github.com in the future. We are also doing a simplified example of a swap pool. David Beberman, [14.10.20 17:19] thanks. had not used couchdb. Will have to take a look at the results too. Nice to know that worked. KC Tam, [14.10.20 17:36] I just double check the latest master branch. It works perfectly in Ubuntu. Now you can update the Readme to include Ubuntu as well. David Beberman, [14.10.20 17:37] thanks. I will be working on a doc on how to write new classes as well. KC Tam, [14.10.20 17:40] 👍 KC Tam, [15.10.20 08:06] with @DavidBeberman help (yes, hands-on is always the most effective way to learn), and those videos in the site (which are very condensed and informative), I start appreciating what XBOM is doing for platform like fabric. Interesting approach. Please do register at xbom.io and check out the videos and development environment, this completely changes Smart Contracts/Chaincode forever.

hugh_hujinhui (Tue, 20 Oct 2020 07:53:54 GMT):
Has joined the channel.

ItaloCarrasco (Tue, 20 Oct 2020 15:25:18 GMT):
hello, i have a question about chaincode installation and commit, on fabric v2 when you install the chaincode on the peers is there a verification that the chaincode being installed and commited is the same across al the peers?

jtonline (Tue, 20 Oct 2020 16:01:21 GMT):
With the new chaincode lifecycle, different orgs could install different implementations of the same chaincode, so it may not be the same across all peers. https://hyperledger-fabric.readthedocs.io/en/release-2.2/chaincode_lifecycle.html explains the new lifecycle.

dcof (Wed, 21 Oct 2020 09:14:20 GMT):
Has joined the channel.

ItaloCarrasco (Thu, 22 Oct 2020 16:12:30 GMT):
ty

troyronda (Wed, 28 Oct 2020 17:44:01 GMT):
Has left the channel.

mholdmann (Thu, 29 Oct 2020 15:19:15 GMT):
WOW!! Great job by @kctam! Hyperledger instructor dove right into Prasaga #XBOM & writes his initial experiences "With XBOM, developers build applications with object oriented programming model, and XBOM provides an infrastructure serving them. The infrastructure (named Class Manager Infrastructure) then interacts with the underlying infrastructure, which is a fabric network in this case. Theoretically the developer does not care about the blockchain, as it is well handled by the infrastructure. That is the reason XBOM is positioned as “Decentralized GlobalOS”, like an operating system on top of the blockchain." First Attempt in XBOM (eXtensible Blockchain Object Model) by K.C. Tam https://medium.com/@kctheservant/first-attempt-in-xbom-extensible-blockchain-object-model-e49b925f4e71

ahm89 (Thu, 29 Oct 2020 15:46:38 GMT):
Has joined the channel.

heena066 (Mon, 02 Nov 2020 09:30:41 GMT):
Has joined the channel.

PJHaga (Tue, 03 Nov 2020 10:15:16 GMT):
Has joined the channel.

PJHaga (Tue, 03 Nov 2020 10:15:17 GMT):
Hi all, is there an option within fabric to configure if a chaincode event is only send once for example? So in the case that I have 2 peers for an organization, only 1 of the peers sends the chaincode event?

husnain (Tue, 03 Nov 2020 11:42:49 GMT):
Has joined the channel.

bestbeforetoday (Tue, 03 Nov 2020 14:28:55 GMT):
In case it helps others... answered in the #fabric channel, here: https://chat.hyperledger.org/channel/fabric?msg=rTCdZnxN7CGgWrg4j

crypto_beep (Wed, 04 Nov 2020 17:06:56 GMT):
Has joined the channel.

mcoblenz (Thu, 05 Nov 2020 15:03:43 GMT):
Is there a current recommendation for which language one should start writing new smart contracts in? It seemed like Go used to be the best-supported, but I'm seeing a lot of talk about Node.js now.

mcoblenz (Thu, 05 Nov 2020 15:03:51 GMT):
(hence JavaScript)

bestbeforetoday (Fri, 06 Nov 2020 10:53:53 GMT):
Answered here: https://chat.hyperledger.org/channel/fabric-questions?msg=4rKcXM9rpQpvZ9L6o

mcoblenz (Fri, 06 Nov 2020 15:50:34 GMT):
Thanks!

GuilhermeLionzo (Sun, 08 Nov 2020 15:39:54 GMT):
Hi there. I'd like to know whether it is possible to use the `./byfn.sh` script to deploy a hyperleger network in production mode. If it is possible, how we can remove the `dev-` in the docker image names (e.g. `dev-peer1.org2.example.com-mycc-1.0` to `peer1.org2.example.com-mycc-1.0`)?

neha.jajodia (Mon, 09 Nov 2020 08:29:40 GMT):
Has joined the channel.

neha.jajodia (Mon, 09 Nov 2020 08:29:40 GMT):
Hi Everyone, So excited to join the group. As Julian Gordon, VP APAC, Hyperledger at the Linux Foundation suggested, I thought of dropping you a note and letting you know about the Hyperledger Fabric Bootcamp which is on 19th November 2PM HKT for the Hong Kong Blockchain Week 2020. To open the event, Julian will be sharing with us the latest news and development for Hyperledger Fabric and beyond. It is going to be a fun event with amazing learning. It will be great if you could share it with the group as we are trying to have a greater number of people coming in. We would love to see you there and work together to attempt to deploy the largest Hyperledger network to date. Register now 👉https://blockchain-bootcamp-hyperledger-fabric-v2.eventbrite.sg I hope to see you at the event. Best Wishes, Neha Jajodia Digital Marketing Associate | Chainstack

mholdmann (Mon, 09 Nov 2020 15:48:15 GMT):
David Beberman and I present both Business & Developer content for Prasaga XBOM™️ integrated with Hyperledger Fabric at #blockchaintechfest2020 hosted Hyperledger India Chapter. https://youtu.be/RuaOeZuEUa8

Amjadnz (Mon, 09 Nov 2020 21:46:43 GMT):

Clipboard - November 10, 2020 1:46 AM

Amjadnz (Mon, 09 Nov 2020 21:46:49 GMT):
Hi People - 1 question. When I'm upgrading the chaincode using NODE SKD intantiateChaincode method (with UPGRADE flag set) - a new instance of the same chaincode is getting created rather than upgrading the existing one. The following is my setup FABRIC : 1.4 Docker Mode - base images for peer is amd64-1.4.2

Amjadnz (Mon, 09 Nov 2020 21:46:49 GMT):
Hi People - 1 question. When I'm upgrading the chaincode using NODE SDK intantiateChaincode method (with UPGRADE flag set) - a new instance of the same chaincode is getting created rather than upgrading the existing one. The following is my setup FABRIC : 1.4 Docker Mode - base images for peer is amd64-1.4.2

Amjadnz (Mon, 09 Nov 2020 21:46:49 GMT):
Hi People - 1 question. When I'm upgrading the chaincode using NODE SDK intantiateChaincode method (with UPGRADE flag set) - a new instance of the same chaincode is getting created instead of upgrading the existing one. The following is my setup FABRIC : 1.4 Docker Mode - base images for peer is amd64-1.4.2

Amjadnz (Mon, 09 Nov 2020 21:47:41 GMT):
The issue is when I'm invoking the node sdk method to query it always points to v0 not v11 as above.

Amjadnz (Mon, 09 Nov 2020 21:47:41 GMT):
The issue is when I'm invoking the node sdk method to query it always points to `v0` not `v11` as above.

Amjadnz (Mon, 09 Nov 2020 21:48:14 GMT):
Can someone give some clarity?

babu.jayaraj (Tue, 10 Nov 2020 05:59:52 GMT):
Has joined the channel.

pkirkinezis (Thu, 12 Nov 2020 15:01:17 GMT):
I try to call a query function from my chaincode and i get and error" Transaction commit was rejected by peer"

pkirkinezis (Thu, 12 Nov 2020 15:01:26 GMT):
what would be the reason?

nkl199 (Fri, 13 Nov 2020 09:41:59 GMT):
how are you calling the chaincode function?

nkl199 (Fri, 13 Nov 2020 09:42:44 GMT):
(this appears to have been answered in fabric-sdk-java)

pkirkinezis (Fri, 13 Nov 2020 09:43:15 GMT):
via java sdk

pkirkinezis (Fri, 13 Nov 2020 09:43:22 GMT):
i found that i was not endorsing

SasinduFdo (Mon, 16 Nov 2020 15:19:05 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 ?

Rachit-gaur (Tue, 17 Nov 2020 08:03:15 GMT):
any way to add pagination to getHistory function??

Jakeeyturner (Tue, 17 Nov 2020 15:31:27 GMT):
Are you referring to `getHistoryForKey`? It doesn't look like it has pagination. https://hyperledger.github.io/fabric-chaincode-node/master/api/fabric-shim.ChaincodeStub.html#getHistoryForKey__anchor https://hyperledger.github.io/fabric-chaincode-node/master/api/tutorial-using-iterators.html

Jakeeyturner (Tue, 17 Nov 2020 15:32:21 GMT):
Seems to be on the backlog - https://jira.hyperledger.org/browse/FAB-12881

Rachit-gaur (Tue, 17 Nov 2020 18:53:57 GMT):
@Jakeeyturner yes, unfortunately my history api returns error 500 timeout if there are more than 20 txns per key

cynicalsnail (Wed, 18 Nov 2020 07:00:19 GMT):
Has joined the channel.

Rachit-gaur (Wed, 18 Nov 2020 11:45:26 GMT):
getting error from couchdb, can someone help me fix this? this usually happens when the records are more than 20, a timeout of some sort `[error] 2020-11-18T03:35:37.919010Z nonode@nohost <0.254.0> -------- gen_server couch_compaction_daemon terminated with reason: {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} last msg: {'EXIT',<0.256.0>,{timeout,{gen_server,call,[couch_server,get_server]}}} state: {state,<0.256.0>,[]} extra: [] [error] 2020-11-18T03:35:38.174359Z nonode@nohost <0.254.0> -------- CRASH REPORT Process couch_compaction_daemon (<0.254.0>) with 0 neighbors exited with reason: {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} at gen_server:terminate/7(line:812) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_compaction_daemon,init,['Argument__1']}, ancestors: [couch_secondary_services,couch_sup,<0.202.0>], messages: [], links: [<0.211.0>], dictionary: [], trap_exit: true, status: running, heap_size: 1598, stack_size: 27, reductions: 4462 [error] 2020-11-18T03:35:38.183803Z nonode@nohost <0.211.0> -------- Supervisor couch_secondary_services had child compaction_daemon started with couch_compaction_daemon:start_link() at <0.254.0> exit with reason {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} in context child_terminated [info] 2020-11-18T03:35:52.423656Z nonode@nohost <0.49.0> -------- alarm_handler: {clear,system_memory_high_watermark} packet_write_wait: Connection: Broken pipe `

Rachit-gaur (Wed, 18 Nov 2020 11:45:26 GMT):
getting error from couchdb, can someone help me fix this? this usually happens when the records are more than 20, a timeout of some sort `[error] 2020-11-18T03:35:37.919010Z nonode@nohost <0.254.0> -------- gen_server couch_compaction_daemon terminated with reason: {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} last msg: {'EXIT',<0.256.0>,{timeout,{gen_server,call,[couch_server,get_server]}}} state: {state,<0.256.0>,[]} extra: [] [error] 2020-11-18T03:35:38.174359Z nonode@nohost <0.254.0> -------- CRASH REPORT Process couch_compaction_daemon (<0.254.0>) with 0 neighbors exited with reason: {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} at gen_server:terminate/7(line:812) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_compaction_daemon,init,['Argument__1']}, ancestors: [couch_secondary_services,couch_sup,<0.202.0>], messages: [], links: [<0.211.0>], dictionary: [], trap_exit: true, status: running, heap_size: 1598, stack_size: 27, reductions: 4462 [error] 2020-11-18T03:35:38.183803Z nonode@nohost <0.211.0> -------- Supervisor couch_secondary_services had child compaction_daemon started with couch_compaction_daemon:start_link() at <0.254.0> exit with reason {compaction_loop_died,{timeout,{gen_server,call,[couch_server,get_server]}}} in context child_terminated [info] 2020-11-18T03:35:52.423656Z nonode@nohost <0.49.0> -------- alarm_handler: {clear,system_memory_high_watermark} packet_write_wait: Connection: Broken pipe ` @Jakeeyturner

Jakeeyturner (Wed, 18 Nov 2020 15:08:56 GMT):
If you get a timeout, might be worth updating a timeout value perhaps?

AjeethT (Thu, 19 Nov 2020 00:35:29 GMT):
Has joined the channel.

sidoussou (Sat, 21 Nov 2020 00:12:38 GMT):
Has joined the channel.

SasinduFdo (Sat, 21 Nov 2020 16:38:22 GMT):
I got this error when i was trying to instantiate the chaincode . im using the vs code extension = Error instantiating smart contract: chaincode registration failed: container exited with 1

lquintai (Mon, 23 Nov 2020 11:14:55 GMT):
Hi! Can you share your peer logs and chaincode logs please? And also the version of the extension and the version of VSCode you're using.

SasinduFdo (Mon, 23 Nov 2020 16:18:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=urpfyDG9qXfspfALY) Hello, I managed to find the error and fix it. I was on the chaincode. Thanks

lquintai (Mon, 23 Nov 2020 16:37:01 GMT):
No worries :thumbsup:

PJHaga (Wed, 25 Nov 2020 09:45:55 GMT):
Hi all, is there information available on how to achieve zero-downtime chaincode upgrades (currently using HLF 2.x) ?

mbwhite (Wed, 25 Nov 2020 12:22:41 GMT):
What version of chaincode are you running here?

mbwhite (Wed, 25 Nov 2020 12:23:34 GMT):
Also check the version of the libraries that are being used - the was a defect with regards the number of items being returned. So move up the latest version you can

mkhraisha (Wed, 02 Dec 2020 18:59:08 GMT):
Has joined the channel.

mkhraisha (Wed, 02 Dec 2020 18:59:08 GMT):
Hi all, not sure if this is the correct channel but i'm running into an issue where I'm trying to bundle NodeJS chaincode and install it on a peer with no internet, I setup a slack overflow question that has more details, but i'd happily expand on them here if it helps. This is for AWS managed blockchain (HLF 1.4) https://stackoverflow.com/questions/64813879/aws-managed-blockchain-bundling-libraries-nodejs?noredirect=1#comment115059998_64813879

Rajatsharma (Fri, 04 Dec 2020 07:55:17 GMT):
Hi can anyone help me in getting a reply on this ticket ? https://jira.hyperledger.org/browse/FABN-1675

Rajatsharma (Fri, 04 Dec 2020 07:55:39 GMT):
I've tried contacting multiple people regarding this.

HansrajRami (Fri, 04 Dec 2020 21:55:03 GMT):
Has joined the channel.

TriumphS (Sun, 06 Dec 2020 22:59:21 GMT):
Has joined the channel.

amalendusuresh (Mon, 07 Dec 2020 04:51:44 GMT):
Has joined the channel.

amalendusuresh (Mon, 07 Dec 2020 04:51:44 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?

james-wallis (Mon, 07 Dec 2020 10:44:08 GMT):
Has joined the channel.

HarshMultani (Tue, 08 Dec 2020 07:01:34 GMT):
Has joined the channel.

HarshMultani (Tue, 08 Dec 2020 07:01:34 GMT):
Hi all, I want to run daml code on fabric. My Fabric network is up and running. But when I run the command to start the daml runtime :- sbt "run --port 6865 --role provision". It gives the following error :- (run-main-0) com.daml.FabricContextException: response { [error] status: 500 [error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found" [error] }. Does anyone know how should I resolve this?

zupns (Wed, 09 Dec 2020 11:10:17 GMT):
Has joined the channel.

zupns (Wed, 09 Dec 2020 11:16:30 GMT):
Hi all, is it possible to invoke transactions using fabric-contract-api from one smart contract to another when each SC has a separate context namespace? I read this [doc](https://hyperledger-fabric.readthedocs.io/en/release-2.0/developapps/chaincodenamespace.html#scenario) but after also checking fabric-contract-api API I didn't any possibility. Am I missing sth.?

mbwhite (Wed, 09 Dec 2020 14:29:29 GMT):
Yes- this is possible; though I realize there aren't any examples. I'd need to work it out.. but it can be done

mbwhite (Wed, 09 Dec 2020 14:30:33 GMT):
As mentioned on the community call now - finishing the LedgerAPI was mentioned; we've a lot of work on this done already - but if anybody would like to contribute here to get this completion happy to mentor.

zupns (Wed, 09 Dec 2020 15:09:52 GMT):
After some further researching I assume that it can be done through the stub accessible from the context, right?

zupns (Wed, 09 Dec 2020 15:10:20 GMT):
ctx.stub.invokeChaincode() to be more exact...?

mbwhite (Wed, 09 Dec 2020 15:26:08 GMT):
that's the one

ItaloCarrasco (Wed, 09 Dec 2020 17:00:02 GMT):
hello, i am checking on fabric samples the asset transfer secured agreement, there is one thing i dont understand, the documentation says implicit collections policies are generated from their organization, in the chaincode of this example they transfer an asset, in the same transaction they delete an asset from org1 collection and add an asset in org2 collection, endorsed by one pear of both orgs, how is this even possible if its supposed that only members of org2 have read/write access to they private data (same for org1), shouldnt this transaction fail because a user doesnt have access to both collections?

gabrielodi (Thu, 10 Dec 2020 15:28:53 GMT):
Has joined the channel.

ChaoZhang99 (Wed, 16 Dec 2020 06:54:24 GMT):
Has joined the channel.

PJHaga (Wed, 16 Dec 2020 15:04:22 GMT):
Hi, I'm running a peer (1.4.1) in kubernetes in a pod which consists of 2 containers, the fabric-peer container and the docker container. In the docker container the chaincode container is ran with docker. When instantiating this chaincode container the process pulls 2 images hyperledger/fabric-ccenv:1.4.4 and hyperledger/fabric-baseimage:amd64-0.4.15. However, due to the recent introduction of pull rate limits of the public docker hub this causes issues. Therefore we want to host these images in a private repo and pull from there. I've added the authentication file for docker in $HOME/.docker/config.json and I'm able to pull the images when I exec into the container. However, the instantiate still fails with this error: Failed to pull /hyperledger/fabric-ccenv:1.4.4: API error (500): Get https:///hyperledger/fabric-ccenv/manifests/1.4.4: unauthorized. How do I setup this authentication?

rbole (Wed, 16 Dec 2020 15:27:54 GMT):
SampleDevModeSolo

punkrokk (Wed, 16 Dec 2020 19:42:52 GMT):
Has joined the channel.

punkrokk (Wed, 16 Dec 2020 19:42:52 GMT):
Hi

punkrokk (Wed, 16 Dec 2020 19:42:54 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:42:54 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:48:23 GMT):
So maybe I'm misunderstanding something. If I have a transaction that writes an object. And that object has an immutable key, then a set of other keys that can change. How can I search for the `history` of changes across the object, not just by keys?

davidkel (Thu, 17 Dec 2020 08:58:10 GMT):
Did you look at https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/tutorial-using-iterators.html getHistoryForKey should return an iterator (so long as you have enbabled the history database) of details about all the committed changes for the specific composite key provided

punkrokk (Thu, 17 Dec 2020 16:56:33 GMT):
@davidkel How can I confirm that the history database is enabled. I have added the `CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true` to my container

punkrokk (Thu, 17 Dec 2020 16:57:00 GMT):
so I think you just said they key thing, I need to have a composite key in order to index and search history?

davidkel (Thu, 17 Dec 2020 17:35:59 GMT):
When you do put_state/get_state etc you have to provide a composite key. getHistoryForKey get's you the history of that key

punkrokk (Thu, 17 Dec 2020 17:36:36 GMT):
I see, ok so I can use the `getHistoryForKey` with composite keys

punkrokk (Thu, 17 Dec 2020 17:36:40 GMT):
that was what threw me off

punkrokk (Thu, 17 Dec 2020 17:37:21 GMT):
I was thinking I could have one key, and view the changes on other keys history

punkrokk (Fri, 18 Dec 2020 19:45:47 GMT):
How can I troubleshoot my couchDB indexes not getting installed. I am noticing that in the `asset-transfer-ledger-queries` chaincode in fabric-samples, that it installs it for the go chaincode, but not the javascript version.

punkrokk (Fri, 18 Dec 2020 19:46:03 GMT):
Might this be something to do with NPM and including the files?

punkrokk (Fri, 18 Dec 2020 22:03:31 GMT):
anyone ever seen this>

punkrokk (Fri, 18 Dec 2020 22:03:31 GMT):
anyone ever seen this?

punkrokk (Fri, 18 Dec 2020 22:03:41 GMT):
`Error: Type not properly specified for parameter ctx, can not process pure Object types at /usr/local/src/node_modules/fabric-contract-api/lib/annotations/transaction.js:52:23 at Array.map () at /usr/local/src/node_modules/fabric-contract-api/lib/annotations/transaction.js:43:12 at DecorateProperty (/usr/local/src/node_modules/reflect-metadata/Reflect.js:553:33) at Object.decorate (/usr/local/src/node_modules/reflect-metadata/Reflect.js:123:24) at __decorate (/usr/local/src/dist/my-asset/my-asset-contract.js:20:92) at Object. (/usr/local/src/dist/my-asset/my-asset-contract.js:253:1) at Module._compile (internal/modules/cjs/loader.js:1158:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Module.load (internal/modules/cjs/loader.js:1002:32)`

punkrokk (Fri, 18 Dec 2020 22:03:52 GMT):
all of my types are correct

RazaDen (Sat, 19 Dec 2020 10:50:40 GMT):
Has joined the channel.

punkrokk (Tue, 22 Dec 2020 00:59:08 GMT):
Anyone have any comments on this: https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=Fwu36gX5fEt6Y73SR

punkrokk (Tue, 22 Dec 2020 00:59:26 GMT):
it's with javascript chaincode packages. I don't see any errors

ever-upwards (Tue, 22 Dec 2020 15:42:00 GMT):
Has joined the channel.

soumilgada-sg (Wed, 23 Dec 2020 15:45:39 GMT):
Has joined the channel.

soumilgada-sg (Wed, 23 Dec 2020 15:45:39 GMT):
9:10 PM 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. Seems like some configuration issue.. Little help.. plz..

punkrokk (Wed, 23 Dec 2020 16:30:33 GMT):
so, in further research, if my index has bad json, it fails to deploy the chaincode, but if it's valid the `ddoc` indexes do not get applied to couchdb on chaincode install

punkrokk (Wed, 23 Dec 2020 16:31:03 GMT):
Can anyone help with this couchdb index issue? https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=27tPkZh5rEAgC6bgy

alacambra (Wed, 23 Dec 2020 22:09:50 GMT):
Has joined the channel.

iLico (Sun, 27 Dec 2020 09:55:38 GMT):
Has joined the channel.

mkhraisha (Mon, 04 Jan 2021 20:26:54 GMT):
hello, When looking at many of the fabric samples transfer of ownership of private data seems to require both organizations to be able to write/read into each others private collection for example https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-secured-agreement -- The transfer function is able to both put/delete from two separate organizations. doesnt this give any one org too much power and the ability to delete from other orgs?

mbwhite (Tue, 05 Jan 2021 13:39:20 GMT):
Keep in mind the endorsement policies - this means that the organization involved will be running the chaincode code. Other orgs can write my private data, but can't read from it

braduf (Tue, 05 Jan 2021 20:33:18 GMT):
Hi all, I am writing Chaincode in Go and in my chaincode I use a private package (private git repo). I have set up my git token and configured my local git settings so go modules can get the private module. Also packaging this chaincode works without problems. It is only when trying to install it, that I get an error that the build failed: ``` Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "go: github.com/peikiuar/fabric-chaincode-go-helpers@v0.0.0-20201208001631-9a1324c82e0b: reading https://proxy.golang.org/github.com/peikiuar/fabric-chaincode-go-helpers/@v/v0.0.0-20201208001631-9a1324c82e0b.mod: 410 Gone server response: not found: github.com/peikiuar/fabric-chaincode-go-helpers@v0.0.0-20201208001631-9a1324c82e0b: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/gopath/pkg/mod/cache/vcs/23a74635662cdf532666b1ba791ffbc9c7ed12000378ab7edaed3bcc53962f44: exit status 128: fatal: could not read Username for 'https://github.com': terminal prompts disabled ``` Is this because the build is done in the peer container, where my git user and token is not configured and so it can't access the private repo? Or is this another familiar problem? Any help would be much appreciated! Thanks in advance.

braduf (Tue, 05 Jan 2021 20:33:18 GMT):
Hi all, I am writing Chaincode in Go and in my chaincode I use a private package (private git repo). I have set up my git token and configured my local git settings so go modules can get the private module. Also packaging this chaincode works without problems. It is only when trying to install it, that I get an error that the build failed: ``` Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "go: github.com//fabric-chaincode-go-helpers@v0.0.0-20201208001631-9a1324c82e0b: reading https://proxy.golang.org/github.com//fabric-chaincode-go-helpers/@v/v0.0.0-20201208001631-9a1324c82e0b.mod: 410 Gone server response: not found: github.com//fabric-chaincode-go-helpers@v0.0.0-20201208001631-9a1324c82e0b: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/gopath/pkg/mod/cache/vcs/23a74635662cdf532666b1ba791ffbc9c7ed12000378ab7edaed3bcc53962f44: exit status 128: fatal: could not read Username for 'https://github.com': terminal prompts disabled ``` Is this because the build is done in the peer container, where my git user and token is not configured and so it can't access the private repo? Or is this another familiar problem? Any help would be much appreciated! Thanks in advance.

kevindick_tevora (Tue, 05 Jan 2021 21:59:07 GMT):
Has joined the channel.

jtonline (Wed, 06 Jan 2021 17:13:13 GMT):
While looking in to a Java chaincode issue (FABCJ-300) I've started to think that it might be a good idea to deprecate the ability to use chaincode source packages and defer the build to deploy time. There are several problems with building late, e.g. differences between tested/deployed chaincode, network access requirements, difficulty debugging, etc. It's already possible to package Java chaincode as a prebuilt fat jar (which I would recommend!) however I'm not sure whether many people use that option. Anyway, what do you think about deprecating chaincode source packages and in the future only supporting prebuilt chaincode packages?

Roger (Thu, 07 Jan 2021 07:25:54 GMT):
Based on previous project experience,it is helpful to write chaincode earlier. After the chaincode is written, due to the business logic processing, it needs multi-party consensus to deploy. Only the input and output of the smart contract need to be made in advance, loosely coupled with the system, and not affected by the network and deployment.

jtonline (Thu, 07 Jan 2021 10:16:26 GMT):
So the change I'm proposing is at the start of that, when you've written your business logic. Instead of packaging the source code to install on Fabric peers, you would build the chaincode and package the build output, e.g. jar files instead of the Java source code.

Roger (Fri, 08 Jan 2021 06:54:27 GMT):
I quite agree with your opinion.

pkirkinezis (Fri, 08 Jan 2021 08:04:23 GMT):
Hi and happy new year . I am currently trying to debug an issue i have to my implemention . One of my create functions I have on my chaincode written in go returns the error " The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid." every time i try to call it throuth java dateway api. I've check the logs I had put on my chaincode throuth out the function and seems it runs as expected. Where do you suggest to search for because all other functios following the same logic to create works without any errors.

pkirkinezis (Fri, 08 Jan 2021 08:05:44 GMT):
`Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid. `

pkirkinezis (Fri, 08 Jan 2021 08:05:44 GMT):
`Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid.`

yehia67 (Mon, 11 Jan 2021 17:30:09 GMT):
Hello everyone, I have a question regarding transactions execution time. To submit transactions faster what should I do? Increase orderer CPU? increase Peers? what?

yehia67 (Mon, 11 Jan 2021 17:30:09 GMT):
What resources should I increase exactly?

Kestutis_Gudynas (Tue, 12 Jan 2021 10:24:12 GMT):
Has joined the channel.

nkl199 (Tue, 12 Jan 2021 10:49:26 GMT):
That's quite an open ended question and has many answers that would depend on where the bottle neck is. Have you done any investigations using a performance testing framework such as Caliper yet?

SandeepChalla (Tue, 12 Jan 2021 10:58:17 GMT):
Has joined the channel.

SandeepChalla (Tue, 12 Jan 2021 10:59:53 GMT):
Hi Everyone, We are trying to get all the historical states data to display as audit trail, is pagination possible here.. we are using gethistoricalkey to get all the historical states..

AfzaalLucky (Fri, 15 Jan 2021 07:31:28 GMT):
Has joined the channel.

vyomzc (Mon, 18 Jan 2021 17:39:13 GMT):
Has joined the channel.

ksanjayk (Tue, 19 Jan 2021 13:51:12 GMT):
Has joined the channel.

cmhacker (Tue, 19 Jan 2021 14:40:03 GMT):
Has joined the channel.

KanupriyaPandey (Wed, 20 Jan 2021 11:12:00 GMT):
Has joined the channel.

GeorgePals (Wed, 20 Jan 2021 19:17:19 GMT):
Has joined the channel.

GeorgePals (Wed, 20 Jan 2021 19:17:22 GMT):
In the chaincode, I need to use a third-party node module with which I communicate with an external API. The issue is that, that external API utilizes TLS for its communications; Thus, my chaincode can't communicate with it without the appropriate certificates - it is being rejected. So, do I need to enroll the chaincode with the rootCA as well? Or is there a simpler way to achieve TLS communication with external entities, through some chaincode that is installed under a peer that, already, has all the appropriate certificates?

GeorgePals (Wed, 20 Jan 2021 19:17:39 GMT):
Hello! In the chaincode, I need to use a third-party node module with which I communicate with an external API. The issue is that, that external API utilizes TLS for its communications; Thus, my chaincode can't communicate with it without the appropriate certificates - it is being rejected. So, do I need to enroll the chaincode with the rootCA as well? Or is there a simpler way to achieve TLS communication with external entities, through some chaincode that is installed under a peer that, already, has all the appropriate certificates? Thanks in advance! Every opinion is much appreciated!

randyshu (Thu, 21 Jan 2021 14:56:47 GMT):

Clipboard - 2021年1月21日晚上10点56分

randyshu (Thu, 21 Jan 2021 15:01:30 GMT):
hi, I meet above error when TLS ServerHandshaking between chaincodeServer and peer. and before that I have change something may cause this error, they are : 1. change the default self-signer CA implement to SM2 2. change the fabric-chaincode-go tls credential to gmcredential and so relationed cert

jtonline (Thu, 21 Jan 2021 17:51:39 GMT):
Hello. I've replied to your Stack Overflow question with some ideas for using TLS certificates in chaincode. Depending on what information you need from an external API, this article might be of interest as well https://developer.ibm.com/technologies/blockchain/articles/oracles-common-architectural-patterns-for-fabric/

GeorgePals (Thu, 21 Jan 2021 18:19:05 GMT):
Yep, yep. I saw it! Thank you very much @jtonline

GeorgePals (Fri, 22 Jan 2021 08:50:15 GMT):
Just a quick question, in case that you're aware of the answer! Don't the - CORE_PEER_TLS_ROOTCERT_FILE - CORE_PEER_TLS_KEY_FILE - CORE_PEER_TLS_CERT_FILE get derived from the peer in order to be passed to the chaincode? I know that these values are used by the chaincode init, but I don't know in what way. Are they "just passed" to the chaincode, or are they "used by" the chaincode in order for it to generate the appropriate certificates that it will use to communicate with the peer? Because I tried to check what's inside them and they are totally different from the certificates that the peer has.

jtonline (Fri, 22 Jan 2021 12:13:43 GMT):
Hi, I'm not sure pagination is possible, in which case it's probably worth opening an issue in jira https://hyperledger-fabric.readthedocs.io/en/release-2.2/CONTRIBUTING.html#reporting-bugs

jtonline (Fri, 22 Jan 2021 15:08:54 GMT):
I think they just get used by the chaincode https://github.com/hyperledger/fabric-chaincode-node/blob/ae5a352cd1b59db59a2f9a622f9a950b51c76804/libraries/fabric-shim/lib/handler.js#L756

sidoussou (Fri, 22 Jan 2021 18:24:02 GMT):
Hi, are there any examples of chaincode unit tests(golang), fabric-samples has https://github.com/hyperledger/fabric-samples/blob/master/chaincode/sacc/sacc_test.go but it uses "shimtest". we have the following in https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shimtest : Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

greg2git (Sat, 23 Jan 2021 17:50:49 GMT):
what's a 'ChaincodeStub' and is there a sample code open sourced for it somewhere yet?

sidoussou (Sat, 23 Jan 2021 22:50:39 GMT):
This is it : https://pkg.go.dev/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub https://pkg.go.dev/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStubInterface

BlockCrasher (Wed, 27 Jan 2021 07:01:09 GMT):
Has joined the channel.

Koushik (Wed, 27 Jan 2021 22:07:30 GMT):
Hi guys, can anyone point me to examples or methodology of creating an oracle for hyperledger fabric? I would prefer to use an opensource code or just any architecture. In my mind it is just going to be a middleware process between the chaincode and the external datasource to help keep a deterministic model.

BrettLogan (Thu, 28 Jan 2021 01:00:37 GMT):
@sidoussou I wrote this official sample which uses counterfeiter to generate stubs on the fly for you: https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-basic/chaincode-go/chaincode/smartcontract_test.go

BrettLogan (Thu, 28 Jan 2021 01:00:37 GMT):
@sidoussou I wrote this official sample which uses counterfeiter to generate stubs for you: https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-basic/chaincode-go/chaincode/smartcontract_test.go

sidoussou (Thu, 28 Jan 2021 01:48:27 GMT):
@BrettLogan Thank you very much, You made my day!

jtonline (Thu, 28 Jan 2021 13:55:29 GMT):
Is this any help? https://developer.ibm.com/technologies/blockchain/articles/oracles-common-architectural-patterns-for-fabric/

karthiksamaganam (Mon, 01 Feb 2021 14:42:56 GMT):
Has joined the channel.

seanyoung (Wed, 03 Feb 2021 09:21:21 GMT):
I've been thinking about doing a Hyperledger Mentorship 2021 for running Solidity using Solang (my labs project) on wasm chaincode api: https://github.com/hyperledgendary/fabric-contract-api-rust However this has not seen a commit since september laster. @mbwhite

seanyoung (Wed, 03 Feb 2021 09:21:21 GMT):
I've been thinking about doing a Hyperledger Mentorship 2021 for running Solidity using Solang (my labs project) on wasm chaincode api: https://github.com/hyperledgendary/fabric-contract-api-rust However this has not seen a commit since last September. @mbwhite

mbwhite (Wed, 03 Feb 2021 10:05:47 GMT):
Hi Sean; other business pressures meant we needed to look at other items.. the code is still there and useable... and as a tech preview is still usable.

seanyoung (Wed, 03 Feb 2021 10:13:02 GMT):
Ok but is it worth investing significant effort in?

seanyoung (Wed, 03 Feb 2021 10:14:02 GMT):
I appreciate you might not be able to answer this awkward question :)

mbwhite (Wed, 03 Feb 2021 10:14:34 GMT):
:-)

mbwhite (Wed, 03 Feb 2021 10:17:32 GMT):
let's just say that it's an open source project. I'm still (personally) interested in it, and with the external builder model of Fabric it can continue to be used and worked. Is there a demand from enterprise customers today? Not such much - though with the ability to run Solidity I (personally) think this is attractive.

mbwhite (Wed, 03 Feb 2021 10:19:58 GMT):
I'd be happy to support and help anybody using that code, and make sure that it still worked with the lastest Fabric versions..

seanyoung (Wed, 03 Feb 2021 10:20:21 GMT):
Great, thanks. That helps a lot.

seanyoung (Wed, 03 Feb 2021 10:22:31 GMT):
About the mentorship, I'm still deciding what/if to apply for. I can only do one.

mbwhite (Wed, 03 Feb 2021 10:23:24 GMT):
depends what the alternatives are :-)

seanyoung (Wed, 03 Feb 2021 10:26:59 GMT):
Well, I've got enough ideas. A new compiler pass or automatic formatting of solidity in the vscode extension.

mbwhite (Wed, 03 Feb 2021 10:27:41 GMT):
:-)

seanyoung (Wed, 03 Feb 2021 10:48:21 GMT):
Getting Solang to generate wasm contracts for fabric sounds pretty interesting to me

mbwhite (Wed, 03 Feb 2021 10:48:53 GMT):
+1 here

Javi (Wed, 03 Feb 2021 14:58:16 GMT):
hi all, I'm using Java to develop my chaincode and I want to return a list with a custom object type, but I'm unable to make it work because seems that the serialization process is not working.... if I change my function to return a string instead a `List` then it works without any problem. There is something that I have to add to my chaincode to make the serialization work or is a feature that is not implemented?

BrettLogan (Wed, 03 Feb 2021 20:00:09 GMT):
Did you implement the serializable interface on your customer object type?

Javi (Thu, 04 Feb 2021 08:35:15 GMT):
no, it is needed?? I will try it

mbwhite (Thu, 04 Feb 2021 16:27:58 GMT):
The standard serialization mechanism in Java won't help you here - unless you want to take full control yourself. I.e. use it to create a binary blob and then return that as a byte array. What you can do is use the @DataType Annotation.

mbwhite (Thu, 04 Feb 2021 16:28:01 GMT):
see https://github.com/hyperledger/fabric-chaincode-java/blob/master/examples/ledger-api/src/main/java/org/example/MyAsset.java

Javi (Thu, 04 Feb 2021 16:52:56 GMT):
yes @mbwhite I'm using this annotation in my custom object `Customer`, but if I want to return a ``List` then the serialization raises an exception

mbwhite (Thu, 04 Feb 2021 17:21:27 GMT):
Yes; there is a way around this by providing a custom serialization format. but I'd need to dig into the code to remind myself of details.

mbwhite (Thu, 04 Feb 2021 17:21:59 GMT):
there is also an issue outstanding for improvements in this area.. (shameless plug for contributors :;-) )

Javi (Thu, 04 Feb 2021 17:25:47 GMT):
ok @mbwhite I'm looking in the jira but I'm unable to find it, can you guide me??

mbwhite (Thu, 04 Feb 2021 17:27:06 GMT):
I'll need to go find it myself... :-) might be tomorrow now

Javi (Thu, 04 Feb 2021 17:31:17 GMT):
perfect! I will wait, I'm interested to improve this

chenyouyou (Tue, 09 Feb 2021 01:08:34 GMT):
Has joined the channel.

cmhacker (Tue, 09 Feb 2021 06:47:10 GMT):
Hello everyone, currently I have deployed chaincode fabcar using gradle. How to deploy multiple chaincode using java?? for fabric 2.1 setup

chill37 (Wed, 10 Feb 2021 02:08:11 GMT):
Has joined the channel.

V3nomXP (Thu, 11 Feb 2021 06:56:19 GMT):
Has joined the channel.

rbole (Sun, 14 Feb 2021 10:00:45 GMT):
HI, I’m trying to run a node.js chaincode in fabric 2.2 with a peer in devmode. Is there any documentation out there? If the devmode is running with a golang chaincode but not with a node.js chaincode (fabric-contract-api) the dev mode is working, but not with node.js. Any infos regarding running node.js chaincode in dev-mode would be very nice.

ksanjayk (Sun, 14 Feb 2021 16:37:26 GMT):
i have declared few variable in golang chaincode as int , i am getting error , is this because of declaring as int , is there any way to get around it

ksanjayk (Sun, 14 Feb 2021 16:37:49 GMT):

Screenshot from 2021-02-14 21-45-25.png

ksanjayk (Sun, 14 Feb 2021 16:38:35 GMT):

Screenshot from 2021-02-14 22-08-18.png

ksanjayk (Sun, 14 Feb 2021 16:38:48 GMT):
do we have to declare them as only string ?

pkirkinezis (Mon, 15 Feb 2021 10:52:39 GMT):
Hi to the team . I use getHistiryForKey to et a the history of a document . Is there a function to get who made its change maybe the mspId or something to indikate who did what ?

pkirkinezis (Mon, 15 Feb 2021 10:52:39 GMT):
Hi to the team . I use getHistiryForKey to get the history of a document . Is there a function to get who made its change maybe the mspId or something to indikate who did what ?

barankilic (Mon, 15 Feb 2021 11:31:37 GMT):
Has joined the channel.

pkirkinezis (Mon, 15 Feb 2021 16:25:23 GMT):
One way is to save the mspId for every document created

jkalwar (Wed, 17 Feb 2021 07:45:28 GMT):
Has joined the channel.

jkalwar (Wed, 17 Feb 2021 07:46:17 GMT):
hi all , please look at the below issue and give your thougths : https://stackoverflow.com/questions/66237592/endorsement-policy-failure-while-invoking-chain-code-using-even-if-the-transacti

mholdmann (Fri, 26 Feb 2021 17:34:01 GMT):
For those interested in our @prasagaofficial progress on the tech side we presented to Hyperledger NYC and Denver Meetups. Please watch the recording of the premier of ClassFungibleAsset and subclass ClassSmartAsset for enablement of Fungible and Non-Fungible Assets in our GlobalOS, XBOM a First Class Object mode on Hyperledger. This is a command line demo which clearly shows how blockchain advances without any smart contracts using DataGrid Token ($DGT) and wrapped ETH ($WETH) as examples. Again, everything works as advertised, this release is for our XBOM dev environment and enterprise TestNet for PoC. The use cases for enterprise, the assets would be pharmaceuticals, spark pugs, bolts, coal, etc in a supply chain. Pay Attention to the enablement of a Globally UniqueID for every account and every object. https://youtu.be/X-nlhNQuOAk?t=99

kartheekgottipati (Sat, 27 Feb 2021 07:46:56 GMT):
Has joined the channel.

maiconramones (Mon, 01 Mar 2021 17:08:31 GMT):
Hello. It's possible to listen events (block or transaction) emitted by a chaincode in another chaincode? For example: chaincode A send a transaction to the block -> commit -> chaincode B listen the commit and make something... In the documentation I found the listener in a client side way using SDK but I want to implement the listener in a chaincode. Thanks.

suosuidewenqing (Tue, 02 Mar 2021 08:32:13 GMT):
Has joined the channel.

thiagooggioni (Tue, 02 Mar 2021 11:54:28 GMT):
Has joined the channel.

cmhacker (Tue, 02 Mar 2021 13:20:58 GMT):
I am trying to upgrade a chain code but go stuck with the following error, Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to define the current sequence (1) for namespace testChaincode, but: Version '1' != '2'

cmhacker (Tue, 02 Mar 2021 13:20:58 GMT):
I am trying to upgrade a chain code but got stuck with the following error, Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to define the current sequence (1) for namespace testChaincode, but: Version '1' != '2'

bh4rtp (Tue, 02 Mar 2021 23:50:51 GMT):
hi, i get a warning when querying couchdb by name including a substring `Automation`. here is the log from peer0: ```2021-03-03 07:44:35.962 CST [couchdb] queryDocuments -> WARN 44da The query [{"fields":["name","role","registration","_id","~version","_id","~version"],"limit":1000,"selector":{"$or":[{"name":{"$regex":"Automation"}},{"registration":{"$regex":"Automation"}},{"residence":{"$regex":"Automation"}}],"docType":"Participant"}}] caused the following warning: [No matching index found, create an index to optimize query time.```

bh4rtp (Tue, 02 Mar 2021 23:52:22 GMT):
How to create an index to optimize query time for this issue?

bh4rtp (Tue, 02 Mar 2021 23:55:53 GMT):
And why does the query fields containing the repeated `_id` and `~version`?

severus-sn4pe (Wed, 03 Mar 2021 13:39:46 GMT):
Has joined the channel.

GeorgePals (Thu, 04 Mar 2021 17:21:07 GMT):
Hello! I need to implement a "linked-list" scenario. What I need to achieve is to be able and import some information and, then, based on their type, "link" this information with other similar info, through a "linked-list" implementation; Thus, I need to connect past blocks with the block that this information was imported to (I'll store the index of the past block inside the new block). But, I have two issues: 1. Is this appropriate? Am I going to have any issue? (With blocks and the indexes that I keep) 2. How can I get the number of a block through the chaincode and access its stored information?

BrettLogan (Thu, 04 Mar 2021 17:56:55 GMT):
Those fields are auto-generated. Indexes are part of your chaincode package and need to be passed in through a file in your chaincode: https://hyperledger-fabric.readthedocs.io/en/release-2.2/couchdb_tutorial.html#cdb-create-index

wangxiaobo1216 (Fri, 05 Mar 2021 09:06:55 GMT):
Has joined the channel.

wangxiaobo1216 (Fri, 05 Mar 2021 09:06:56 GMT):
Is it necessary to keep the old version chaincode containers on the fabric network?

arun17 (Fri, 05 Mar 2021 12:55:27 GMT):
hello while querying the data i am getting these error can anyone help me out what is the root cause and possible solution

arun17 (Fri, 05 Mar 2021 12:56:49 GMT):

Screenshot 2021-03-05 at 5.05.59 PM.png

pkirkinezis (Fri, 05 Mar 2021 19:11:47 GMT):
Hi i getting this error after trying to update my chaincode to all nodes across many server . Is there a chance that the changes to structs made a conflict to old values on the ledger ? Error: could not assemble transaction: proposal response was not successful, error code 500, msg error in simulation: failed to execute transaction 4e2d78ac1cd9249d56e272c2190f5b5c0d2e233a5d9ba56b8fb1e65f9de83ccb: could not launch chaincode locard_4.0:81848aa4b5973009f2c2af35fdf51ce730a1ec42f771bad745ac407a85eacd2e: chaincode registration failed: container exited with 2 - proposal response: version:1 response:

BrettLogan (Fri, 05 Mar 2021 22:17:11 GMT):
Nope, you can delete them. If chaincode containers are ever needed again, the peer will automatically recreate them

BrettLogan (Fri, 05 Mar 2021 22:17:11 GMT):
Nope, you can delete them. Even if chaincode containers are ever needed again, the peer will automatically recreate them

wangxiaobo1216 (Mon, 08 Mar 2021 00:59:46 GMT):
:thumbsup:

chakshujain (Mon, 08 Mar 2021 06:50:35 GMT):
Has joined the channel.

GeorgePals (Mon, 08 Mar 2021 10:56:52 GMT):
Hello, I need to run a transaction based on majority consent. A user with a special attribute (say, role=User-Special), should be able to run/invoke a function only if: - he, indeed, has the attribute User-Special - has the (majority) consent of other users with the same attribute (User-Special) that exist in other orgs. I know about the existence of "setStateBasedEndorsementNOutOf", but this only applies to future updates of the key. Any ideas?

GeorgePals (Mon, 08 Mar 2021 11:02:04 GMT):
I want the same thing that this user asked here: https://stackoverflow.com/questions/52994169/multi-signature-transaction-in-hyper-ledger-fabric but every key has a distinct name (I use composite keys). Maybe an idea would be to first create the (composite) key and apply the "setStateBasedEndorsementNOutOf" and then again run the appropriate function where the user will save the actual information to the blockchain and wait for validation by the other orgs. But again, what about the "User-Special" role? How can I only approve the transaction if it has the majority consent of these special users?

randyshu (Tue, 09 Mar 2021 08:20:12 GMT):
Hello, We can't use stub.GetQueryResultWithPagination and stub.PutState at the same time and if i do I get problem as 'Transaction has already performed a paginated query. Writes are not allowed' but in my scenario should query firstly and then execute.

davidkel (Tue, 09 Mar 2021 08:57:56 GMT):
This restriction is documented here https://hyperledger-fabric.readthedocs.io/en/release-2.2/couchdb_as_state_database.html#couchdb-pagination and it suggests you use the non pagination apis and not iterate through all the results as an alternative

randyshu (Tue, 09 Mar 2021 09:03:45 GMT):
thanks for your kind reply.

randyshu (Tue, 09 Mar 2021 09:07:13 GMT):
the implement between GetStateByPartialCompositeKey and GetQueryResultWithPagination are different... and I don't want to use compositeKey ,is there any other api can help?

davidkel (Tue, 09 Mar 2021 09:13:08 GMT):
Why can't you use GetQueryResult ?

randyshu (Tue, 09 Mar 2021 09:14:25 GMT):
it also support in read only transaction

davidkel (Tue, 09 Mar 2021 09:16:09 GMT):
Interesting because the documentation implies that you should be able to use it

randyshu (Tue, 09 Mar 2021 09:35:59 GMT):
sorry, I have a misunderstanding of GetQueryResult api . I use it and it sames ok

randyshu (Tue, 09 Mar 2021 09:35:59 GMT):
my chaincode instance is implements through FSM, loadFSMs will execute before everyTransaction but this may cause a low effectiveness。I fix it by adding sync.Once flag to this method . but the problem is when template changed how can i trigger event to reloadFSMs.

davidkel (Tue, 09 Mar 2021 09:41:55 GMT):
:thumbsup:

randyshu (Tue, 09 Mar 2021 09:54:06 GMT):

Clipboard - 2021年3月9日下午5点54分

randyshu (Tue, 09 Mar 2021 09:54:36 GMT):
my chaincode instance is implements through FSM, loadFSMs will execute before everyTransaction but this may cause a low effectiveness。I fix it by adding sync.Once flag to this method . but the problem is when template changed how can i trigger event to reloadFSMs.

randyshu (Tue, 09 Mar 2021 09:54:36 GMT):
my chaincode instance is implements through FSM, initFSMs will execute before everyTransaction but this may cause a low effectiveness。I fix it by adding sync.Once flag to this method . but the problem is when template changed how can i trigger event to reloadFSMs.

GeorgePals (Tue, 09 Mar 2021 13:53:11 GMT):
If anyone has any idea on this, it will be much appreciated https://stackoverflow.com/questions/66547959/hyperledger-fabric-majority-consent-from-special-role

GeorgePals (Tue, 09 Mar 2021 14:47:19 GMT):
If anyone has any idea on this, it will be much appreciated! https://stackoverflow.com/questions/66547959/hyperledger-fabric-majority-consent-from-special-role

GeorgePals (Tue, 09 Mar 2021 17:01:18 GMT):
I have 2 chaincodes. The first chaincode invokes a function of the second one. The invoked function needs to ask the CA to sign a challenge in order to prove that it accepts a function in the first chaincode to be called. For example Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 asks the CA to sign a message that approves the user that initiated all this to call another function ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Any idea on how to achieve this? =/

GeorgePals (Tue, 09 Mar 2021 17:01:18 GMT):
I have 2 chaincodes. The first chaincode invokes a function at the second one. The invoked function needs to ask the CA to sign a challenge in order to prove that it accepts a function in the first chaincode to be called. For example Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 asks the CA to sign a message that approves the user that initiated all this to call another function ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Any idea on how to achieve this? =/

GeorgePals (Tue, 09 Mar 2021 17:01:18 GMT):
I have 2 chaincodes. The first chaincode invokes a function at the second one. The invoked function needs to ask the CAs Admin to sign a challenge in order to prove that it accepts a function in the first chaincode to be called. For example Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 asks the CA to sign a message that approves the user that initiated all this to call another function ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Any idea on how to achieve this? =/

GeorgePals (Tue, 09 Mar 2021 17:01:18 GMT):
I have 2 chaincodes. The first chaincode invokes a function at the second one. The invoked function needs to ask the CAs Admin to sign a challenge in order to prove that it accepts a function in the first chaincode to be called. For example Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 asks the CA Admin to sign a message that approves the user that initiated all this to call another function ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Any idea on how to achieve this? =/

GeorgePals (Tue, 09 Mar 2021 17:01:18 GMT):
I have 2 chaincodes. The first chaincode invokes a function at the second one. The invoked function needs to ask the CAs Admin to sign a challenge in order to prove that he accepts a function in the first chaincode to be called. For example Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 asks the CA Admin to sign a message that approves the user that initiated all this to call another function ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Any idea on how to achieve this? =/

GeorgePals (Tue, 09 Mar 2021 18:27:13 GMT):
Maybe I could use events? Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 *sends and event * and asks the CA Admin to sign a message that approves the user that initiated all this to call another function (*while all this happens, both functions in Chaincode 1 and 2 wait for an answer from the CA Admin)* ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants.

GeorgePals (Tue, 09 Mar 2021 18:27:13 GMT):
Maybe I could use events? Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 *sends an event * and asks the CA Admin to sign a message that approves the user that initiated all this to call another function (*while all this happens, both functions in Chaincode 1 and 2 wait for an answer from the CA Admin)* ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants.

GeorgePals (Tue, 09 Mar 2021 18:27:13 GMT):
Maybe I could use events? Invoke function (in chaincode 1) ---> Chaincode 1 calls function in Chaincode 2 ---> The called function in Chaincode 2 *sends an event * and asks the CA Admin to sign a message that approves the user that initiated all this to call another function (*while all this happens, both functions in Chaincode 1 and 2 wait for an answer from the CA Admin)* ---> Chaincode 2 returns the approval to Chaincode 1 ---> User can continue with what he wants. Edit: No, events won't work.

BrettLogan (Tue, 09 Mar 2021 19:09:22 GMT):
Are you looking for manual intervention from the CA Admin to approve the request?

GeorgePals (Tue, 09 Mar 2021 19:10:58 GMT):
Hello @BrettLogan For my issue, manual intervention, would be a more "logical solution", but if that can't be implemented, then an automated action (automated signing) is okay. Thank you!

GeorgePals (Tue, 09 Mar 2021 19:12:46 GMT):
For example, if, somehow, the chaincode can "wait" for the CAs Admins to sign the request, then okay! It sounds good.

GeorgePals (Tue, 09 Mar 2021 19:50:15 GMT):
I was thinking of emitting Events and, somehow, make the chaincode, wait, but, no way, right?

GeorgePals (Tue, 09 Mar 2021 19:50:15 GMT):
I was thinking of emitting Events and, somehow, make the chaincode wait, but, no way, right?

joy.osive (Tue, 09 Mar 2021 22:15:29 GMT):
Has joined the channel.

GeorgePals (Wed, 10 Mar 2021 14:58:51 GMT):
If anyone has any idea about the above issue that I have, I have asked on stackoverflow as well. Thanks! https://stackoverflow.com/questions/66561179/hyperledger-fabric-manual-intervention-for-approval-of-chaincode-invocation-fr

mbwhite (Thu, 11 Mar 2021 13:12:38 GMT):
Hi - I've just posted an answer :-)

GeorgePals (Thu, 11 Mar 2021 13:14:26 GMT):
Thank you, thank you, thank you for the feedback! I will take some time to investigate your answer! =)

haardikkk (Thu, 11 Mar 2021 22:08:56 GMT):
Has left the channel.

wangxiaobo1216 (Mon, 15 Mar 2021 01:45:14 GMT):

Clipboard - 2021年3月15日上午9点45分

wangxiaobo1216 (Mon, 15 Mar 2021 01:46:44 GMT):
how to solve this issue while upgrading chiancode version?

GeorgePals (Tue, 16 Mar 2021 20:09:59 GMT):
For some unknown reason, when I invoke some chaincode from another chaincode, it returns me a buffer that I can not "use". Of course I first JSON.stringify, Buffer.from(the_stringified_object) and then return it to the first chaincode. However, I receive something like: ` type: 'Buffer', data: [ ........... ] ` Any ideas? I try to fetch the data with `result.payload.toString('utf8')`

GeorgePals (Tue, 16 Mar 2021 20:09:59 GMT):
For some unknown reason, when I invoke some chaincode from another chaincode, it returns me a buffer that I can not "use". Of course I first JSON.stringify, Buffer.from(the_stringified_object) and then return it to the first chaincode. However, I receive something like: ``` type: 'Buffer', data: [ ........... ] ``` Any ideas? I try to fetch the data with `result.payload.toString('utf8')`

GeorgePals (Wed, 17 Mar 2021 15:13:47 GMT):
Okay, new issue :D I need to invoke some chaincode. Let's say that exist 2 chaincodes, CCA and CCB. CCA invokes a function from CCB. CCB needs from inside the invoked function to call a function of CCA to provide some info from its state. Can this happen? Of course I get an error of `txid: ....(channel) exists` when I try to invoke another function from CCA.

GeorgePals (Wed, 17 Mar 2021 15:14:56 GMT):
Is having a third chaincode (just for shared state) my only solution? Cause I do not want to have the state actually "shared".

amalendusuresh (Fri, 19 Mar 2021 03:46:37 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:43 GMT):
Has joined the channel.

GeorgePals (Fri, 19 Mar 2021 15:47:42 GMT):
I need to call a chaincode 2 times, simultaneously. The first call will start a "countdown", the second call (which will happen many times, from many orgs), will update a value. When the countdown ends, the "first call" will need to check all the appended new values (that were created by the second calls, from the other orgs). So, I make the first call - the function countdowns for, say, 5 minutes. I make a second call and add some data. The issue is that the data does not get endorsed - It awaits for the first invoke to finish the countdown, and of course I get a nice 'PHANTOM_READ_CONFLICT' error, because the data has not been appended. Any ideas? I tried to implement a second chaincode to use it as a "database", but it didnt work, as I had the same exact issue. I know that this is done for concurrency, but I need to find a way to achieve this. Any ideas? Thanks!

GeorgePals (Fri, 19 Mar 2021 15:47:42 GMT):
I need to call a chaincode 2 times, simultaneously. The first call will start a "countdown", the second call (which will happen many times, from many orgs), will add new values to the state (saved in different keys every time!) When the countdown ends, the "first call" will need to check all the appended new values (that were created by the second calls, from the other orgs). So, I make the first call - the function countdowns for, say, 5 minutes. I make a second call and add some data. The issue is that the data does not get endorsed - It awaits for the first invoke to finish the countdown, and of course I get a nice 'PHANTOM_READ_CONFLICT' error, because the data has not been appended. Any ideas? I tried to implement a second chaincode to use it as a "database", but it didnt work, as I had the same exact issue. I know that this is done for concurrency, but I need to find a way to achieve this. Any ideas? Thanks!

GeorgePals (Fri, 19 Mar 2021 15:47:42 GMT):
I need to call a chaincode 2 times, simultaneously. The first call will start a "countdown", the second call (which will happen many times, from many orgs), will add new values to the state (saved in different keys every time!) When the countdown ends, the "first call" will need to check all the appended new values (that were created by the second calls, from the other orgs). So, I make the first call - the function countdowns for, say, 5 minutes. I make a second call and add some data. The issue is that the data does not get endorsed - It awaits for the first invoke to finish the countdown, and of course I get a nice 'PHANTOM_READ_CONFLICT' error, because the data has not been appended. Any ideas? I tried to implement a second chaincode to use it as a "database", but it didnt work, as I had the same exact issue. I know that this is done for concurrency, but I need to find a way to achieve this. Thanks!

GeorgePals (Fri, 19 Mar 2021 19:45:27 GMT):
Okay, a solution is to create a new channel and have there the second chaincode. However, if there is another solution, I would really like to hear it. Thanks!

arun17 (Sat, 20 Mar 2021 18:25:57 GMT):
hi everyone can anyone help me out with the issue of TLS handshake failed with error EOF server=Orderer

selvaraman (Mon, 22 Mar 2021 12:31:15 GMT):
Hi! I am working on hlf 1.4 I had some code. I was worked before. after some months, I am trying same code again. I is giving some error. while instantiate process, [2021-03-22 17:53:47.592] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: cannot get package for chaincode (veuucc:v0) [2021-03-22 17:53:47.592] [ERROR] instantiate-chaincode - instantiate proposal resulted in an error :: Error: cannot get package for chaincode (veuucc:v0) [2021-03-22 17:53:47.592] [ERROR] instantiate-chaincode - Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: cannot get package for chaincode (veuucc:v0)

selvaraman (Mon, 22 Mar 2021 12:32:23 GMT):
help me to fix this issue.

knagware9 (Mon, 22 Mar 2021 15:49:36 GMT):
which fabric version? its failing at instantiate chaincode ?

selvaraman (Tue, 23 Mar 2021 03:15:14 GMT):
hyperledger fabric 1.4

cmhacker (Tue, 23 Mar 2021 05:28:13 GMT):
Hi, How to create a composite key in JAVA chaincode and retrieve it ?? I did some research but couldn't found any documentation or tutorial for this.

GeorgePals (Tue, 23 Mar 2021 10:28:01 GMT):
Here (line 54): https://github.com/hyperledger/fabric-samples/blob/cbf263dc3b73650d3832ef25e1c7db3c4aa49696/commercial-paper/organization/magnetocorp/contract-java/src/main/java/org/example/ledgerapi/impl/StateListImpl.java

GeorgePals (Tue, 23 Mar 2021 11:26:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=ALM5QjmzpdpktxsPR) Here (line 54): https://github.com/hyperledger/fabric-samples/blob/cbf263dc3b73650d3832ef25e1c7db3c4aa49696/commercial-paper/organization/magnetocorp/contract-java/src/main/java/org/example/ledgerapi/impl/StateListImpl.java

cmhacker (Tue, 23 Mar 2021 11:45:50 GMT):
Thank you so much

selvaraman (Tue, 23 Mar 2021 16:08:04 GMT):
hyperledger fabric 1.4

constantine2021 (Tue, 23 Mar 2021 16:20:59 GMT):
Has joined the channel.

constantine2021 (Tue, 23 Mar 2021 16:22:31 GMT):
Hello, i was curious - would someone be able to tell me if chaincode can write to a blockchain in another channel? Essentially , could a chaincode write an output to two different blockchains?

rjones (Tue, 23 Mar 2021 16:37:43 GMT):
@constantine2021 Hyperledger Cactus might be something to look into

constantine2021 (Tue, 23 Mar 2021 16:40:32 GMT):
Thanks!

selvaraman (Wed, 24 Mar 2021 11:28:06 GMT):
why we should not use crytogen in production for initial network start up. We can use crytogen to start the network, for new user registration we use CA right?

Bobbijn (Thu, 25 Mar 2021 15:04:28 GMT):
Has joined the channel.

selvaraman (Mon, 29 Mar 2021 16:17:37 GMT):
In HLF 1.4 I can get transaction id after successful invoke operation. But In HLF 2.x I am not getting txid. I can see the data which I submitted to hlf in state database (couch db). Then why I am not getting txid. Here is last line in chaincode, return shim.Success(nil) submit transaction using node sdk. result = await contract.submitTransaction(fcn, args); console.log("Result:", result.toString()) The above line gives empty. Help me to get tx id.

Amine95 (Mon, 29 Mar 2021 18:01:20 GMT):
Has joined the channel.

harshita (Thu, 01 Apr 2021 20:08:21 GMT):
Has joined the channel.

sauveergoel (Tue, 06 Apr 2021 19:32:55 GMT):
Has joined the channel.

Chem (Thu, 08 Apr 2021 12:42:40 GMT):
Has joined the channel.

Chem (Thu, 08 Apr 2021 12:42:57 GMT):
Hi Guys,

Chem (Thu, 08 Apr 2021 12:43:44 GMT):
Please help me to setup external chaincode?

nkl199 (Thu, 08 Apr 2021 16:17:42 GMT):
Has left the channel.

lukeledet (Thu, 08 Apr 2021 19:17:07 GMT):
Has joined the channel.

knagware9 (Fri, 09 Apr 2021 10:49:07 GMT):
@Chem https://medium.com/@robinklemens/setting-up-the-external-chaincode-builder-and-launcher-in-hyperledger-fabric-2-0-b17f43a3d8ed

GeorgePals (Fri, 09 Apr 2021 12:22:06 GMT):
Hello! I have 2 blockchains and I need to forward a transaction from, say, Blockchain 1 to Blockchain 2. The "easiest/more logical" way would be for the peer to forward the transaction after the endorsement (and somehow check that the invoker is some chaincode from Blockchain 1). However, this is not feasible; Thus, right now I have a NodeJS listener that forwards these transactions to Blockchain 2. However, I need to check that the transaction is indeed coming from "Blockchain 1" and has not been tampered (e.g., someone could send a fake transaction to Blockchain 2, that was not endorsed on Blockchain 1). I can get the Public Certificate of the transaction creator and the signature, from the transaction's response, under: `event.getTransactionEvent().transactionData.actions[0].payload.action.endorsements[0].endorser.id_bytes.toString()` and `event.getTransactionEvent().transactionData.actions[0].payload.action.endorsements[0].signature.toString()` respectively. However, I do not know how to check the signature on the smart contract on Blockchain 2. Both blockchains are being run by the same peers, so, I could easily verify with, say, peer0 that signed the transaction on Blockchain 1, the transaction's signature on Blockchain 2. But, how can I recreate the transaction signature on the chaincode on Blockchain 2 if I can't get the private key of peer0? Would just checking the certificate enough? :thinking: Thanks!

GeorgePals (Fri, 09 Apr 2021 12:26:00 GMT):
Another way would be to produce a key pair for each Peer and send it to them over transient data (and then sign some message with it in order for Blockchain 2 to easily check the message with the same key later), but I do not really like this solution.

GeorgePals (Fri, 09 Apr 2021 14:28:26 GMT):
TL-DR; I need to somehow verify on Blockchain-2 that a transaction really happened on Blockchain-1, while both these Blockchains are being operated by the "same peers" (meaning, the same certificates are used on both).

Javi (Tue, 13 Apr 2021 10:39:39 GMT):
hi all, one question, how can I inspect the content of a chaincode package?? I'm looking into this https://jira.hyperledger.org/browse/FAB-11532 but there are no info.... any idea?

shubhamshukla66360 (Thu, 15 Apr 2021 09:51:30 GMT):
Has joined the channel.

moguzsen (Fri, 16 Apr 2021 23:18:15 GMT):
Has joined the channel.

neha.jajodia (Wed, 21 Apr 2021 09:48:59 GMT):
Enterprise blockchain jumps 40% in 2020. Get early access to the original report on Enterprise Blockchain Protocols Evolution Index 2021. https://chainstack.com/download/enterprise-blockchain-protocols-evolution-index-2021/ The report provides detailed qualitative and quantitative on publicly available developer data of the 6 most popular enterprise blockchain protocols being used today - Autonity, Baseline, Besu, Corda, Fabric, Quorum.

skymatrix (Sun, 25 Apr 2021 10:42:15 GMT):
Has joined the channel.

srikumarcs (Mon, 26 Apr 2021 09:05:15 GMT):
Has joined the channel.

DevendranM (Mon, 26 Apr 2021 11:31:15 GMT):
Has joined the channel.

shubhamirpachi (Mon, 26 Apr 2021 19:09:29 GMT):
Has joined the channel.

amalendusuresh (Mon, 03 May 2021 03:48:15 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..

Ashish (Wed, 05 May 2021 15:04:03 GMT):
Hi all, Will the chaincode instantiation work if we setup a network using podman in RHEL?

Ashish (Wed, 05 May 2021 15:04:03 GMT):
Hi all, Will the chaincode instantiation work if we setup a network using podman in RHEL 8.x+?

Ashish (Wed, 05 May 2021 15:04:03 GMT):
Hi all, Will the chaincode instantiation work if we setup a network using podman in RHEL 8.x+? Or fabric is tightly coupled to docker daemon?

Ashish (Wed, 05 May 2021 15:08:13 GMT):
It will be tar.gz package as mentioned in the story. Pls check in your peer node, chaincode folder and copy it into local mount and inspect in the host OS.

barclayk (Thu, 06 May 2021 10:51:27 GMT):
Has joined the channel.

anweiss (Mon, 10 May 2021 17:00:59 GMT):
hey all, is there a proper way to return a bookmark from chaincode that supports pagination? I'm getting Unicode text like `\\u0000􏿿` and it's unclear how my client-side app can render this so it can take advantage of the bookmark for subsequent requests to the chaincode

jimwheaty (Wed, 12 May 2021 09:39:46 GMT):
Has joined the channel.

mageover (Sat, 15 May 2021 11:41:56 GMT):
Has joined the channel.

mageover (Sat, 15 May 2021 11:41:56 GMT):
Hello. I want to write a timed chaincode. I wish the chaincode won't response to any invoke after a certain period. In Ethereum, I can do this by counting blocks. For example, I can make a smart contract valid only before block 100000. But in hyperledger fabric, I don't know how to do it. Does anyone know how to achieve it?

jexus7 (Sun, 16 May 2021 11:31:48 GMT):
Has joined the channel.

jexus7 (Sun, 16 May 2021 11:31:49 GMT):
hello! I'm looking for any example of using "getStateByPartialCompositeKeyWithPagination() " in Java. Please someone knows any reference?

jexus7 (Sun, 16 May 2021 11:32:12 GMT):
and why is storing "\u" characters in the composite key like that?:

jexus7 (Sun, 16 May 2021 11:32:12 GMT):
and why is storing "\u" unicode characters in the composite key like that?:

jexus7 (Sun, 16 May 2021 11:32:26 GMT):

Clipboard - May 16, 2021 1:32 PM

BrettLogan (Sun, 16 May 2021 13:01:02 GMT):
We add the `\u` its a required key for the database. You don't have to deal with it, we append and remove it when needed

BrettLogan (Sun, 16 May 2021 13:01:02 GMT):
We add the `\u` its as the delimiter for the database. You don't have to deal with it, we append and remove it when needed

jexus7 (Mon, 17 May 2021 06:27:15 GMT):
thank you

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json`

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: `{ "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" }` but index is not created on deploy and I get the message exectuting the query: ` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] [17/5/2021 8:08:43] [INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.`

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: `{ "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" }` but index is not created on deploy and I get the message exectuting the query: ` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] `INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.``

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: `{ "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" }` but index is not created on deploy and I get the message exectuting the query: ` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.`

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: `{ "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" }` but index is not created on deploy and I get the message exectuting the query: [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: { "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" } but index is not created on deploy and I get the message exectuting the query: [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: `{ "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" }` but index is not created on deploy and I get the message exectuting the query: [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query.

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: ``` { "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" } ``` but index is not created on deploy and I get the message exectuting the query: ``` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query. ```

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: ``` { "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" } ``` but index is not created on deploy and I get the message exectuting the query: ``` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query. ```

jexus7 (Mon, 17 May 2021 06:30:11 GMT):
I'm trying to create an index on the chaincode. On the directory : `chaincode/META-INF/statedb/couchdb/indexes/idxApp.json` whith this code: ``` { "index": { "fields": [ "id_app" ] }, "name": "idxApp", "type": "json", "ddoc" : "idxAppDoc" } ``` but index is not created on deploy and I get the message exectuting the query: ``` [INFO] intelligent_banach|[ org1peer] No matching index found, create an index to optimize query time.] INFO] intelligent_banach|[ org1peer] 2021-05-17 06:08:43.434 UTC [couchdb] queryDocuments -> WARN 2c4 The query [{"limit":10,"selector":{"id_app":"app1"},"use_index":["idxAppDoc","idxApp"]}] caused the following warning: [_design/idxAppDoc, idxApp was not used because it is not a valid index for this query. ``` Any ideas please?

lcvalves (Mon, 17 May 2021 15:05:03 GMT):
Has joined the channel.

amalendusuresh (Tue, 18 May 2021 03:52:46 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 .

lcvalves (Tue, 18 May 2021 12:31:36 GMT):
Hi! Fabric Chaincode beginner here. How does Fabric support attribute relationship between States? How does it compare to a RDBMS functionally speaking? Say if I have an Object attribute that is represented in a different State class extension, how do we make that association?

victoryeo (Wed, 19 May 2021 08:07:59 GMT):
Has joined the channel.

victoryeo (Wed, 19 May 2021 08:08:00 GMT):
hello

victoryeo (Wed, 19 May 2021 08:08:13 GMT):
i have this error when invoke chaincode Error: endorsement failure during invoke. response: status:500 message:\"error in simulation: failed to execute transaction

danielkiszel (Wed, 19 May 2021 11:20:48 GMT):
Has joined the channel.

danielkiszel (Wed, 19 May 2021 11:20:49 GMT):
Hello

danielkiszel (Wed, 19 May 2021 11:21:00 GMT):
anyone here??

victoryeo (Wed, 19 May 2021 11:32:55 GMT):
hello , yes .

pritam_01 (Mon, 24 May 2021 03:31:46 GMT):
Has left the channel.

jexus7 (Tue, 25 May 2021 10:00:10 GMT):
it seems the problem is IBM pluging for VS Code can't create index. I haves tested on my Fabric network and is deployed correctly

davidkel (Tue, 25 May 2021 11:04:25 GMT):
Which version of vscode extension are you using and specifically which version of microfab that is used to provide the fabric environment ? Ideally if you could raise an issue here https://github.com/IBM-Blockchain/blockchain-vscode-extension with details of the problem that would be good

davidkel (Tue, 25 May 2021 12:26:36 GMT):
Looking at the message, it actually says the index was not valid for the query. that kind of suggests the index was installed ok

davidkel (Tue, 25 May 2021 17:18:02 GMT):
I've just tested 2.0.2 of the extension with microfab 0.0.11 and I was able to show that my index works by first not creating an index and getting the warning in the log output, then I added an index and then didn't get the warning. The META-INF directory was at the top level directory of my project and the chaincode was written in node

davidkel (Tue, 25 May 2021 17:18:43 GMT):
You can launch a couchdb fauxton interface from the extension where you can check the indexes that have been installed

davidkel (Tue, 25 May 2021 17:18:43 GMT):
You can launch a couchdb fauxton interface from the extension where you can check the indexes that have been installed using the blockchain extension command `Open CouchDB in browser`

Chem (Wed, 26 May 2021 05:13:18 GMT):
Hi Team, Is there way to install external chaincode using any of the fabric SDK?

severus-sn4pe (Wed, 26 May 2021 11:45:04 GMT):
Hi all, I'm trying to create a private data collection in a chaincode, but while approving the cc definition, I get `failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': error validating chaincode definition: collection-name: MyDataPrivate -- collection member 'Org1MSP' is not part of the channel`. the channel has 3 Orgs in it, Org1 is one of them and the PDC should only be accessible by Org1. In the collections_config.json I defined the policy `OR('Org1MSP.member')`. There isn't very much help available online about creating PDCs or how to troubleshoot them. Can anyone point me in a directions about what might be going wrong here or how I can debug that?

victoryeo (Fri, 28 May 2021 08:07:06 GMT):
how to overcome this error ? error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.

victoryeo (Fri, 28 May 2021 08:09:49 GMT):
what is PDC ?

severus-sn4pe (Fri, 28 May 2021 08:10:44 GMT):
private data collection

knagware9 (Fri, 28 May 2021 09:05:12 GMT):
@ser

knagware9 (Fri, 28 May 2021 09:05:53 GMT):
@severus-sn4pe Can you please share sample code, I think some steps missed like collection config file misconfiguration

severus-sn4pe (Fri, 28 May 2021 09:12:47 GMT):
This is the collection config file I use: ``` [ { "name": "MyDataPrivate", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive": 0, "memberOnlyRead": true, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "OR('Org1MSP.member')" } } ] ``` In this channel are total 3 organisations (Org1, Org2 and Org3). The PDC should only be accessible by Org1, so I used Org1MSP.member in policy and endorsementPolicy.signaturePolicy.

knagware9 (Fri, 28 May 2021 09:14:27 GMT):
this looks correct to me. Your previous message showing that ORg1 is not part of channel , can you check if ORG1 joined channel succesfully

severus-sn4pe (Fri, 28 May 2021 09:15:27 GMT):
and when I approve the chaincode after package and install, I simply added the param `--collections-config ./path-to-contract/collections_config.json` to `peer lifecycle chaincode approveformyorg`, and then I get the error from above (collection member 'Org1MSP' is not part of the channel)

knagware9 (Fri, 28 May 2021 09:18:09 GMT):
hmm. Org1MSP is MSP id of Org1?

knagware9 (Fri, 28 May 2021 09:18:19 GMT):
To use the previous lifecycle process to deploy a private data collection, use the --collections-config flag when instantiating your chaincode.

severus-sn4pe (Fri, 28 May 2021 09:20:16 GMT):
when I run `peer lifecycle chaincode install`? or what do you mean with instantiating?

knagware9 (Fri, 28 May 2021 09:20:28 GMT):
Can you follow this one https://hyperledger-fabric.readthedocs.io/en/release-2.2/private_data_tutorial.html

knagware9 (Fri, 28 May 2021 09:20:40 GMT):
lets see if you face any issue

severus-sn4pe (Fri, 28 May 2021 09:25:26 GMT):
that's exactly the tutorial I followed, instead of multiple collections, I just used one. I'm stuck at the part of deploying the contract to the channel.

RobertBetschinger (Fri, 28 May 2021 10:20:45 GMT):
Has joined the channel.

knagware9 (Fri, 28 May 2021 12:31:34 GMT):
ok

GeorgePals (Fri, 28 May 2021 13:56:27 GMT):
Hello. Quick question. I have a blockchain, deployed on kubernetes. On one of the chaincodes, I need to query an API that run on another POD. However, the chaincode cant see the API address: ``` Error: RequestError: getaddrinfo EAI_AGAIN some-external-api ``` I suspect that the issue is caused from the chaincode running on an "external" docker instance. Any ideas? Thanks!

GeorgePals (Fri, 28 May 2021 13:56:27 GMT):
Hello. Quick question. I have a blockchain, deployed on kubernetes. On one of the chaincodes, I need to query an API that runs on another POD. However, the chaincode cant see the API address: ``` Error: RequestError: getaddrinfo EAI_AGAIN some-external-api ``` I suspect that the issue is caused from the chaincode running on an "external" docker instance. Any ideas? Thanks!

GeorgePals (Fri, 28 May 2021 13:56:27 GMT):
Hello. Quick question. I have a blockchain, deployed on kubernetes. In one of the chaincodes, I need to query an API that runs on another POD. However, the chaincode cant see the API address: ``` Error: RequestError: getaddrinfo EAI_AGAIN some-external-api ``` I suspect that the issue is caused from the chaincode running on an "external" docker instance. Any ideas? Thanks!

davidkel (Fri, 28 May 2021 14:20:31 GMT):
async iterators are only available in the 2.2 node shim, make sure you are using the latest 2.2 version with node 12 and fabric 2.2

GeorgePals (Fri, 28 May 2021 20:21:27 GMT):
Okay. As I suspected it. I need to transform my CCs to external services :/ Is there any tutorial on how to do this with nodejs? Okay, I have read the documentation and found some tutorials, but I'm not really sure that I understand the procedure.

victoryeo (Sat, 29 May 2021 02:41:02 GMT):
I am using fabric 2.2 and node 12.9.1. The error happens when using getHistoryForKey in typescript. Is getHistoryForKey *not* supported in typescript ?

victoryeo (Sat, 29 May 2021 03:02:09 GMT):
Is your questions about chaincode querying external API? I think you can use a client app to querying external API, then send the result to chaincode.

victoryeo (Sat, 29 May 2021 03:02:47 GMT):
If you really want to use chaincode as external service, there is a guide: https://hyperledger-fabric.readthedocs.io/en/latest/cc_service.html

davidkel (Sat, 29 May 2021 06:42:44 GMT):
It's defined here https://github.com/hyperledger/fabric-chaincode-node/blob/689d31b2ee15fa482f70786c0040811f4cc66929/libraries/fabric-shim/types/index.d.ts#L116 with the implementation here https://github.com/hyperledger/fabric-chaincode-node/blob/689d31b2ee15fa482f70786c0040811f4cc66929/libraries/fabric-shim/lib/stub.js#L692 And a test here https://github.com/hyperledger/fabric-chaincode-node/blob/689d31b2ee15fa482f70786c0040811f4cc66929/libraries/fabric-shim/test/typescript/chaincode.ts#L203 so it should work. If not I suggest raising a jira with a sample

davidkel (Sat, 29 May 2021 07:02:21 GMT):
I've just tried it with fabric-shim 2.2.0 and it works for me

victoryeo (Sat, 29 May 2021 07:04:33 GMT):
did you try with nodejs javascript ? I use nodejs typescript, it does not work.

davidkel (Sat, 29 May 2021 07:05:07 GMT):
I did. compiles with no problem

davidkel (Sat, 29 May 2021 07:05:07 GMT):
I did. compiles with no problem with typescript

victoryeo (Sat, 29 May 2021 07:06:31 GMT):
could you share the code snippet here ?

victoryeo (Sat, 29 May 2021 07:06:56 GMT):
In fact, i could compile too

victoryeo (Sat, 29 May 2021 07:07:12 GMT):
but there is error in run time.

davidkel (Sat, 29 May 2021 07:09:10 GMT):
oh a runtime error

davidkel (Sat, 29 May 2021 07:13:18 GMT):
``` const pit = ctx.stub.getHistoryForKey(id); for await (const res of pit) if (res.isDelete) { // do something } } ````

davidkel (Sat, 29 May 2021 07:19:01 GMT):
Code also runs fine for me in fabric 2.2

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
my code: const qIterator = await chaincodeStub.getHistoryForKey(id); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId if (keyMod.isDelete) { resp.data = 'KEY DELETED'; } else { resp.data = keyMod.value.toString(); } results.push(resp); }

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
my code: const qIterator = await chaincodeStub.getHistoryForKey(id); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId .... results.push(resp); }

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
my code: ` const qIterator = await chaincodeStub.getHistoryForKey(id); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId .... results.push(resp); }`

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
my code: ` const qIterator = await chaincodeStub.getHistoryForKey(id); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId .... results.push(resp); } `

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
after remove the await. still have error error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
const qIterator = chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); }

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
const qIterator = await chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); }

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
`const qIterator = await chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); }`

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
````const qIterator = await chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); }````

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
```` const qIterator = await chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); }````

victoryeo (Sat, 29 May 2021 07:22:14 GMT):
``` const qIterator = await chaincodeStub.getHistoryForKey(scalarQueryPayload.identifier); const results = []; for await (const keyMod of qIterator) { let resp: Category resp.timestamp = keyMod.timestamp resp.txid = keyMod.txId ... results.push(resp); } ```

davidkel (Sat, 29 May 2021 07:23:18 GMT):
You've made a mistake. remove the await from the getHistoryForKey call

davidkel (Sat, 29 May 2021 07:23:43 GMT):
The await is part of the for loop

victoryeo (Sat, 29 May 2021 07:24:28 GMT):
right, let me remove it

victoryeo (Sat, 29 May 2021 07:26:19 GMT):
error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.

victoryeo (Sat, 29 May 2021 07:26:19 GMT):
after remove it. Error: error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.

victoryeo (Sat, 29 May 2021 07:30:26 GMT):

Clipboard - May 29, 2021 3:30 PM

davidkel (Sat, 29 May 2021 07:33:35 GMT):
If it's a runtime error then you should 1. check that you definitely are using fabric-shim 2.2 2. compile to a different target (try es2019 for node 12) to remove any polyfills

victoryeo (Sat, 29 May 2021 07:36:30 GMT):
yes, is it "fabric-shim": "2.2.0" in package.json

davidkel (Sat, 29 May 2021 07:36:55 GMT):
are you deploying to fabric or running unit tests ?

GeorgePals (Sat, 29 May 2021 07:37:41 GMT):
It's not exactly "external". The API that I want to talk to from the CC is inside a k8s pod. The peers are also into pods. The only issue is that, as of right now, the CCs are deployed the "usual way" as docker instances and not under pods.

victoryeo (Sat, 29 May 2021 07:38:20 GMT):
unit tests

davidkel (Sat, 29 May 2021 07:41:51 GMT):
so I would check my node_modules/fabric-shim/package.json to make sure it's 2.2 If it's still a problem then compile to a different target (in your tsconfig.json)

victoryeo (Sat, 29 May 2021 07:42:04 GMT):
Ok. Could you deploy the chaincode to pods ?

victoryeo (Sat, 29 May 2021 07:43:26 GMT):
it is 2.2 ``` "_from": "fabric-shim@2.2.0", "_id": "fabric-shim@2.2.0", ```

davidkel (Sat, 29 May 2021 07:48:08 GMT):
If you are using K8s then you should stop using the internal Docker builder and move to external builders because K8s has deprecated it's use of docker as it's container runtime (and although you could use DinD to do so requires you to run it with escalated privileges. I'm sure there must be examples out there of a K8s based external builder for fabric but fabric doesn't have a sample as far as I know

victoryeo (Sat, 29 May 2021 07:48:40 GMT):
in fact , it is compile error ```TSError: ⨯ Unable to compile TypeScript: src/modules/part/handler/partCommandHandlers.ts:205:32 - error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.```

victoryeo (Sat, 29 May 2021 07:48:40 GMT):
in fact , it is compile error ```TSError: ⨯ Unable to compile TypeScript: src/modules/pxx.ts:205:32 - error TS2504: Type 'Promise' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.```

victoryeo (Sat, 29 May 2021 07:49:29 GMT):
I change target to es2019, still getting same error

davidkel (Sat, 29 May 2021 07:50:14 GMT):
What version of typescript are you using ?

victoryeo (Sat, 29 May 2021 07:50:57 GMT):
it is ```"typescript": "^3.8.3",```

davidkel (Sat, 29 May 2021 07:55:01 GMT):
Strange. Same version as me but I can compile no problem

davidkel (Sat, 29 May 2021 07:57:40 GMT):
In vscode when you hover over qIterator and getHistoryForKey, what does vscode show you ?

victoryeo (Sat, 29 May 2021 08:01:14 GMT):
(method) ChaincodeStub.getHistoryForKey(key: string): Promise & AsyncIterable

victoryeo (Sat, 29 May 2021 08:01:14 GMT):
```(method) ChaincodeStub.getHistoryForKey(key: string): Promise & AsyncIterable```

victoryeo (Sat, 29 May 2021 08:01:35 GMT):
const qIterator: Promise & AsyncIterable

victoryeo (Sat, 29 May 2021 08:01:35 GMT):
```const qIterator: Promise & AsyncIterable```

davidkel (Sat, 29 May 2021 08:03:30 GMT):
What are the contents of your tsconfig.json ?

davidkel (Sat, 29 May 2021 08:05:05 GMT):
Also as this is a unit test how have you mocked chaincodeStub ?

victoryeo (Sat, 29 May 2021 08:09:51 GMT):
tsconfig ``` { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es2019", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "resolveJsonModule": true, "esModuleInterop": true, "allowJs": true }, "exclude": [ "node_modules" ] }```

victoryeo (Sat, 29 May 2021 08:09:51 GMT):
tsconfig.json ``` { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es2019", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "resolveJsonModule": true, "esModuleInterop": true, "allowJs": true }, "exclude": [ "node_modules" ] }```

victoryeo (Sat, 29 May 2021 08:13:34 GMT):
```import { ChaincodeMockStub } from '@theledger/fabric-mock-stub'; .... it('Should able to query history', async () => { const mockStub = new ChaincodeMockStub('MyMockStub', chaincode); await mockStub.mockInit('tx1', []); const txID = 'TX0002'; mockStub.mockTransactionStart(txID); const query1 = await mockStub.mockInvoke(txID, [ 'HistoryQueryPart', JSON.stringify({ identifier: validBulkImportPart_CmdFixture.payload.resources[0].identifier, }), ]);```

victoryeo (Sat, 29 May 2021 08:13:34 GMT):
```import { ChaincodeMockStub } from '@theledger/fabric-mock-stub'; .... it('Should able to query history', async () => { const mockStub = new ChaincodeMockStub('MyMockStub', chaincode); await mockStub.mockInit('tx1', []); const txID = 'TX0002'; mockStub.mockTransactionStart(txID); const query1 = await mockStub.mockInvoke(txID, [ 'HistoryQueryPart', JSON.stringify({ identifier: validB_CmdFixture.payload.resources[0].identifier, }), ]);```

victoryeo (Sat, 29 May 2021 08:13:34 GMT):
```import { ChaincodeMockStub } from '@theledger/fabric-mock-stub'; .... it('Should able to query history', async () => { const mockStub = new ChaincodeMockStub('MyMockStub', chaincode); await mockStub.mockInit('tx1', []); const txID = 'TX0002'; mockStub.mockTransactionStart(txID); const query1 = await mockStub.mockInvoke(txID, [ 'HistoryQuery', JSON.stringify({ identifier: validB_CmdFixture.payload.resources[0].identifier, }), ]);```

victoryeo (Sat, 29 May 2021 08:13:34 GMT):
```import { ChaincodeMockStub } from '@theledger/fabric-mock-stub'; .... it('Should able to query history', async () => { const mockStub = new ChaincodeMockStub('MyMockStub', chaincode); await mockStub.mockInit('tx1', []); const txID = 'TX0002'; mockStub.mockTransactionStart(txID); const query1 = await mockStub.mockInvoke(txID, [ 'HistoryQuery', JSON.stringify({ identifier: valid_CmdFixture.payload.resources[0].identifier, }), ]);```

davidkel (Sat, 29 May 2021 08:14:10 GMT):
The problem is with the mock, it doesn't have support for async iterators

davidkel (Sat, 29 May 2021 08:14:35 GMT):
It also looks like that mock has been archived by WeAreTheLedger

victoryeo (Sat, 29 May 2021 08:15:30 GMT):
Thank you !!!

victoryeo (Sat, 29 May 2021 08:15:58 GMT):
This thing '@theledger/fabric-mock-stub'; cannot support async iterators ?

davidkel (Sat, 29 May 2021 08:21:08 GMT):
The support would have to be added to it, however the project has been archived by the looks of it.

victoryeo (Sat, 29 May 2021 08:24:15 GMT):
'@theledger/fabric-mock-stub' supports up to fabric 1.4.x . And the getHistoryForKey was added in fabric 2.0 .

victoryeo (Sat, 29 May 2021 08:24:26 GMT):
thank you again.

davidkel (Sat, 29 May 2021 08:25:06 GMT):
getHistoryForKey was in 1.4, async iterators were added around the 2.1 version of the shim because it came in node 10 (I think) and fabric 1.4 only used node 8

victoryeo (Sat, 29 May 2021 08:30:15 GMT):
actually getHistoryForKey was present in fabric 1.4.x

victoryeo (Sat, 29 May 2021 08:30:15 GMT):
thanks.

victoryeo (Sat, 29 May 2021 08:37:21 GMT):
Hi sir, it looks like this is your github https://github.com/davidkel

GeorgePals (Sat, 29 May 2021 10:34:56 GMT):
So, I'm creating the orderer/peers like the example here: https://github.com/happilymarrieddad/hyperledger-fabric-kubernetes/blob/master/k8s/production/orgs/org1/peer0-deployment.yaml

GeorgePals (Sat, 29 May 2021 10:36:01 GMT):
Is this the appropriate way to create them? If yes, so my only issue is the chain codes that they should be implemented as external services, right? If no, how should I create them? Thanks!

GeorgePals (Sat, 29 May 2021 10:36:37 GMT):
Sorry, I got confused. Uh.

victoryeo (Sat, 29 May 2021 12:40:55 GMT):
The example that you follow, is using fabric 1.4.3. Which version of fabric do you want to use ?

GeorgePals (Sat, 29 May 2021 12:42:37 GMT):
Yep yep. Sorry about this. I was on mobile and tried to find an example similar to the code that Im using. I'm using HL 2.3. Btw, I'm trying to implement the BC through Helm, based on this repo: https://github.com/hyfen-nl/PIVT

victoryeo (Sat, 29 May 2021 13:01:27 GMT):
I saw this repo before. It should be good , though i have not tried it .

GeorgePals (Sat, 29 May 2021 13:02:29 GMT):
Thank you for your continues comments on my issue(s) victoryeo and david! Ok, ill try to bring up the network and then Ill see what Im going to do with the chaincodes.

GeorgePals (Sat, 29 May 2021 13:02:29 GMT):
Thank you for your continued comments on my issue(s) victoryeo and david! Ok, ill try to bring up the network and then Ill see what Im going to do with the chaincodes.

sj1 4 (Sun, 30 May 2021 15:21:16 GMT):
Has joined the channel.

GeorgePals (Sun, 30 May 2021 16:32:41 GMT):
Please, take a look here: https://stackoverflow.com/questions/67763348/hyperledger-fabric-chaincode-as-a-service-external-nodejs Thanks!

GeorgePals (Sun, 30 May 2021 21:29:04 GMT):
Hello! Can you please take a look here? https://stackoverflow.com/questions/67763348/hyperledger-fabric-chaincode-as-a-service-external-nodejs Thanks!

GeorgePals (Mon, 31 May 2021 10:41:04 GMT):
Re-created the post as I have made some progress and I needed a "cleaner" text. Here is the new version: https://stackoverflow.com/questions/67772205/hyperledger-fabric-install-external-chaincode-error-nodejs

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode TMSC, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_CERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_KEY=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_PEER_TLS_ROOTCERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2) if [ -z $CORE_TLS_CLIENT_CERT ]; then export CORE_PEER_TLS_ENABLED="false" fi exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder:

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode TMSC, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_CERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_KEY=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_PEER_TLS_ROOTCERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2) if [ -z $CORE_TLS_CLIENT_CERT ]; then export CORE_PEER_TLS_ENABLED="false" fi exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder: ``` #!/bin/sh set -euo pipefail BUILD_OUTPUT_DIR="$1" RELEASE_OUTPUT_DIR="$2" #if [ -d "$BUILD_OUTPUT_DIR/metadata" ]; then # cp -a "$BUILD_OUTPUT_DIR/metadata/"* "$RELEASE_OUTPUT_DIR/" #fi >&2 echo "TO METADAATA STO RELEASE" >&2 echo "$(ls "$BUILD_OUTPUT_DIR/metadata/")" #external chaincodes expect artifacts to be placed under "$RELEASE_OUTPUT_DIR"/chaincode/server if [ -f $BUILD_OUTPUT_DIR/chaincode/connection.json ]; then mkdir -p "$RELEASE_OUTPUT_DIR"/chaincode/server/tls echo "$(cat $BUILD_OUTPUT_DIR/chaincode/connection.json)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/connection.json #if tls_required is true, copy TLS files (using above example, the fully qualified path for these fils would be "$RELEASE_OUTPUT_DIR"/chaincode/server/tls) echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.crt echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.key echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/root.crt exit 0 fi exit 1 ```

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode some_chaincode, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_CERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_KEY=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_PEER_TLS_ROOTCERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2) if [ -z $CORE_TLS_CLIENT_CERT ]; then export CORE_PEER_TLS_ENABLED="false" fi exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder: ``` #!/bin/sh set -euo pipefail BUILD_OUTPUT_DIR="$1" RELEASE_OUTPUT_DIR="$2" #if [ -d "$BUILD_OUTPUT_DIR/metadata" ]; then # cp -a "$BUILD_OUTPUT_DIR/metadata/"* "$RELEASE_OUTPUT_DIR/" #fi >&2 echo "TO METADAATA STO RELEASE" >&2 echo "$(ls "$BUILD_OUTPUT_DIR/metadata/")" #external chaincodes expect artifacts to be placed under "$RELEASE_OUTPUT_DIR"/chaincode/server if [ -f $BUILD_OUTPUT_DIR/chaincode/connection.json ]; then mkdir -p "$RELEASE_OUTPUT_DIR"/chaincode/server/tls echo "$(cat $BUILD_OUTPUT_DIR/chaincode/connection.json)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/connection.json #if tls_required is true, copy TLS files (using above example, the fully qualified path for these fils would be "$RELEASE_OUTPUT_DIR"/chaincode/server/tls) echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.crt echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.key echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/root.crt exit 0 fi exit 1 ```

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode some_chaincode, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_CERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_KEY=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_PEER_TLS_ROOTCERT=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2) if [ -z $CORE_TLS_CLIENT_CERT ]; then export CORE_PEER_TLS_ENABLED="false" fi exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder: ``` #!/bin/sh set -euo pipefail BUILD_OUTPUT_DIR="$1" RELEASE_OUTPUT_DIR="$2" #external chaincodes expect artifacts to be placed under "$RELEASE_OUTPUT_DIR"/chaincode/server if [ -f $BUILD_OUTPUT_DIR/chaincode/connection.json ]; then mkdir -p "$RELEASE_OUTPUT_DIR"/chaincode/server/tls echo "$(cat $BUILD_OUTPUT_DIR/chaincode/connection.json)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/connection.json echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.crt echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.key echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/root.crt exit 0 fi exit 1 ```

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode some_chaincode, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" # setup the environment expected by the go chaincode shim export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT_FILE="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY_FILE="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT_FILE="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) # populate the key and certificate material used by the go chaincode shim CORE_TLS_CLIENT_CERT_FILE=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_TLS_CLIENT_KEY_FILE=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2) CORE_PEER_TLS_ROOTCERT_FILE=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2) if [ -z $CORE_TLS_CLIENT_CERT_FILE ]; then export CORE_PEER_TLS_ENABLED="false" fi # exec the chaincode to replace the script with the chaincode process exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder: ``` #!/bin/sh set -euo pipefail BUILD_OUTPUT_DIR="$1" RELEASE_OUTPUT_DIR="$2" #external chaincodes expect artifacts to be placed under "$RELEASE_OUTPUT_DIR"/chaincode/server if [ -f $BUILD_OUTPUT_DIR/chaincode/connection.json ]; then mkdir -p "$RELEASE_OUTPUT_DIR"/chaincode/server/tls echo "$(cat $BUILD_OUTPUT_DIR/chaincode/connection.json)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/connection.json echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.crt echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.key echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/root.crt exit 0 fi exit 1 ```

GeorgePals (Mon, 31 May 2021 15:13:39 GMT):
For some reason, I can't load the client TLS data (cert and key) and the rootcert file, in an external chaincode. The builder works fine without the TLS. Here is the error message: ``` failed to invoke chaincode some_chaincode, error: tls: failed to find any PEM data in certificate input failed to load client certificate ``` the RUN builder: ``` #!/bin/sh BUILD_OUTPUT_DIR="$1" RUN_METADATA_DIR="$2" # setup the environment expected by the go chaincode shim export CORE_CHAINCODE_ID_NAME=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/chaincode_id/) { print $(i+1); break }}}'| cut -d\" -f2) export CORE_PEER_TLS_ENABLED="true" export CORE_TLS_CLIENT_CERT_FILE="$RUN_METADATA_DIR/client.crt" export CORE_TLS_CLIENT_KEY_FILE="$RUN_METADATA_DIR/client.key" export CORE_PEER_TLS_ROOTCERT_FILE="$RUN_METADATA_DIR/root.crt" export CORE_PEER_LOCALMSPID=$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/mspid/) { print $(i+1); break }}}'| cut -d\" -f2) # populate the key and certificate material used by the go chaincode shim echo "$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$CORE_TLS_CLIENT_CERT_FILE" echo "$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$CORE_TLS_CLIENT_KEY_FILE" echo "$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$CORE_PEER_TLS_ROOTCERT_FILE" if [ -z echo "$(tr -d '\n' < "$RUN_METADATA_DIR/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" ]; then export CORE_PEER_TLS_ENABLED="false" fi # exec the chaincode to replace the script with the chaincode process exec "$BUILD_OUTPUT_DIR/chaincode" -peer.address=$(tr -d '\n' < "$ARTIFACTS/chaincode.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/peer_address/) { print $(i+1); break }}}'| cut -d\" -f2) ``` and the release builder: ``` #!/bin/sh set -euo pipefail BUILD_OUTPUT_DIR="$1" RELEASE_OUTPUT_DIR="$2" #external chaincodes expect artifacts to be placed under "$RELEASE_OUTPUT_DIR"/chaincode/server if [ -f $BUILD_OUTPUT_DIR/chaincode/connection.json ]; then mkdir -p "$RELEASE_OUTPUT_DIR"/chaincode/server/tls echo "$(cat $BUILD_OUTPUT_DIR/chaincode/connection.json)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/connection.json echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.crt echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/client_key/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/client.key echo "$(tr -d '\n' < "$BUILD_OUTPUT_DIR/chaincode/connection.json" | awk -F':' '{ for (i = 1; i < NF; i++){ if ($i~/root_cert/) { print $(i+1); break }}}'| cut -d\" -f2)" > "$RELEASE_OUTPUT_DIR"/chaincode/server/tls/root.crt exit 0 fi exit 1 ```

GeorgePals (Mon, 31 May 2021 21:16:28 GMT):
I don't know if I solved the above error, but now I'm getting a different one: ``` 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220c [core]pickfirstBalancer: UpdateSubConnState: 0xc003763830, {CONNECTING } 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220d [core]Channel Connectivity change to CONNECTING 2021-05-31 21:07:22.596 UTC [comm.tls] ClientHandshake -> ERRO 220e Client TLS handshake failed after 650.553µs with error: tls: first record does not look like a TLS handshake remoteaddress=10.152.183.111:4441 2021-05-31 21:07:22.597 UTC [grpc] WarningDepth -> DEBU 220f [core]grpc: addrConn.createTransport failed to connect to {cc-some_chaincode-some_org:4441 cc-some_chaincode-some_org:4441 0 }. Err: connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2021-05-31 21:07:22.597 UTC [grpc] InfoDepth -> DEBU 2210 [core]Subchannel Connectivity change to TRANSIENT_FAILURE ``` The server's code: ``` 'use strict'; const { Shim } = require('fabric-shim'); const path=require('path'); const fs=require('fs'); const chaincode = require('./lib/some_chaincode.js'); function main() { const tlsCertsPath = path.resolve(__dirname, 'lib', 'tls'); const tlsKey = fs.readFileSync(path.resolve(tlsCertsPath, 'server.key')); const tlsCert = fs.readFileSync(path.resolve(tlsCertsPath, 'server.crt')); const rootCert = fs.readFileSync(path.resolve(tlsCertsPath, 'ca.crt')); const ccid = process.env.CHAINCODE_CCID; const address = process.env.CHAINCODE_ADDRESS; const port = process.env.CHAINCODE_PORT; const server = Shim.server(new chaincode(), { ccid: ccid, address: address + ':' + port, tlsProps: { key: tlsKey, cert: tlsCert, clientCACerts: rootCert, } }); server.start().then((res) => { console.log('Server running successfully at' + address); }); } main(); ``` If i disable the TLS from the "deploy chaincode" script, I can initialize the chaincode - thus the server does not use TLS. Any ideas?

GeorgePals (Mon, 31 May 2021 21:16:28 GMT):
I don't know if I solved the above error, but now I'm getting a different one: ``` 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220c [core]pickfirstBalancer: UpdateSubConnState: 0xc003763830, {CONNECTING } 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220d [core]Channel Connectivity change to CONNECTING 2021-05-31 21:07:22.596 UTC [comm.tls] ClientHandshake -> ERRO 220e Client TLS handshake failed after 650.553µs with error: tls: first record does not look like a TLS handshake remoteaddress=10.152.183.111:4441 2021-05-31 21:07:22.597 UTC [grpc] WarningDepth -> DEBU 220f [core]grpc: addrConn.createTransport failed to connect to {cc-some_chaincode-some_org:4441 cc-some_chaincode-some_org:4441 0 }. Err: connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2021-05-31 21:07:22.597 UTC [grpc] InfoDepth -> DEBU 2210 [core]Subchannel Connectivity change to TRANSIENT_FAILURE ``` The server's code: ``` 'use strict'; const { Shim } = require('fabric-shim'); const path=require('path'); const fs=require('fs'); const chaincode = require('./lib/some_chaincode.js'); function main() { const tlsCertsPath = path.resolve(__dirname, 'lib', 'tls'); const tlsKey = fs.readFileSync(path.resolve(tlsCertsPath, 'server.key')); const tlsCert = fs.readFileSync(path.resolve(tlsCertsPath, 'server.crt')); const rootCert = fs.readFileSync(path.resolve(tlsCertsPath, 'ca.crt')); const ccid = process.env.CHAINCODE_CCID; const address = process.env.CHAINCODE_ADDRESS; const port = process.env.CHAINCODE_PORT; const server = Shim.server(new chaincode(), { ccid: ccid, address: address + ':' + port, tlsProps: { key: tlsKey, cert: tlsCert, clientCACerts: rootCert, } }); server.start().then((res) => { console.log('Server running successfully at' + address); }); } main(); ``` If i disable the TLS from the "deploy chaincode" script, I can initialize the chaincode - thus the server does not use TLS. Any ideas?

GeorgePals (Mon, 31 May 2021 21:16:28 GMT):
I don't know if I solved the above error, but now I'm getting a different one: ``` 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220c [core]pickfirstBalancer: UpdateSubConnState: 0xc003763830, {CONNECTING } 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220d [core]Channel Connectivity change to CONNECTING 2021-05-31 21:07:22.596 UTC [comm.tls] ClientHandshake -> ERRO 220e Client TLS handshake failed after 650.553µs with error: tls: first record does not look like a TLS handshake remoteaddress=10.152.183.111:4441 2021-05-31 21:07:22.597 UTC [grpc] WarningDepth -> DEBU 220f [core]grpc: addrConn.createTransport failed to connect to {cc-some_chaincode-some_org:4441 cc-some_chaincode-some_org:4441 0 }. Err: connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2021-05-31 21:07:22.597 UTC [grpc] InfoDepth -> DEBU 2210 [core]Subchannel Connectivity change to TRANSIENT_FAILURE ``` The server's code: ``` 'use strict'; const { Shim } = require('fabric-shim'); const path=require('path'); const fs=require('fs'); const chaincode = require('./lib/some_chaincode.js'); function main() { const tlsCertsPath = path.resolve(__dirname, 'lib', 'tls'); const tlsKey = fs.readFileSync(path.resolve(tlsCertsPath, 'server.key')); const tlsCert = fs.readFileSync(path.resolve(tlsCertsPath, 'server.crt')); const rootCert = fs.readFileSync(path.resolve(tlsCertsPath, 'ca.crt')); const ccid = process.env.CHAINCODE_CCID; const address = process.env.CHAINCODE_ADDRESS; const port = process.env.CHAINCODE_PORT; const server = Shim.server(new chaincode(), { ccid: ccid, address: address + ':' + port, tlsProps: { key: tlsKey, cert: tlsCert, clientCACerts: rootCert, } }); server.start().then((res) => { console.log('Server running successfully at' + address); }); } main(); ``` If i disable the TLS from the "deploy chaincode" script, I can initialize the chaincode Any ideas?

GeorgePals (Mon, 31 May 2021 21:16:28 GMT):
I don't know if I solved the above error, but now I'm getting a different one: ``` 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220c [core]pickfirstBalancer: UpdateSubConnState: 0xc003763830, {CONNECTING } 2021-05-31 21:07:22.595 UTC [grpc] InfoDepth -> DEBU 220d [core]Channel Connectivity change to CONNECTING 2021-05-31 21:07:22.596 UTC [comm.tls] ClientHandshake -> ERRO 220e Client TLS handshake failed after 650.553µs with error: tls: first record does not look like a TLS handshake remoteaddress=10.152.183.111:4441 2021-05-31 21:07:22.597 UTC [grpc] WarningDepth -> DEBU 220f [core]grpc: addrConn.createTransport failed to connect to {cc-some_chaincode-some_org:4441 cc-some_chaincode-some_org:4441 0 }. Err: connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2021-05-31 21:07:22.597 UTC [grpc] InfoDepth -> DEBU 2210 [core]Subchannel Connectivity change to TRANSIENT_FAILURE ``` The server's code: ``` 'use strict'; const { Shim } = require('fabric-shim'); const path=require('path'); const fs=require('fs'); const chaincode = require('./lib/some_chaincode.js'); function main() { const tlsCertsPath = path.resolve(__dirname, 'lib', 'tls'); const tlsKey = fs.readFileSync(path.resolve(tlsCertsPath, 'server.key')); const tlsCert = fs.readFileSync(path.resolve(tlsCertsPath, 'server.crt')); const rootCert = fs.readFileSync(path.resolve(tlsCertsPath, 'ca.crt')); const ccid = process.env.CHAINCODE_CCID; const address = process.env.CHAINCODE_ADDRESS; const port = process.env.CHAINCODE_PORT; const server = Shim.server(new chaincode(), { ccid: ccid, address: address + ':' + port, tlsProps: { disabled: false, key: tlsKey, cert: tlsCert, clientCACerts: rootCert, } }); server.start().then((res) => { console.log('Server running successfully at' + address); }); } main(); ``` If i disable the TLS from the "deploy chaincode" script, I can initialize the chaincode Any ideas?

rjones (Tue, 01 Jun 2021 00:11:15 GMT):
Has left the channel.

GeorgePals (Tue, 01 Jun 2021 10:08:10 GMT):
Still having lots of errors. Now with the NodeJS server. ``` > some_chaincode@0.0.1 start /home/user/Project/block/blockchain/chaincodes/some_chaincode > fabric-chaincode-node server --chaincode-address 0.0.0.0:4441 --chaincode-id mycc_v0:abcdef1234567 --module-path '/home/user/Project/block/blockchain/chaincodes/some_chaincode' 2021-06-01T10:06:25.223Z info [c-api:./lib/contract.js] Creating new Contract 2021-06-01T10:06:25.240Z info [c-api:contracts-spi/bootstrap.js] No metadata file supplied in contract, introspection will generate all the data fabric-chaincode-node server --chaincode-address 0.0.0.0:9999 --chaincode-id mycc_v0:abcdef12345678... Options: --help Show help [boolean] -v, --version Show version number [boolean] --chaincode-address [string] [required] --grpc.max_send_message_length [number] [default: -1] --grpc.max_receive_message_length [number] [default: -1] --grpc.keepalive_time_ms [number] [default: 110000] --grpc.http2.min_time_between_pings_ms [number] [default: 110000] --grpc.keepalive_timeout_ms [number] [default: 20000] --grpc.http2.max_pings_without_data [number] [default: 0] --grpc.keepalive_permit_without_calls [number] [default: 1] --chaincode-id [string] [required] --chaincode-tls-cert-file [string] --chaincode-tls-cert-path [string] --chaincode-tls-key-file [string] --chaincode-tls-key-path [string] --chaincode-tls-client-cacert-file [string] --chaincode-tls-client-cacert-path [string] --module-path [string] [default: "/home/user/Project/block/blockchain/chaincodes/some_chaincode"] TypeError: contractClass is not a constructor at ChaincodeFromContract._resolveContractImplementations (/home/user/Project/block/blockchain/chaincodes/some_chaincode/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:161:30) at new ChaincodeFromContract (/home/user/Project/block/blockchain/chaincodes/some_chaincode/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:57:45) at Function.register (/home/user/Project/block/blockchain/chaincodes/some_chaincode/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:36:27) at Function.bootstrap (/home/user/Project/block/blockchain/chaincodes/some_chaincode/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:56:19) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! some_chaincode@0.0.1 start: `fabric-chaincode-node server --chaincode-address 0.0.0.0:4441 --chaincode-id mycc_v0:abcdef1234567 --module-path '/home/user/Project/block/blockchain/chaincodes/some_chaincode'` ```

GeorgePals (Tue, 01 Jun 2021 10:08:52 GMT):
I'm using the example, as the server: ``` const shim = require('fabric-shim'); class SimpleChaincode extends shim.ChaincodeInterface { async Init(stub) { // ... Init code } async Invoke(stub) { // ... Invoke code } } const server = shim.server(new SimpleChaincode(), { ccid: "mycc:fcbf8724572d42e859a7dd9a7cd8e2efb84058292017df6e3d89178b64e6c831", address: "0.0.0.0:9999" }); server.start(); ```

davidkel (Tue, 01 Jun 2021 10:38:53 GMT):
Maybe done use the fabric-chaincode-node as the launcher, just do `node server.js ...` ?

davidkel (Tue, 01 Jun 2021 10:38:53 GMT):
Maybe dont use the fabric-chaincode-node as the launcher, just do `node server.js ...` ?

GeorgePals (Tue, 01 Jun 2021 10:47:24 GMT):
Uh, that must have been the reason. Just to mention that yesterday I was able to run the server and I couldn't understand why I can't today. Thank you david!

GeorgePals (Tue, 01 Jun 2021 12:13:41 GMT):
Okay, last question (for now :P) How can I avoid the `"chaincode" argument must implement Init() and Invoke() methods`? I already have my methods ready, and I just need the server to pass the ctx/arguments to the methods. In the external-chaincode example here https://github.com/hyperledger/fabric-samples/blob/1cd71fd26a867efcb0577e02fa42a48a3203ec51/asset-transfer-basic/chaincode-external/assetTransfer.go the chaincode does not implement any Init() or Invoke() methods and does what I just want. However, I can not find any way to accomplish the same on NodeJS.

GeorgePals (Tue, 01 Jun 2021 12:16:27 GMT):
I already extend my contract's class `class Chaincode extends Contract {}`, however, it still wants the Init() and Invoke() methods.

davidkel (Tue, 01 Jun 2021 12:20:44 GMT):
If the chaincode server can work with chaincode that implements the Contract api then that would be a bug in the chaincode as a server implementation in node, because the implementation of Init and Invoke are not part of the Contract class

GeorgePals (Tue, 01 Jun 2021 13:03:20 GMT):
Or maybe this functionality is not implemented for node?

davidkel (Tue, 01 Jun 2021 16:06:54 GMT):
there might be a different approach when using a contract

davidkel (Tue, 01 Jun 2021 16:09:53 GMT):
looks like if you have a contract use ``` fabric-chaincode-node server ... ``` If you have a standard chaincode then use ```node mychaincode```

GeorgePals (Tue, 01 Jun 2021 16:11:39 GMT):
But if i do this, I'm going to have the same problem again, with the error :/

GeorgePals (Tue, 01 Jun 2021 16:12:19 GMT):
I think that I found a way: ``` async Invoke(stub) { let ret = stub.getFunctionAndParameters(); let params = ret.params; let fn = ret.fcn; if (contract[fn]) { const response = await contract[fn](stub, ...params); return response; } else { return shim.error('Unknown functionality'); } } ```

GeorgePals (Tue, 01 Jun 2021 16:12:40 GMT):
Havent tested it yet, but I dont see the reason why it wouldnt work

davidkel (Tue, 01 Jun 2021 16:17:28 GMT):
If you have a contract then looking at the code you launch it using `fabric-chaincode-node` server and it will generate a chaincode from that and then start it in server mode, ie you wouldn't use shim.server

davidkel (Tue, 01 Jun 2021 16:17:28 GMT):
If you have a contract then looking at the code you launch it using `fabric-chaincode-node server` and it will generate a chaincode from that and then start it in server mode, ie you wouldn't use shim.server

GeorgePals (Tue, 01 Jun 2021 16:18:12 GMT):
Oh oh, okay. Ill test it in a while. Thank you very much david.

GeorgePals (Tue, 01 Jun 2021 18:43:34 GMT):
Aaaaaaand, it worked. Thank you very-very much david, for your time and your suggestions!

GeorgePals (Tue, 01 Jun 2021 18:43:34 GMT):
Aaaaaaand, it worked. Thank you very-very much david, for your time and suggestions!

HarshMultani (Thu, 03 Jun 2021 02:47:11 GMT):
Hi Everyone. I am trying to create a fabric application using node. And so from the /fabric-samples/test-network directory, when I run the command - ./network.sh up. It starts the network and then the orderer is running on port 7053. Now, when I run the command - ./network.sh createChannel -c channel1 -ca It outputs, Error: Post "https://localhost:7053/participation/v1/channels": read tcp 127.0.0.1:60864->127.0.0.1:7053: read: connection reset by peer Channel creation failed Why is it occuring and how can it be resolved? I researched about this on github/stackoverflow. But could not get any answers.

greg2git (Sun, 06 Jun 2021 16:25:04 GMT):
yaml config files are your 'best friend' so it could be just a 'space'

kayterina (Mon, 07 Jun 2021 15:10:16 GMT):
Has joined the channel.

cthtuf (Wed, 09 Jun 2021 09:03:40 GMT):
Has joined the channel.

victoryeo (Thu, 10 Jun 2021 12:36:33 GMT):
i want to see chaincode debug log. Chaincode runs as a docker container in peer. But my peer node does not have docker command. So how can i see the debug log ? $ kubectl -n bc exec -it peer-name -- sh / # docker sh: docker: not found / #

severus-sn4pe (Thu, 10 Jun 2021 13:30:27 GMT):
Hi all. I have the problem that `ctx.stub.getPrivateDataByPartialCompositeKey` does not return a `StateQueryIterator`, but an object with attribute `iterator`, that contains the StateQueryIterator. Does anybody experience the same? (running a typescript chaincode on Fabric 2.2.2)

severus-sn4pe (Thu, 10 Jun 2021 13:34:25 GMT):
here are two console logs from the chaincode, first I called `getStateByPartialCompositeKey`, that returns a StateQueryIterator correctly (marked in red outline). Then I call `getPrivateDataByPartialCompositeKey` that should return the same objec type, but I get an Object with an interator attribute (marked in green outline):

severus-sn4pe (Thu, 10 Jun 2021 13:34:38 GMT):

Clipboard - June 10, 2021 3:34 PM

severus-sn4pe (Thu, 10 Jun 2021 13:37:03 GMT):
I'm using the implicit private data collection `_implicit_org_`

victoryeo (Thu, 10 Jun 2021 14:10:46 GMT):
i am using fabric 2.2 . Is chaincode debugging supported by IBM blockchain platform.

victoryeo (Thu, 10 Jun 2021 14:10:46 GMT):
i am using fabric 2.2 . Is chaincode debugging supported by IBM blockchain platform only?

davidkel (Thu, 10 Jun 2021 14:33:00 GMT):
Take a look at https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/tutorial-using-iterators.html which clarifies what you see

severus-sn4pe (Fri, 11 Jun 2021 08:33:34 GMT):
thanks for the link! that solves it.

victoryeo (Fri, 11 Jun 2021 08:41:50 GMT):
fabric 2.2 chaincode cannot be debugged ?

victoryeo (Sat, 12 Jun 2021 03:15:29 GMT):
I want to see the chaincode container debug output in fabric peer node. But I could not find docker command in peer node. To do a quick test, i run "docker run -v core.yaml:/go/src/github.com/hyperledger/fabric/peer/core.yaml -it hyperledger/fabric-peer:2.2 /bin/sh" Confirm, there isn't docker command in the fabric peer node.

Djx (Sun, 13 Jun 2021 22:52:31 GMT):
Has joined the channel.

victoryeo (Mon, 14 Jun 2021 02:54:46 GMT):
so how to see chaincode output in fabric 2.2 ?

GeorgePals (Wed, 16 Jun 2021 13:40:38 GMT):
I think that I have an issue with my chaincodes. When a chaincode invokes a function of another chaincode, then I can only "get" the response of the invoked function through: ``` const chaincodeResp = JSON.parse(await ctx.stub.invokeChaincode(chaincodeName, args, channel)); if (chaincodeResp.status !== 200) { // throw some error } const chaincodeBuffer = Buffer.from(chaincodeResp.payload, 'base64'); const chaincodeResponse = HelperClass.jsonParser(chaincodeBuffer.toString('utf8')); if (chaincodeResponse.status !== 200) { // throw some error } // The actual payload const buffer = Buffer.from(chaincodeResponse.payload, 'base64'); const actualResponse = JSON.parse(buffer.toString('utf8')); return actualResponse; ``` As you can see, I have two "buffers" with two "payloads". Is this issue created because the invoked chaincode sends the response with `Shim.success(Buffer.from(...))`? So, it wraps the actual response?

victoryeo (Thu, 17 Jun 2021 04:46:28 GMT):
I pass in a request to query chaincode. There is an error. Is this error from getQueryResult() ? error: transaction returned with failure: Error: GET_QUERY_RESULT failed: error handling CouchDB request. Error:invalid_key, Status Code:400, Reason:Invalid key pageSize for this request.

victoryeo (Thu, 17 Jun 2021 08:38:40 GMT):
hello, is there anyway to see debug log of deploy chaincode ? I use fabric 2.2.

victoryeo (Thu, 17 Jun 2021 08:38:40 GMT):
hello, is there anyway to see debug log of deployed chaincode ? I use fabric 2.2.

victoryeo (Thu, 17 Jun 2021 09:20:13 GMT):
or error is from getQueryResultWithPagination ?

victoryeo (Thu, 17 Jun 2021 09:37:17 GMT):
CORE_VM_DOCKER_ATTACHSTDOUT=true

mbeza (Thu, 17 Jun 2021 11:42:51 GMT):
Has joined the channel.

victoryeo (Thu, 17 Jun 2021 13:06:19 GMT):
you can get the response after invoking another chaincode function, so there is no error.

GeorgePals (Thu, 17 Jun 2021 13:14:48 GMT):
Yep, everything works but its just getting "wrapped" 2 times so I wasnt sure if that was "okay/appropriate". Thank you vic.

victoryeo (Thu, 17 Jun 2021 13:33:32 GMT):
another error: [e0802277] Failed to handle GET_QUERY_RESULT. error: error handling CouchDB request. Error:invalid_bookmark, Status Code:400, Reason:Invalid bookmark value: "0"

victoryeo (Fri, 18 Jun 2021 08:13:01 GMT):
i call

victoryeo (Fri, 18 Jun 2021 08:13:01 GMT):
i call this getQueryResultWithPagination let newpayload: QueryGenericPayload = { selector: {'type': 'doctype'}, pageSize : 2, bookmark: "0" } i get this error: error handling CouchDB request. Error:invalid_key, Status Code:400, Reason:Invalid key pageSize for this request.

GeorgePals (Fri, 18 Jun 2021 08:20:27 GMT):
I need to have some functions that can be only invoked by other chaincodes. These functions will co-exist with other functions that can be also invoked by clients (admins, simple users etc). Is there any way to achieve this? e.g. user invokes function `testFunc` ---> `testFunc` only accepts invocations by other chaincodes ---> `testFunc` throws error

GeorgePals (Fri, 18 Jun 2021 08:20:27 GMT):
I need to have some functions that can be only invoked by other chaincodes. These functions will co-exist with other functions that can be also invoked by clients (admins, simple users etc). Is there any way to achieve this? e.g. user invokes function `testFunc` ---> `testFunc` only accepts invocations by other chaincodes and not by users ---> `testFunc` throws error

GeorgePals (Fri, 18 Jun 2021 08:20:27 GMT):
I need to have some functions that can be only invoked by other chaincodes. These functions will co-exist with other functions that can be also invoked by clients (admins, simple users etc). Is there any way to achieve this? e.g. user invokes function `testFunc` ---> `testFunc` only accepts invocations by other chaincodes and not by users ---> `testFunc` throws an error

victoryeo (Fri, 18 Jun 2021 08:27:56 GMT):
the two chaincodes and users are deployed on same channel. I do not think it is possible to limit chaincode to be called only by chaincode.

GeorgePals (Fri, 18 Jun 2021 08:29:11 GMT):
Maybe an idea would be to disallow access to clients/admins etc? Like: if (cid.assertAttributeValue('role', 'admin')) { return Shim.error(Buffer.from(`Access forbidden`)); }

GeorgePals (Fri, 18 Jun 2021 08:29:37 GMT):
Oh wait. Then the chaincode won't be called because the invoker is actually the user.

GeorgePals (Fri, 18 Jun 2021 08:29:39 GMT):
Uh.

victoryeo (Fri, 18 Jun 2021 08:31:35 GMT):
yeah

victoryeo (Fri, 18 Jun 2021 08:32:33 GMT):
It seems there are only 2 person active on this fabric-chaincode-dev channel !!

GeorgePals (Fri, 18 Jun 2021 08:32:46 GMT):
So the only way would be to have two channels?

GeorgePals (Fri, 18 Jun 2021 08:35:57 GMT):
Uh, the other way would be to maybe sign something (e.g. a JWT) with a key that only the chaincodes can have and this way I could "authenticate" the request.

victoryeo (Fri, 18 Jun 2021 08:36:11 GMT):
two different channels, the chaincode cannot call chaincode on different channel

GeorgePals (Fri, 18 Jun 2021 08:37:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=XJ9t32bjWTRMudoeu) Yes, it can vic.

victoryeo (Fri, 18 Jun 2021 08:42:11 GMT):
Alright, it can. https://stackoverflow.com/questions/51630962/chaincode-calling-another-chaincode-hyperledger-fabric

GeorgePals (Fri, 18 Jun 2021 08:43:30 GMT):
Yes, we just need to pass the `channelID` and it just works.

victoryeo (Fri, 18 Jun 2021 09:14:02 GMT):
Is pageSize not supported in fabric 2.2 ?

GeorgePals (Fri, 18 Jun 2021 09:14:46 GMT):
One last question. Right now I'm deploying a different pod that runs the chaincode, for every organization (!). Is it appropriate to only deploy one pod and all the orgs to call this one pod? I am not sure about the instantiation of the chaincode, but I think that if I give a custom name to the chaincode (through the `--name` arg) it will be okay.

GeorgePals (Fri, 18 Jun 2021 09:14:46 GMT):
One last question. Right now I'm deploying a different pod that runs the chaincode, for every organization (!). Is it appropriate to only deploy one pod and all the orgs to call this one pod? For the thing that I am not so sure, is the instantiation of the chaincode and its Package ID.

GeorgePals (Fri, 18 Jun 2021 09:14:46 GMT):
One last question. Right now I'm deploying a different pod that runs the chaincode, for every organization. Is it appropriate to only deploy one pod and all the orgs to call this one pod? For the thing that I am not so sure, is the instantiation of the chaincode and its Package ID.

victoryeo (Fri, 18 Jun 2021 09:38:22 GMT):
I run the peer command manually: this works. peer chaincode query -C part -n part-chaincode -c '{"Args":["GetAllParts", "{\"selector\":{\"docType\":\"part\"}}"]}' this cannot work peer chaincode query -C part -n part-chaincode -c '{"Args":["GetAllParts", "{\"selector\":{\"docType\":\"part\"}, \"pageSize\": 2}"]}'

victoryeo (Fri, 18 Jun 2021 09:38:22 GMT):
I run the peer command manually: this works. peer chaincode query -C part -n part-chaincode -c '{"Args":["MyCmd", "{\"selector\":{\"docType\":\"part\"}}"]}' this cannot work peer chaincode query -C part -n part-chaincode -c '{"Args":["MyCmd", "{\"selector\":{\"docType\":\"part\"}, \"pageSize\": 2}"]}'

victoryeo (Fri, 18 Jun 2021 09:38:22 GMT):
I run the peer command manually: this works. peer chaincode query -C part -n part-chaincode -c '{"Args":["MyCmd", "{\"selector\":{\"docType\":\"part\"}}"]}' this cannot work peer chaincode query -C part -n part-chaincode -c '{"Args":["MyCmd", "{\"selector\":{\"docType\":\"part\"}, \"pageSize\": 2}"]}' Error: GET_QUERY_RESULT failed: transaction ID: bb12d71dba85fdcf6218480564f73ff779418c05aec5e433e78b100816461c2f: error handling CouchDB request. Error:invalid_key, Status Code:400, Reason:Invalid key pageSize for this request."

victoryeo (Fri, 18 Jun 2021 09:39:42 GMT):
is pageSize support removed from the couchDB ?

victoryeo (Fri, 18 Jun 2021 09:40:23 GMT):
i use couchdDb 0.4.10

victoryeo (Fri, 18 Jun 2021 09:45:25 GMT):
Please, any comment ?

victoryeo (Fri, 18 Jun 2021 10:33:26 GMT):
the query is wrong

victoryeo (Fri, 18 Jun 2021 10:34:26 GMT):
it should be peer chaincode query -C part -n part-chaincode -c '{"Args":["MyCmd ", "{\"selector\":{\"docType\":\"part\"}}","2"]}'

victoryeo (Fri, 18 Jun 2021 11:43:15 GMT):
This chaincode function, getQueryResultWithPagination(query, pageSize, bookmark) , bookmark is like this g1AAAABWeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYoLGwKBaQ2INNQ1hACQUg6YUlyKsgCcDxS3 If we want to read the data at 10,001 location, is there a way to skip the first 10,000 data ?

victoryeo (Mon, 21 Jun 2021 00:58:06 GMT):
This chaincode function, getQueryResultWithPagination(query, pageSize, bookmark) , bookmark value is like this: "g1AAAABWeJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYoLGwKBaQ2INNQ1hACQUg6YUlyKsgCcDxS3" If we want to read the data at 10,001 location, is there a way to skip the first 10,000 data ? Something like this: getQueryResultWithPagination(query, 10000, "1") Is it possible to support this feature when using couchDB In couchDB, there are limit and skip that can be passed to query iterator.

victoryeo (Mon, 21 Jun 2021 08:24:43 GMT):
anyone on the channel ?

davidkel (Mon, 21 Jun 2021 10:31:53 GMT):
Limit and Skip can't be used unfortunately, so you can't do what you want, you need to design your data model and queries to provide a way to query only the data you are interested in

tusharbansal (Mon, 21 Jun 2021 10:51:48 GMT):
Has joined the channel.

Djx (Mon, 21 Jun 2021 11:00:12 GMT):
Can anyone point to an example of how to correctly decorate Properties and Parameters to be an Array type? I tend to have issues any time I'm trying to receive an array as a parameter, or put an array on an Object. `[MissingRefError: can't resolve reference Type2 from id Type1#] {` <- in this case Type2 is an Array on Type1, and the class definition for Type2 is decorated with @Object()

Djx (Mon, 21 Jun 2021 17:39:10 GMT):
I found the answer to my issue here, and added some detail on how I got it to work: https://jira.hyperledger.org/browse/FABCN-183

KameshPalani (Thu, 24 Jun 2021 06:11:51 GMT):
Has joined the channel.

KameshPalani (Thu, 24 Jun 2021 06:11:52 GMT):
Hi Team, Need help regarding https://jira.hyperledger.org/browse/FABCG-23 Issue: Unable to get Transaction Details with GetTransactionByID qscc call from another chaincode Description: We recently upgraded our Fabric version from 1.4 to 2.3. In our Chaincode we have business logic to verify a txnId is present in ledger or not. With Fabric 2.3 upgrade we are getting below error. If this is a limitation from added in 2.x to avoid deadlock situation, can you let us know the approaches to get transaction details for a given transaction ID from a chaincode? Code: chainCodeArgs := toChaincodeArgs("GetTransactionByID", stub.GetChannelID(), tid) response := stub.InvokeChaincode("qscc", chainCodeArgs, stub.GetChannelID()) Error: Rejecting invoke of QSCC from another chaincode because of potential for deadlocks, original invocation for 'testcc'

AjayKalola (Fri, 25 Jun 2021 12:30:28 GMT):
Hello Tam, I'm facing the issue while updating the chaincode. Can anyone help me to resolve it. `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy ` Thanks.

AjayKalola (Fri, 25 Jun 2021 12:30:28 GMT):
Hello Team, I'm facing the issue while updating the chaincode. Can anyone help me to resolve it. `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy ` Thanks.

AjayKalola (Fri, 25 Jun 2021 12:30:28 GMT):
Hello Team, I'm facing the issue while updating the chaincode. Can anyone help me to resolve it. `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy` Thanks.

AjayKalola (Fri, 25 Jun 2021 12:30:28 GMT):
Hello Team, I'm facing the issue while updating the chaincode. Can anyone help me to resolve it. `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy` I'm using below command for update the chaincode. peer chaincode upgrade \ --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA \ --clientauth --keyfile ${KEYFILE} \ --certfile ${CERTFILE} \ -n $CHAINCODE_NAME -v $VERSION -c '{"Args":[""]}' -C CHANNEL_NAME -P "AND ('oderer1MSP.member','orderer2MSP.member')" Thanks.

knagware9 (Sat, 26 Jun 2021 10:17:09 GMT):
This

knagware9 (Sat, 26 Jun 2021 10:17:51 GMT):
GetTransactionByID function written chaincode? You can directly call this function from sdk as this from qscc chaincode. https://www.systutorials.com/how-to-query-transaction-by-id-in-hyperledger-fabric-2-0/

KameshPalani (Tue, 29 Jun 2021 14:31:39 GMT):
Hi Knaware9, Thanks for the reply, GetTRansactionByID is standard QSCC method. Actually, post getting the Transaction data we are verifying whether the MSP submitted is matching with the latest request for the asset. So, we are looking for options at Chaincode rather than client to call qscc and pass the txn details.

knagware9 (Wed, 30 Jun 2021 08:38:23 GMT):
yes, I remember before 2.0 we could call QSCC from chaincode but i think its removed 2.0 onwards

amalendusuresh (Wed, 07 Jul 2021 07:53:08 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

Chem (Thu, 08 Jul 2021 10:43:49 GMT):
Hi team I have one doubt regarding external chaincode

Chem (Thu, 08 Jul 2021 10:43:49 GMT):
Hi team I have one doubt regarding external chaincode We are running our chaincode as a separate container. When we run getState or putState then how the chaincode container access data from database?

jtonline (Fri, 09 Jul 2021 14:40:31 GMT):
Hi, the chaincode still communicates with the peer using a grpc connection to access data in the same way for external chaincode. The difference is that for chaincode as a server the communication is started by the peer instead of the chaincode, which is usually the case.

amalendusuresh (Tue, 13 Jul 2021 04:21:27 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

severus-sn4pe (Wed, 21 Jul 2021 14:00:02 GMT):
Hi all. After refactoring my previously working node-app, I get the following error when I try to create a new gateway to my chaincode: `Unable to connect to the discovered orderer orderer.example.com:7050 due to TypeError: Channel credentials must be a ChannelCredentials object`. After the error, the gateway is open - I can query Chaincode data, but no endorsers are linked in the gateway, and thus all write-operations (submitTransactions) fail. Has anyone faced the same issue and might know, what the problem is? I cannot find any obvious differences to the code that was previously working.

indirajith (Wed, 21 Jul 2021 14:35:22 GMT):
Hi all, I am using the contract api and like to add timestamp. Is there a method provided for it in contract api or if I have to use the older stub how to invoke it when using contract api. Can anyone help?

GeorgePals (Thu, 22 Jul 2021 13:13:03 GMT):
When returning a response with the Shim API to the user (shim.success()/shim.error()), should we put the response payload in a buffer? I have seen some examples where the API was used like this: Shim.error('Some error') and others that used a Buffer: Shim.error(Buffer.from('Some error')). Which one is the most "appropriate" and acceptable? Does the API wraps the data inside a Buffer by itself? (So a second Buffer.from is redundant)

GeorgePals (Thu, 22 Jul 2021 13:15:35 GMT):
For example here: https://github.com/hyperledger/fabric-chaincode-node/blob/9b800780c5d47a0f4e5f5b7254cb947ae838314b/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js there is a Shim.success(Buffer.from(message)) and a Shim.error(error)

davidkel (Thu, 22 Jul 2021 14:24:04 GMT):
https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/fabric-shim.Shim.html Should provide what you need to know

GeorgePals (Thu, 22 Jul 2021 14:30:57 GMT):
Have seen this page a billion times, but just saw the difference in types between success and error (Buffer/String). I'm blind. Thanks david!

mirshahzad (Sat, 24 Jul 2021 16:35:58 GMT):
Has joined the channel.

zenilvaghasiya (Wed, 28 Jul 2021 22:49:31 GMT):
Has joined the channel.

dwatkins123 (Thu, 29 Jul 2021 12:39:09 GMT):
Has joined the channel.

raychan11111 (Mon, 02 Aug 2021 15:57:02 GMT):
Has joined the channel.

raychan11111 (Mon, 02 Aug 2021 15:57:02 GMT):
Hi all, I encounter this error when deploy chaincode with go-contractapi Do anyone know what went wrong? Error create abc chaincode: Cannot use metadata. Metadata did not match schema: 1. components.schemas.Decimal.required: Array must have at least 1 items

GeorgePals (Tue, 17 Aug 2021 12:22:19 GMT):
I have a chaincode that has an `AND` policy, e.g. `AND(Org1.member, Org2.member)` This chaincode has also some private collections. The issue is that, while I have a collection endorsement policy that "excludes" the second org (Org2) from the endorsement, the invocation of the chaincode still needs to have the private data endorsed by the second Org as well. If I don't endorse the private data, I get an `ENDORSEMENT_POLICY_FAILURE` error. ``` { "name": "Organization0MSPPrivateCollection", "policy": "OR('Org0MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive": 0, "memberOnlyRead": true, "memberOnlyWrite": true, "endorsementPolicy": { "signaturePolicy": "OR('Org0MSP.member')" } }, ``` Any ideas on this? Also, I'd like to exclude the "private data" from the transient field of the organizations that I don't want them to endorse them. Is this possible? Right now, I do ".setTransient(priv_data)". What I'd like to do would be something like ".setTransientForOrgMSP(priv_data)"

GeorgePals (Tue, 17 Aug 2021 12:22:19 GMT):
I have a chaincode that has an `AND` policy, e.g. `AND(Org1.member, Org2.member)` This chaincode has also some private collections. The issue is that, while I have a collection endorsement policy that "excludes" the second org (Org2) from the endorsement, the invocation of the chaincode still needs to have the private data endorsed by the second Org as well. If I don't endorse the private data, I get an `ENDORSEMENT_POLICY_FAILURE` error. ``` { "name": "Organization0MSPPrivateCollection", "policy": "OR('Org0MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive": 0, "memberOnlyRead": true, "memberOnlyWrite": true, "endorsementPolicy": { "signaturePolicy": "OR('Org0MSP.member')" } }, ``` Any ideas on this? Also, I'd like to exclude the "private data" from the transient field of the organizations that I don't want them to endorse them. Is this possible? Right now, I do ".setTransient(priv_data)". What I'd like to do would be something like ".setTransientForOrgMSP(Org0MSP, priv_data)"

davidkel (Wed, 18 Aug 2021 09:00:47 GMT):
If you don't want a particular organisation to receive the private data then you need to use org or peer targetting. For example in the node-sdk you have https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Transaction.html#setEndorsingOrganizations__anchor and https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Transaction.html#setEndorsingPeers__anchor

davidkel (Wed, 18 Aug 2021 09:03:45 GMT):
I'm not sure but I would say that endorsement policies don't override each other bit instead a peer validates an endorsement against all policies that exist and are applicable so you overall chaincode policy still has to be satisfied. (Your experience certainly suggests that). You might need to consider state based endorsement as an option

davidkel (Wed, 18 Aug 2021 09:03:45 GMT):
I'm not sure but I would say that endorsement policies don't override each other but instead a peer validates an endorsement against all policies that exist and are applicable so your overall chaincode policy still has to be satisfied. (Your experience certainly suggests that). You might need to consider state based endorsement as an option

GeorgePals (Wed, 18 Aug 2021 14:40:36 GMT):
Hey David. Wish you are well! =) I am aware of both Org/Peer targeting and State Based endorsement. However, the issue is that I have a function that, when invoked, makes two changes to the BC State. 1. It updates a key that has an AND Policy (this is crucial - it is a key that keeps a "log" of transactions, so all the peers should endorse) 2. Add the private data. The only way to achieve what I want is to have two different function calls. One to put the private data into the state and a second one to update the "log" key. Of course, this is not acceptable in any way. I need to do this concurrently. So, this is why I need to send the private data to only one peer.

davidkel (Wed, 18 Aug 2021 15:00:29 GMT):
As this is a client side requirement you could try asking on #fabric-sdk-node and maybe also raising a jira issue for the node-sdk. You probably should also consider contributing that change to the node-sdk

GeorgePals (Wed, 18 Aug 2021 15:53:48 GMT):
Thank you David! I will investigate furthermore and Ill see what I'll do about it!

davidkel (Wed, 18 Aug 2021 16:52:29 GMT):
Thinking about it more, it might not work because the R/W sets would be different from endorsers that didn't receive the transient data for storing in private data vs those that did

MatanNahmani (Fri, 20 Aug 2021 05:10:51 GMT):
Has joined the channel.

MatanNahmani (Fri, 20 Aug 2021 05:10:52 GMT):
Inside contract api is there a way to get transaction submitter affiliation?

MatanNahmani (Fri, 20 Aug 2021 06:25:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=nB52dQw4dmKa6CEhp) I ended up adding attribute to wallet then fetched it using ctx.clientIdentity.getAttributeValue("attributename"');

jos61404 (Sun, 29 Aug 2021 10:05:45 GMT):
Has joined the channel.

ArchitaDasgupta (Thu, 02 Sep 2021 13:50:44 GMT):
Has joined the channel.

adgupta011 (Fri, 03 Sep 2021 06:05:06 GMT):
Hi. We were using clientIdentity.getX509Certificate() api in fabric-contract-api v1.4. Now as we upgrade the api version to 2.x we are not getting getX509Certificate() api within clientIdentity. Although in fabric latest document https://hyperledger-fabric.readthedocs.io/en/latest/developapps/transactioncontext.html link they have mentioned about getX509Certificate() api but in the Class:clientIdentity link it is not there. Is it they have removed this library and to get certificate details we have to take from raw idbytes and then parse it with x509 parser.Or is there any other way to get invoker's identity.

sauveergoel (Fri, 03 Sep 2021 06:18:23 GMT):
Hi, is it possible to execute chaincode but not update the ledger?

bestbeforetoday (Fri, 03 Sep 2021 10:27:24 GMT):
Use the _evaluate_ calls in the client SDK instead of the _submit_ calls. It just gets the transaction proposal endorsed by a peer (which executes the chaincode and gives you a result), but doesn't then submit the endorsed transaction to the orderer (which updates the ledger)

sauveergoel (Fri, 03 Sep 2021 11:14:52 GMT):
What would be the benefit or target scenarios for such calls?

bestbeforetoday (Fri, 03 Sep 2021 12:22:14 GMT):
evaluate = query ledger state. submit = update ledger state

MarcoOliveira (Tue, 07 Sep 2021 10:34:46 GMT):
Has joined the channel.

vlaca (Mon, 13 Sep 2021 08:57:44 GMT):
Has joined the channel.

GeorgePals (Thu, 16 Sep 2021 16:34:22 GMT):
Hey, looking for some more ideas with my issue. At the API that connects with the Fabric network, I open a new GRPC connection for every query that a user makes. This, of course, has a very big drawback; I can evaluate/endorse at most 30-50 TXs before the orderers/peers start to fail. This API has also a user (per organization) that has an (always) open connection with the gateway. So, I can reuse this gateway with the clients (per organization, again). Already achieved this. However, there are times that, in my chaincodes, I create a `new ClientIdentity(ctx.stub)` in order to: 1. Check if the user has the appropriate rights to invoke the function (`cid.assertAttributeValue()`) 2. To store data that utilize the `cid.getID()` as a key One way that, I think, would resolve my issue, is if I could create a new `Stub` that would carry the client's information and not the information that came with the generic user of the organization that owns the gateway. I could, for example (along with any other information) send the certificate of the client to the chaincode and create a new Stub. But I don't think that this is possible. Another way would be to also send the certificate of the client and create custom functions that would read the certificate, check for the available attributes etc. However, I don't really like this way. Do you have any other suggestion that may have not crossed my mind?

GeorgePals (Thu, 16 Sep 2021 16:34:22 GMT):
Hey, looking for some more ideas with my issue. At the API that connects with the Fabric network, I open a new GRPC connection for every query that a user makes. This, of course, has a very big drawback; I can evaluate/endorse at most 30-50 TXs before the orderers/peers start to fail. This API has also a user (per organization) that has an (always) open gateway connected with the network. So, I can reuse this gateway with the clients (per organization, again). Already achieved this. However, there are times that, in my chaincodes, I create a `new ClientIdentity(ctx.stub)` in order to: 1. Check if the user has the appropriate rights to invoke the function (`cid.assertAttributeValue()`) 2. To store data that utilize the `cid.getID()` as a key One way that, I think, would resolve my issue, is if I could create a new `Stub` that would carry the client's information and not the information that came with the generic user of the organization that owns the gateway. I could, for example (along with any other information) send the certificate of the client to the chaincode and create a new Stub. But I don't think that this is possible. Another way would be to also send the certificate of the client and create custom functions that would read the certificate, check for the available attributes etc. However, I don't really like this way. Do you have any other suggestion that may have not crossed my mind?

GeorgePals (Thu, 16 Sep 2021 17:48:44 GMT):
So, I created a custom "Identity" class which has nearly the same functions (getID(), getAttributeValue(), assertAttributeValue() etc.). However, again, there is one (minor?) drawback. I need to send the certificate of the user that invokes the function on every invocation. It is not something big (because, this way, the biggest and most difficult issue of having the real invoker's identity is solved and the TPS is extremely higher), however, it's still an issue. If anyone has any suggestion, I'd be more than glad to hear it.

GeorgePals (Thu, 16 Sep 2021 17:48:44 GMT):
So, I created a custom "Identity" class which has nearly the same functions (getID(), getAttributeValue(), assertAttributeValue() etc.). However, again, there is one (minor?) drawback. I need to send the certificate of the user that invokes the function on every invocation. It is not a big deal (because, this way, the biggest and most difficult issue of having the real invoker's identity is solved and the TPS is extremely higher), however, it's still an issue. If anyone has any suggestion, I'd be more than glad to hear it.

GeorgePals (Thu, 16 Sep 2021 17:48:44 GMT):
So, I created a custom "Identity" class which has nearly the same functions (getID(), getAttributeValue(), assertAttributeValue() etc.). However, again, there is one (minor?) drawback. I need to send the certificate of the user that invokes the function on every invocation. It's no big deal (because, this way, the biggest and most difficult issue of having the real invoker's identity is solved and the TPS is extremely higher), however, it's still an issue. If anyone has any suggestion, I'd be more than glad to hear it.

jcastrence (Tue, 21 Sep 2021 14:26:56 GMT):
Has joined the channel.

bestbeforetoday (Wed, 22 Sep 2021 08:15:25 GMT):
If you have a manageable sized pool of user identities transacting at a given time, you might be able to cache Gateway instances you've created in the client for each identity, so if that client identity wants to send a second transaction it uses the same Gateway instance (and associated gRPC connections) as the first transaction

bestbeforetoday (Wed, 22 Sep 2021 08:17:38 GMT):
Another alternative might be to use off-line signing, where you explicitly sign the transaction proposal with the appropriate client identity's private key. But this would require using low-level client APIs, which are not at all friendly: https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-sign-transaction-offline.html

bestbeforetoday (Wed, 22 Sep 2021 08:19:14 GMT):
Your idea of embedding the client certificate within the transaction arguments (or transient data) is actually not so different since the certificate for the client signing identity is embedded within all transaction proposals anyway, so that might be a good compromise approach

bestbeforetoday (Wed, 22 Sep 2021 08:21:50 GMT):
Good news is that in the future things should be much easier with the the _fabric-gateway_ client API currently in development, which solves this issue by allowing gRPC connections to be shared between client Gateway instances: https://github.com/hyperledger/fabric-gateway

bestbeforetoday (Wed, 22 Sep 2021 08:21:50 GMT):
Good news is that in the future things should be much easier with the _fabric-gateway_ client API currently in development, which solves this issue by allowing gRPC connections to be shared between client Gateway instances: https://github.com/hyperledger/fabric-gateway

bestbeforetoday (Wed, 22 Sep 2021 08:23:29 GMT):
It also exposes an easy to use off-line signing mechanism directly in the high-level flow, but that really is just for scenarios where you don't have direct access to the client signing keys within the your Gateway client application

bestbeforetoday (Wed, 22 Sep 2021 08:24:01 GMT):
The bad news is the _fabric-gateway_ API is not yet at release level

GeorgePals (Thu, 23 Sep 2021 15:23:48 GMT):
Hey @bestbeforetoday Thank you for your time and extremely detailed post! In the past days I struggled to make the API that connects with the HF to manage concurrent GRPC connections. As I said in a previous message, without reusing the GRPC connection, I can only endorse ~30-50 TXs (I'm not really sure of the number when just evaluating, but it wasn't high as well). When I first tested to run some invocations with a shared GRPC, I was surprised by the number I could achieve (It was ~3.000 concurrent evaluations). So, I tried to make the API reuse the GRPC connection and create new GRPC connections when needed. i.g. I set an upper-bound of simultaneous connections to every open GRPC connection (e.g. 1000 concurrent users that evaluate) and when that number is reached, a new GRPC connection is created in order to serve for clients (there is of course a limit of the active connections, that is they're also bounded). I also "sift" every request that comes from a client. If the request is just an evaluation, I give it more "freedom" to join the queue, while if it is a .submit, it is a bit more restricted. i.g. every GRPC connection has a ~2/1 ratio of EVALUATIONS/SUBMITS (1000 concurrent requests => 700 of them will be evaluations, 300 submits). However, 1. Do you think that I'm doing good that I create new GRPC connections? Or should I have, say, 1 GRPC connection of 2.000 users instead of 1.000 and don't create a second connection? 2. As I said, when I first tested the HF with a shared GRPC , I reached ~3.000 concurrent evaluations (if I'm not mistaken). However now, even if I have just one active GRPC that is bounded to, say, 1.000 concurrent users, if the connection is active for some time and the queue is always refilled, that is, there is always a new request for the HF to process , I get timeout errors ([Endorser]: sendProposal[org] - org timed out after: 30000). Any ideas on this? Should I have a lower bound of concurrent users? Thanks!

GeorgePals (Thu, 23 Sep 2021 15:23:48 GMT):
Hey @bestbeforetoday Thank you for your time and the extremely detailed post! In the past days I struggled to make the API that connects with the HF to manage concurrent GRPC connections. As I said in a previous message, without reusing the GRPC connection, I can only endorse ~30-50 TXs (I'm not really sure of the number when just evaluating, but it wasn't high as well). When I first tested to run some invocations with a shared GRPC, I was surprised by the number I could achieve (It was ~3.000 concurrent evaluations). So, I tried to make the API reuse the GRPC connection and create new GRPC connections when needed. i.g. I set an upper-bound of simultaneous connections to every open GRPC connection (e.g. 1000 concurrent users that evaluate) and when that number is reached, a new GRPC connection is created in order to serve for clients (there is of course a limit of the active connections, that is they're also bounded). I also "sift" every request that comes from a client. If the request is just an evaluation, I give it more "freedom" to join the queue, while if it is a .submit, it is a bit more restricted. i.g. every GRPC connection has a ~2/1 ratio of EVALUATIONS/SUBMITS (1000 concurrent requests => 700 of them will be evaluations, 300 submits). However, 1. Do you think that I'm doing good that I create new GRPC connections? Or should I have, say, 1 GRPC connection of 2.000 users instead of 1.000 and don't create a second connection? 2. As I said, when I first tested the HF with a shared GRPC , I reached ~3.000 concurrent evaluations (if I'm not mistaken). However now, even if I have just one active GRPC that is bounded to, say, 1.000 concurrent users, if the connection is active for some time and the queue is always refilled, that is, there is always a new request for the HF to process , I get timeout errors ([Endorser]: sendProposal[org] - org timed out after: 30000). Any ideas on this? Should I have a lower bound of concurrent users? Thanks!

GeorgePals (Thu, 23 Sep 2021 15:23:48 GMT):
Hey @bestbeforetoday Thank you for your time and the extremely detailed post! In the past days I struggled to make the API that connects with the HF to manage concurrent GRPC connections. As I said in a previous message, without reusing the GRPC connection, I can only endorse ~30-50 TXs (I'm not really sure of the number when just evaluating, but it wasn't high as well). When I first tested to run some invocations with a shared GRPC, I was surprised by the number I could achieve (It was ~3.000 concurrent evaluations). So, I tried to make the API reuse the GRPC connection and create new GRPC connections when needed. i.g. I set an upper-bound of simultaneous connections to every open GRPC connection (e.g. 1000 concurrent users that evaluate) and when that number is reached, a new GRPC connection is created in order to serve for clients (there is of course a limit of the active connections, that is they're also bounded). I also "sift" every request that comes from a client. If the request is just an evaluation, I give it more "freedom" to join the queue, while if it is a .submit, it is a bit more restricted. i.g. every GRPC connection has a ~2/1 ratio of EVALUATIONS/SUBMITS (1000 concurrent requests => 700 of them will be evaluations, 300 submits). However, 1. Do you think that I'm doing good that I create new GRPC connections? Or should I have, say, 1 GRPC connection of 2.000 users instead of 1.000 and don't create a second connection? 2. As I said, when I first tested the HF with a shared GRPC , I reached ~3.000 concurrent evaluations (if I'm not mistaken). However now, even if I have just one active GRPC that is bounded to, say, 1.000 concurrent users, if the connection is active for some time and the queue is always refilled, that is, there is always a new request for the HF to process , I get timeout errors ([Endorser]: sendProposal[org] - org timed out after: 30000). Any ideas on this? If I'm not mistaken, that is not a very "bad" error. It just means that the HF hasn't yet processed the request, right? So, should I have a lower bound of concurrent users or can I do anything else to solve this issue? Thanks!

GeorgePals (Thu, 23 Sep 2021 15:32:49 GMT):
All in all, with, say, 1 orderer (I know that is not enough, but suppose that is 1 for now) and 4 peers, what is the expected number of concurrent requests? That is, how many requests should I feed HF with? (Approximately, of course)

GeorgePals (Fri, 24 Sep 2021 10:19:00 GMT):
Fixed the issue with the timeout errors. Or somehow, it fixed itself, haha. Now I can make calls to the BC with ~60/70 invokes/second and ~400 active connections. When a request is completed, a new request is added to the queue of the active connections. The only issue is when submitting, which is a much more computational expensive action.

GeorgePals (Fri, 24 Sep 2021 10:19:00 GMT):
Fixed the issue with the timeout errors. Or somehow, it fixed itself, haha. Now I can make calls to the BC with ~60-70 invokes/second and ~400 active connections. When a request is completed, a new request is added to the queue of the active connections. The only issue is when submitting, which is a much more computational expensive action.

GeorgePals (Fri, 24 Sep 2021 10:19:00 GMT):
Fixed the issue with the timeout errors. Or somehow, it fixed itself, haha. Now I can make calls to the BC with ~60-70 invokes per second and ~400 active connections. When a request is completed, a new request is added to the list (queue) of the active connections. The only issue is when submitting, which is a much more computational expensive action.

GeorgePals (Fri, 24 Sep 2021 10:19:00 GMT):
Fixed the issue with the timeout errors. Or, somehow, it fixed itself, haha. Now I can make calls to the BC with, approximately, 60-70 invokes per second and ~400 active connections. When a request is completed, a new request is added to the list (queue) of the active connections. The only issue is when submitting, which is a much more computational expensive action.

vsadriano (Wed, 29 Sep 2021 10:29:49 GMT):
Has left the channel.

bardia (Fri, 01 Oct 2021 10:11:52 GMT):
Has joined the channel.

GeorgePals (Wed, 06 Oct 2021 09:22:26 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? If I'm correct, endorsement.send() just ask the endorsers to endorse and does not send the endorsed proposal to the Orderer. 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!

GeorgePals (Wed, 06 Oct 2021 09:22:26 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 ask 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!

GeorgePals (Wed, 06 Oct 2021 09:22:26 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!

GeorgePals (Wed, 06 Oct 2021 09:22:26 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() });`

maciejjedrzejczyk (Wed, 06 Oct 2021 12:11:28 GMT):
Has joined the channel.

maciejjedrzejczyk (Wed, 06 Oct 2021 12:11:28 GMT):
Hi, I am unsure if this is a right place to post a question regarding Fabric Node Docker image so please redirect me to another channel if necessary. I am planning to compile all HLF Docker images on Raspberry Pi (ARM64) and I am already successful with base Docker images (peer, orderer, baseos, fabric-ca etc.). However, I now would like to build a Docker image for javascript chaincodes (i.e. fabric-nodeenv images used during chaincode instantiation). I looked for relevant Dockerfiles for Javascript in https://github.com/hyperledger/fabric-chaincode-node but I could not find instructions or Dockerfile or Makefile files which are usually present in both fabric and fabric-ca repos. I would greatly appreciate if you could redirect me to a right place to help me in the task described above. Thanks!

maciejjedrzejczyk (Wed, 06 Oct 2021 18:11:25 GMT):
OK, I found the relevant dockerfile in /fabric-chaincode-node/docker/fabric-nodeenv

maciejjedrzejczyk (Wed, 06 Oct 2021 18:11:48 GMT):
a simple docker build . was enough to build an image on ARM64 without modifications

bardia (Fri, 08 Oct 2021 14:19:37 GMT):
I have an api for the following update ``` curl --request PUT \ --url http://localhost:8080/user/3/tags \ --header 'Content-Type: application/json' \ --data '[ { "id": "1", "name": "www", } ]' ``` This is the code on the chaincode ``` func (s *smartContract) UpdateXXXTag(ctx contractapi.TransactionContextInterface, id, name string) error { check, err := s.CheckPermissions(ctx, "XXX") if err != nil { return fmt.Errorf("error on check role XXX: %w", err) } if check { m := ModbusTag{ ID: id, } assetJSON, err := ctx.GetStub().GetState(m.Key()) if err != nil { return fmt.Errorf("failed to read from world state: %v", err) //nolint:errorlint } if assetJSON == nil { return fmt.Errorf("the asset %s does not exist", id) } err = json.Unmarshal(assetJSON, &m) if err != nil { return nil //nolint:nilerr } m.Name = name bytes, err := json.Marshal(m) if err != nil { return fmt.Errorf("error on marshal XXX struct: %w", err) } err = ctx.GetStub().PutState(id, bytes) if err != nil { return fmt.Errorf("error on put state to stub: %w", err) } return nil } return ErrAccessPermission{Permission: "XXX"} } ``` But it does not update the name. Where is the problem?

baxihemant (Mon, 11 Oct 2021 01:12:43 GMT):
Has joined the channel.

action-sj (Tue, 12 Oct 2021 01:29:06 GMT):
Has joined the channel.

charalarg (Thu, 14 Oct 2021 08:41:16 GMT):
Has joined the channel.

jkneubuhl (Mon, 18 Oct 2021 16:42:21 GMT):
Has joined the channel.

ravinayag (Mon, 18 Oct 2021 18:30:46 GMT):
Has joined the channel.

ravinayag (Mon, 18 Oct 2021 18:30:46 GMT):
Hi , Im getting this error when i declare as Int in java chaincode. Is chaincode only accepts in string format... ? ``` Driver.java:52: error: incompatible types: int cannot be converted to String return piecesCount; ...... incompatible types: Double cannot be converted to String```

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., 20 *latest* records. For example, if there are 1.000 records (for simplicity, suppose that its record has an i.g. index, `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1001 to 1020). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue.

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., 20 *latest* records. For example, if there are 1.000 records (for simplicity, suppose that its record has an i.g. index, `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1001 to 1020). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., *latest* 20 records. For example, if there are 1.000 records (for simplicity, suppose that its record has an i.g. index, `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1001 to 1020). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., *latest* 20 records. For example, suppose that there are 1.000 records (for simplicity, suppose that its record has an i.g. index, `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1001 to 1020). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., *latest* 20 records. For example, suppose that there are 1.000 records (for simplicity, suppose that its record has an i.g. index, `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1020 to 1001). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., *latest* 20 records. For example, suppose that there are 1.000 records (for simplicity, suppose that its record has an index, i.g. `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1020 to 1001). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 12:57:18 GMT):
Hey, I need to use the `getStateByPartialCompositeKeyWithPagination` stub. Everything works as expected, however I need to fetch the, e.g., *latest* 20 records. For example, suppose that there are 1.000 records (for simplicity, suppose that each record has an index, i.g. `1, 2 ... 1000`). If we add 20 new records, the index is now `1, 2, ... 1020`. What I need to achieve is to call the aforementioned stub and fetch the *last* 20 records (from index 1020 to 1001). What HF does is to bring me index `1 to 20` then `21 to 40` etc. Thus, for a key with *a lot* of records, this is a very big issue. Thanks!

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. I've also tried it to a fresh HF installation. I'm using HF 2.4 (Beta). Any opinion/idea etc. will be much appreciated.

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. ``` cp -a "$CHAINCODE_SOURCE_DIR/META-INF" "$BUILD_OUTPUT_DIR/chaincode/" ``` I've also tried it to a fresh HF installation. I'm using HF 2.4 (Beta). Any opinion/idea etc. will be much appreciated.

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. ``` cp -a "$CHAINCODE_SOURCE_DIR/META-INF" "$BUILD_OUTPUT_DIR/chaincode/" ``` I've also tried it to a fresh HF installation. I'm using *HF 2.4 (Beta)*. Any opinion/idea etc. will be much appreciated.

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. ``` cp -a "$CHAINCODE_SOURCE_DIR/META-INF" "$BUILD_OUTPUT_DIR/chaincode/" ``` I've also tried it on a fresh HF installation. I'm using *HF 2.4 (Beta)*. Any opinion/idea etc. will be much appreciated.

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. ``` cp -a "$CHAINCODE_SOURCE_DIR/META-INF" "$BUILD_OUTPUT_DIR/chaincode/" ``` I've also tried it on a fresh HF installation. I'm using *HF 2.4 (Beta)*. Any opinion/idea etc. will be much appreciated. Edit: The .tar.gz file has this structure: `chaincode.tgz => which has code.tar.gz and metadata.json` `code.tar.gz => which has connection.json and META-INF folder` `META-INF -> statedb -> couchdb -> indexes -> someIndex.json`

GeorgePals (Tue, 19 Oct 2021 19:33:46 GMT):
I'm trying to solve the aforementioned issue by using queries. I have created the appropriate `index` file and tried to pass it at build time. However, I get this error: ``` 2021-10-19 18:26:35.695 UTC c817 DEBU [lifecycle] Work -> skipping build of chaincode 'chaincode_name.......' as it is already in progress ``` Thus, I can not pass the `META-INF` folder to the `BUILD` folder. ``` cp -a "$CHAINCODE_SOURCE_DIR/META-INF" "$BUILD_OUTPUT_DIR/chaincode/" ``` I've also tried it on a fresh HF installation. I'm using *HF 2.4 (Beta)*. Any opinion/idea etc. will be much appreciated. Edit: The .tar.gz file has this structure: `chaincode.tgz => which has code.tar.gz and metadata.json` `code.tar.gz => which has connection.json and META-INF folder` where `META-INF -> statedb -> couchdb -> indexes -> someIndex.json`

AjayKalola (Mon, 01 Nov 2021 04:56:34 GMT):
Hello every one I'm receiving one issue in upgrading the chaincode after the renew old tls certificates. Can anyone help me to resolve it?? I had setup and running a fabric blockchain V1.3 `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy` I'm using below command for update the chaincode. `peer chaincode upgrade \ --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA \ --clientauth --keyfile ${KEYFILE} \ --certfile ${CERTFILE} \ -n $CHAINCODE_NAME -v $VERSION -c '{"Args":[""]}' -C CHANNEL_NAME -P "AND ('oderer1MSP.member','orderer2MSP.member')"` Can anyone please help me as its in production. Thanks.

AjayKalola (Mon, 01 Nov 2021 04:56:34 GMT):
Hello every one I'm receiving one issue in upgrading the chaincode after the renew old tls certificates. Can anyone help me to resolve it?? I had setup and running a fabric blockchain V1.3 `2021-06-25 12:16:55.458 UTC [msp/identity] Sign -> DEBU 0bf Sign: plaintext: 0A90090A7008031A0C08B792D7860610...324D53500A04657363630A0476736363 2021-06-25 12:16:55.459 UTC [msp/identity] Sign -> DEBU 0c0 Sign: digest: CA0260CE12250C900C831C630D58FC50CAE8296D79C754CAD8A61E4B96039C48 2021-06-25 12:16:55.466 UTC [chaincodeCmd] upgrade -> DEBU 0c1 endorse upgrade proposal, get response Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy` I'm using below command for update the chaincode. `peer chaincode upgrade \ --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA \ --clientauth --keyfile ${KEYFILE} \ --certfile ${CERTFILE} \ -n $CHAINCODE_NAME -v $VERSION -c '{"Args":[""]}' -C CHANNEL_NAME -P "AND ('oderer1MSP.member','orderer2MSP.member')"` Here is the orderer log `2021-10-29 09:17:53.373 UTC [orderer/common/server] Broadcast -> DEBU 3d12d Starting new Broadcast handler 2021-10-29 09:17:53.373 UTC [orderer/common/broadcast] Handle -> DEBU 3d12e Starting new broadcast loop for 10.0.1.9:49344 2021-10-29 09:17:53.389 UTC [orderer/common/broadcast] Handle -> WARN 3d12f Error reading from 10.0.1.9:49344: rpc error: code = Canceled desc = context canceled 2021-10-29 09:17:53.390 UTC [orderer/common/server] func1 -> DEBU 3d130 Closing Broadcast stream 2021-10-29 09:17:53.390 UTC [grpc] infof -> DEBU 3d131 transport: loopyWriter.run returning. connection error: desc = "transport is closing"` Can anyone please help me as its in production. Thanks.

Rajatsharma (Tue, 02 Nov 2021 17:19:56 GMT):
Can anyone help me with this - https://stackoverflow.com/questions/69814076/peer-container-consuming-too-much-memory-even-when-no-memory-intensive-operation.

jaysonr (Wed, 03 Nov 2021 03:44:42 GMT):
Has joined the channel.

jaysonr (Wed, 03 Nov 2021 03:44:43 GMT):
Hi I'm trying to invoke a chaincode but I'm getting an error status:500 message:"make sure the chaincode enroll has been successfully defined on channel channel1 and try again: chaincode definition for 'enroll' exists, but chaincode is not installed" thing is that I already installed, approve and commit successfully appreciate any help. thanks

Djx (Thu, 04 Nov 2021 09:20:35 GMT):
Is there a way to cancel the current transaction without throwing an error? I want to return a custom response type on error, but it seems Fabric will only cancel the transaction if an error is thrown directly.

mafer_027 (Thu, 04 Nov 2021 15:38:13 GMT):
Has joined the channel.

venzi (Fri, 05 Nov 2021 17:14:22 GMT):
Has joined the channel.

venzi (Fri, 05 Nov 2021 17:14:23 GMT):
Would anybody know how to check which Golang version a peer uses to compile the chaincode for the dev-peer container?

bardia (Mon, 08 Nov 2021 06:24:29 GMT):
How can I get the *password* *attempts* problem in golang? When I login 10 times unsuccessfully, I can no longer login 11 times with the correct specifications Gives the following message failed to enroll user: enroll failed: enroll failed: Response from server: Error Code: 73 - Incorrect password entered 10 times, max incorrect password limit of 10 reached

Fabricuser (Sat, 13 Nov 2021 08:20:50 GMT):
Hello everyone, I'm currently looking to learn how to code a smart contract in golang for my research in hyperledger fabric. Can anyone please recommend me sources or places where I can learn how to write a smart contract to transfer assets, for example, 10 books for $50? I would appreciate this very much.

HansrajRami (Tue, 16 Nov 2021 05:12:46 GMT):
Hi all !!! I am facing some issue while updating couchdb indexes in chaincode I am using this buildpack https://github.com/hyperledger/fabric-samples/tree/v2.2.3/asset-transfer-basic/chaincode-external/sampleBuilder/bin My folder structure for chaincode package is like this - First archived connection.json and metadata folder with indexes in code.tar.gz - then archived code.tar.gz and metadata.json in chaincode.tgz External Chaincode is working perfect after committing chaincode definition but couchdb indexes are not being created

s.vahidi (Mon, 29 Nov 2021 13:01:53 GMT):
Has joined the channel.

bardia (Tue, 07 Dec 2021 06:05:28 GMT):
How can I increase the number of deploy in the chain code version?

mbwhite (Mon, 13 Dec 2021 16:30:51 GMT):
Do you mean the sequence number? you update that yourself when installing the chaincode

mbwhite (Mon, 13 Dec 2021 16:30:51 GMT):
Do you mean the sequence number? you update that yourself when approving the chaincode definition

HarshMultani (Wed, 15 Dec 2021 12:02:23 GMT):
Hi Everyone, Can anyone point me to a code example that fetches record from Fabric using getQueryResultWithPagination. I basically want to fetch records from fabric using pagination and sorting.

barankilic (Wed, 15 Dec 2021 12:06:35 GMT):
https://github.com/hyperledger/fabric-samples/blob/2b662e08b45b9cfadda23cc5da3bdf83d0be9d2e/asset-transfer-ledger-queries/chaincode-go/asset_transfer_ledger_chaincode.go#L362

HarshMultani (Thu, 16 Dec 2021 07:20:31 GMT):
Thanks @barankilic . Let me check this.

bardia (Thu, 16 Dec 2021 12:58:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-chaincode-dev?msg=poMjuahHLMjBhBdcC) I can not do more than 10 versions, I want it to be 50 instead of 10

bardia (Fri, 17 Dec 2021 06:12:00 GMT):
How to change affiliation name on ca-server HLF?

mbwhite (Fri, 17 Dec 2021 11:06:59 GMT):
and what happens if you try 10? pretty sure I got up 16 once

ShobhitSrivastava (Mon, 20 Dec 2021 11:54:36 GMT):
Has joined the channel.

roclee (Thu, 23 Dec 2021 09:31:19 GMT):
Hi, I am using vscode and [IBM Blockchain Platform](https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform) develop&debug chaincode. Since the dockerdesktop APP will not be free for company user after 2022.1.31. I wonder that if IBM Blockchain Platform extension could work based on other container management tools such as podman? Or I need to buy a license of dockerdesktop?

davidkel (Thu, 23 Dec 2021 10:19:51 GMT):
The extension isn't going to work with podman. Are you a windows or a mac user ?

roclee (Fri, 24 Dec 2021 06:35:47 GMT):
I'm using mac

roclee (Fri, 24 Dec 2021 06:58:28 GMT):
I'm using mac

davidkel (Fri, 24 Dec 2021 08:17:28 GMT):
Shame, then all I can suggest as an alternative is to install a hypervisor such as virtualbox and use linux where you can install vscode and the docker cli (which shouldn't require a license)

roclee (Tue, 04 Jan 2022 05:47:49 GMT):
Thanks, running vscode in linux is a good solution. Maybe I should move my development environment to linux server and remotely access to it. Something like vscode remote ssh or (coder)[https://coder.com/] may solve my problem.

roclee (Tue, 04 Jan 2022 05:47:49 GMT):
Thanks, running vscode in linux is a good solution. Maybe I should move my development environment to server and remotely access to it. Something like vscode remote ssh or (coder)[https://coder.com/] may solve my problem.

roclee (Tue, 04 Jan 2022 05:47:49 GMT):
Thanks, running vscode in linux is a good solution. Maybe I should move my development environment to server and remotely access to it. Something like vscode remote ssh or [coder](https://coder.com/) may solve my problem.

lcvalves (Mon, 17 Jan 2022 18:44:15 GMT):
I'm having the same problem, I've even looked inside the handler shim functions but can't seem to figure it out.

bardia (Thu, 20 Jan 2022 08:30:25 GMT):
How to set a password for a fabric-ca-server.db database file?

bardia (Thu, 20 Jan 2022 08:35:40 GMT):
How to add a field to a fabric-ca-server.db database file؟

s.vahidi (Sat, 22 Jan 2022 07:56:26 GMT):
An error occurred while installing the chaincode and then chaincode wasn't installed completely and we want to uninstall it, please help me?

Bert (Sat, 22 Jan 2022 09:23:51 GMT):
Has joined the channel.

lucky114407 (Wed, 02 Feb 2022 12:32:10 GMT):
Can somebody help me out with on executing GO subroutines in the chaincode The use case is I want to perform bulk write to the blockchain, is there any way?

lucky114407 (Wed, 02 Feb 2022 12:32:10 GMT):
Can somebody help me out with on executing GO subroutines in the chaincode The use case is I want to perform bulk write to the blockchain parallely, is there any way?

bjwswangmail (Tue, 08 Feb 2022 03:34:17 GMT):
Has joined the channel.

sudarsan.immadi (Thu, 24 Feb 2022 11:13:49 GMT):
Has joined the channel.

sudarsan.immadi (Thu, 24 Feb 2022 11:13:49 GMT):
hi

rjones (Tue, 22 Mar 2022 19:52:08 GMT):

rjones (Tue, 22 Mar 2022 19:52:09 GMT):

rjones (Tue, 22 Mar 2022 19:52:09 GMT):