Commit graph

97 commits

Author SHA1 Message Date
Gari Singh
b24a7c7f2d Merge "[FAB-7527] Improves BYFN" 2018-02-08 18:02:02 +00:00
David Enyeart
50cb8d9b1f Merge "[FAB-5913]balance-transfer:Fix query response message" 2018-01-30 19:12:51 +00:00
David Enyeart
de6ee6ea9e Merge "[FAB-7910] Clean up chaincode containers in fabric-ca" 2018-01-30 19:03:53 +00:00
Christopher Ferris
2433afda16 Merge "[FAB-7908] Change hf.admin attr to admin" 2018-01-26 14:45:50 +00:00
Latitia M Haskins
2c0c2c7459 [FAB-7910] Clean up chaincode containers in fabric-ca
The stop.sh script cleans up the network and service
containers from the composition file, but does not
clean up the resulting chaincode containers. This
CR removes the chaincode containers and their images
as well.

Change-Id: I06ba13486efc59b4761728891aab27535ae0366d
Signed-off-by: Latitia M Haskins <latitia.haskins@gmail.com>
2018-01-25 14:20:56 -05:00
Anil Ambati
bbee1b283b [FAB-7908] Change hf.admin attr to admin
Recently, Fabric CA was changed to restrict custom attributes
from starting with "hf." prefix. But fabric-ca sample was
using hf.admin custom attribute. Hence it was failing. This
change set changes custom attribute "hf.admin" to "admin".

Change-Id: I6c9324e62717c26aab3c2d308d9fb098ecd2fb65
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-01-25 10:34:46 -05:00
Jason Yellick
c9836f3131 Merge "[FAB-7834] Add couchdb index to marbles02 sample" 2018-01-25 04:30:35 +00:00
David Enyeart
dd12f88dc0 [FAB-7834] Add couchdb index to marbles02 sample
Add sample couchdb index to marbles02 chaincode
to support the chaincode queries.

Also update the go chaincode instructions with
index instructions, and fix the examples to
indicate that chaincodeid should not be included
in queries or indexes as of 1.1.

Change-Id: I4a3b0dbeb83c6a2cf40c73fcee5aed20427acfca
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-01-24 23:02:22 -05:00
Abdul Rauf
25f6091b86 FAB-7836 Fix "No identity type provided" Error
Fix the following error:
[[{"code":0,"message":"No identity type provided. Please provide identity type"}]]

Change-Id: I5a0b04aadbf87d1661f9605f0eb4ec9b2dbab62a
Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com>
2018-01-21 14:15:18 +05:00
Keith Smith
5eb2fb2ff6 [FAB-7653] Fix incorrect chaincode location
Fix the chaincode location by adding "go" subdirectory to path.

Change-Id: Idc72a0f4fcecf519d49a68d141025ada054cf847
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2018-01-08 15:27:09 -05:00
Gari Singh
5a974a42e0 [FAB-7533] Fix typo in balance-transfer sample
Trivial fix of a typo which causes the app to
crash

Change-Id: I55bb6a0e971d21adb0bd50f450571d6698686c9a
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2018-01-06 07:13:34 -05:00
Anil Ambati
038c496f4c [FAB-7592] Give hf.Registrar attrs to admins
The admin identity needs hf.Registrar.Roles attribute so
it can register other identities. This attribute was
introduced recently in fabric-ca v1.1.0-alpha.

Change-Id: Ie2a0ef705f07a35580c6bc8a85a34b9b9d937623
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-01-03 15:21:10 -05:00
Keith Smith
47da1bbeb3 Merge "[FAB-7511] clear crypto material after clearing network" 2018-01-02 20:45:14 +00:00
Keith Smith
cd18887f4b Merge "[FAB-7160] Samples - readme sample commands" 2018-01-02 19:47:15 +00:00
Artem Barger
0503e757ac Merge "[FAB-7487] Fix typo in node/fabcar.js" 2017-12-29 22:26:09 +00:00
nikklein
a0c1687ad8 [FAB-7487] Fix typo in node/fabcar.js
According to this tutorial http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html
the function name is spelled changeCarOwner.

Renamed changeCarowner to changeCarOwner.

Change-Id: Ic32c76137e3686cbf951f846da0ef8c4c5d8986d
Signed-off-by: Nikita Klein <objcoding@gmail.com>
2017-12-29 11:57:22 +01:00
Arnaud J Le Hors
1883ae9589 [FAB-7527] Improves BYFN
This change fixes a set of related issues.

It fixes the use of the cli timeout setting. It is now merely about
the maximum time spent waiting for a response.

The e2e script is no longer run from docker-compose but by calling
docker exec from byfn.sh and docker-compose now merely has the cli
waiting/sleeping for 1000 seconds.

This not only allows starting the network without automatically
running the e2e script, it also allows byfn.sh to properly end when
the e2e script ends rather than hang. It also makes the tutorial
simpler.

The time the cli container waits/sleeps cannot be changed other than
by editing the config file but this shouldn't be a problem.

This change also fixes the log output of the e2e script so that peers
are consistantly being referenced as in peerX.orgY.

In addition, this changes the usage of byfn.sh so that the -m
parameter is no longer needed. One merely needs to type "./byfn.sh up"
rather than "./byfn.sh -m up". The old way is still supported though,
for human backward compatibility. ;-) And by default the answer to the
prompt for continuation is "y" so the user can simply continue with a
hit of the return key.

Change-Id: I3e2409d81018f97ec9306ce6e1ae916d8fe18fec
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2017-12-21 00:22:13 +01:00
David Enyeart
55d0140381 Merge "[FAB-6550] Sample app written in typescript" 2017-12-20 14:01:02 +00:00
ratnakar
e84821637c [FAB-7511] clear crypto material after clearing network
Crypto materal is cleared after every re-start of a new network

Change-Id: I01c919109401428de1252695930f42e73eb3f795
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-12-19 14:17:18 -05:00
Nick Gaski
54ffa5f4c8 [FAB-7241] Fix chaincode-devmode
This CR replaces the expired certificates with the msp library
in fabric/sampleconfig.

Regenerate the orderer.block and myc.tx artifact using the
configtx.yaml in fabric/sampleconfig.  Profiles used are
SampleSingleMSPSolo & SampleSingleMSPChannel.  Modify the
orderer profile in configtxyaml and change address from
127.0.0.1:7050 -> orderer:7050 before reading in the file
to configtxgen.  This allows the peer to
resolve with the ordering service when the docker compose
is spun up.

Change CORE_PEER_ADDRESS from 7051 to 7052 when starting
the chaincode in dev mode.

Change-Id: I0dbd3f81553c85943a4219123f086e69081c4f5a
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
2017-12-15 12:40:48 -05:00
Gari Singh
77fa92c82c Merge "[FAB-6902] FAB-6904 correct the sample for FAB-6904" 2017-12-08 12:12:44 +00:00
Kapil Sachdeva
c4465100c4 [FAB-6550] Sample app written in typescript
This is a sample application that demonstrates usage of Fabric SDK typings.

Change-Id: I5b9b42c666de51a490043cafe0faac29e4f4a0a4
Signed-off-by: Kapil Sachdeva <ksachdeva17@gmail.com>
2017-12-07 02:08:54 +00:00
Gari Singh
69a127e0c7 [FAB-6254] Fix the default CLI timeout
The CLI timeout for byfn is currently set to
10000 seconds.  This is not a huge issue, but
does mean that the CLI will hang around for
10000 seconds after the e2e is complete.

This simply changes the default timeout to
10 seconds.

Change-Id: I4e163ed248d9e937354e83c0d0143dc6748b6a08
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-12-03 09:36:39 -05:00
Bret Harrison
7428f6496a [FAB-7160] Samples - readme sample commands
The balance transfer sample commands do not work.
Fixed the readme sample commands along with a few
supporting application code.

Change-Id: I74c5ff150f26e4c1868201499eb616daca316ee8
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2017-12-01 13:56:54 -05:00
Yacov Manevich
eeb1b0902d Merge "[FAB-6632] - Artifacts for BYFN reconfigure" 2017-11-17 12:04:21 +00:00
Anil Ambati
2474704d33 [FAB-6967] Added steps to query by a revoked user
Steps include: revoking a user, generating a CRL,
updating the CRL in the configuration block of the
channel, and finally querying the chaincode using
the revoked user credentials. The query will fail as
it is invoked by a revoked user.

Change-Id: I3b0f26d9b5a78475b6f42543b0e17458e9ce2a73
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2017-11-10 21:26:19 -05:00
Yuki Kondo
948e2372b8 [FAB-5913]balance-transfer:Fix query response message
"queryChaincode" doesn’t output responses from all
peers in log message. It exits the loop processing after
outputting the first response.
We should print all responses from all peers. Also, we should
return a response (e.g. the response_payloads[0]) after the loop.

This patch fixes the problems above.

Change-Id: I92a0c5a663d6da0854d89bf76c5ba36da86754ef
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2017-11-10 22:51:20 +00:00
Nick Gaski
7b76a7a5ad [FAB-6632] - Artifacts for BYFN reconfigure
This CR adds two new yaml files that are specific to a new
organization - Org3 - that will join the existing application
channel.  Also adds a separate docker-compose that is specific
to the new org - Org3.
Update byfn.sh to remove the Org3 artifacts

Reliant on CR - 15323

Change-Id: I22a08be6f8472f981c4231491b7cae56906b71dd
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
2017-11-08 15:43:10 -05:00
Srinivasan Muralidharan
ff5d80bcdc Merge "[FAB-6745] Fix timing issue in sample" 2017-11-08 14:28:09 +00:00
luomin
24ef9da1c6 [FAB-6902] FAB-6904 correct the sample for FAB-6904
Maybe this sub-task is too stricky and tiny. 
To make the source easier to be read together as explained in the WYFA doc.

Change-Id: Icc0dc56c3e25ca7b8d4828935addd5ec7229e51c
Signed-off-by: Min Luo <luomin_tokyotech@hotmail.com>
2017-11-08 00:29:35 +00:00
Keith Smith
fd795d2923 [FAB-6745] Fix timing issue in sample
When a CA starts, it creates its signing cert and then
starts listening on its listening port.  The fix is to
wait for the server to start listening on the port rather
than waiting for the signing cert file to be created.

See the waitPort function in env.sh, and places where this
is called.  I also had to increase the max time we wait before
failing.

WARNING: This change set is dependent upon the following
fabric-ca change set and should not be merged until it
has been merged:
   https://gerrit.hyperledger.org/r/#/c/15089/

Change-Id: I781e3653bf6846e22f401fe64855fa155ffeb7cb
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2017-11-07 11:35:57 -05:00
Jonathan Levi (HACERA)
04320ab199 Merge "[FAB-6895] chaincode mounting issue" 2017-11-06 20:10:55 +00:00
Gari Singh
b09febd2b6 Merge "[FAB-6870] Update node modules versions" 2017-11-06 18:37:53 +00:00
ratnakar
a7be462ab4 [FAB-6895] chaincode mounting issue
Chaincode mount path has been corrected with this fix so
that artifacts (ex. mychannel.block etc.,) won't be visible on
the host machine and the cli container upon restart.

Change-Id: I9b59c80d1cac3034d9cd7d9e19b2931df8b3988e
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-11-06 11:41:56 -05:00
Gari Singh
7c23985303 [FAB-5221] generateCerts should delete crypto
It's possible to run byfn -m generate multiple
times depending on how you go through the
tutorials, start/stop the network, etc.
The crypto-config folder is deleted when
running byfn -m down and that will stay,
but now each time generateCerts is run the
cyrpto-config folder will be deleted as well.

Change-Id: Ie3851debd76ff0c50c84e14fbca56de2a28bd825
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-11-05 08:40:08 -05:00
ratnakar
1961835674 [FAB-6870] Update node modules versions
fabcar uses 1.0.2 node modules changing it to unstable so that
latest node modules can be used on master branch

Change-Id: Ia9dc866931763760dd3cd7dbc5c7fd9a5de099be
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-11-02 11:19:57 -04:00
David Enyeart
733ce9fbd7 Merge "[FAB-6779] Fix the error in fabric-ca" 2017-10-31 21:22:51 +00:00
Bret Harrison
bb3ac84e6e [FAB-5363] fabric-samples update balance
Update balance transfer sample to use the
connection profile and node 8.

Change-Id: I17c74c6cb23ebe55a8f2bba735d41525ae9e5ab1
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-10-31 16:00:14 -04:00
Bret Harrison
6b2799e620 [FAB-6568] Fabric-Samples - update fabcar
Update the fabcar sample with an easier flow
Remove hardcoded fields in the invoke program

Change-Id: I9a06cdd317c2afec80720ac7d728d38fc62c6f63
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
2017-10-30 12:08:06 -04:00
Zhangjiong Xuan
fafae55124 [FAB-6779] Fix the error in fabric-ca
Fix the error in fabric-ca/README.md file,the setup-fabric.sh was
written to run-fabric.sh,it should be setup-fabric.sh.

Change-Id: I5d15a0fb5941c587213c2db8831e53079c0f463a
Signed-off-by: Zhangjiong Xuan <xuanzhangjiong@hyperchain.cn>
2017-10-30 14:21:55 +08:00
Jim Zhang
cd1b691385 Merge "[FAB-5898] porting samples to node.js chaincode" 2017-10-18 23:13:20 +00:00
Kostas Christidis
c74f16dc92 Merge "[FAB-6050] Adding fabric-ca sample" 2017-10-18 14:29:16 +00:00
Keith Smith
caf5c33db2 [FAB-6050] Adding fabric-ca sample
This sample uses fabric-ca to run an end-to-end test similar
to the BYFN sample. However, instead of using cryptogen, it
uses fabric-ca. All private keys are generated dynamically in
the container in which they are used.

This sample also demonstrates how to use abac
(Attribute-Based Access Control) to make access decisions.
See chaincode/abac/abac.go.

Change-Id: I5eddc9e35908e409ac07266c3183ce89a5a6cd82
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2017-10-17 16:38:33 -04:00
ratnakar
44c204d8b6 [FAB-5898] porting samples to node.js chaincode
Fabric 1.1 supports javascript chaincode. This changeset
addresses porting of the golang chaincode to node.js
chiancode and the corresponding README files

Change-Id: Iae24e713f16ab3508fe0cc18ee062ffa412b8ba6
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-10-15 21:12:11 -04:00
Jim Zhang
38ad27885f Merge "[FAB-5992] Fix error in first-network dir" 2017-10-02 22:49:33 +00:00
Gari Singh
07a07d5423 [FAB-6361] Update license text in README
The license text at the bottom of the
README is a bit confusing as it might imply
that the entire project is licensed under
Creative Commons
See [FAB-6326] for details

Change-Id: Ic9178ac0d55763b5c911ec7c188312e5a6b98c88
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-09-30 09:31:41 -04:00
Zhangjiong Xuan
c9b0c62975 [FAB-6292] Fix spelling error
[FAB_6292] fix spelling error in high-throughput.

Change-Id: I6f0d3a8ccdbd3b5b0762e3f346292340862354ac
Signed-off-by: Zhangjiong Xuan <xuanzhangjiong@hyperchain.cn>
2017-09-26 15:24:26 +08:00
Jim Zhang
56af764006 Merge "Add high-throughput example to samples" 2017-09-14 17:19:56 +00:00
Alexandre Pauwels
9d70f31334 Add high-throughput example to samples
A new data storage model was implemented in the fabric-samples which allows
for high-throughput of transactions. The storage model is based on storing
deltas of a value, creating a new row for each transaction, and then merging
these deltas when the final value of the variable is required.

This concept is similar to simple integer-based CRDTs, where add or subtract
updates are constantly sent to the ledger and the merge function combines all
of these deltas into one value.

Change-Id: I60b5cdc295d4503d7d496d016bf215c78eff5710
Signed-off-by: Alexandre Pauwels <alexj.pauwels@gmail.com>
2017-09-14 09:06:37 -04:00
Ethan Coeytaux
194b9b9bca [FAB-5618] Allow directory to contain spaces
Added quotes to $CURRENT_DIR in byfn.sh so that the current directory
can contain spaces and the script will still run properly.

Change-Id: I3853e3398c29c55c46603477fada5db023808431
Issue-id: FAB-5618
Signed-off-by: Ethan Coeytaux <eacoeytaux@gmail.com>
2017-09-12 10:27:05 -04:00