Commit graph

318 commits

Author SHA1 Message Date
Matthew White
25d7de4fa6 Merge "[FAB-14486] Extend BYFN to opt skip chaincode deploy" 2019-04-25 13:03:07 +00:00
Matthew White
e639321395 Merge "[FAB-14485] Extend BYFN to opt inc cert authorities" 2019-04-25 13:02:31 +00:00
Matthew White
061abe1c2c Merge "[FAB-14330] Add connection profiles for BYFN and EYFN" 2019-04-25 13:01:36 +00:00
Gari Singh
e9c36499b6 FAB-15276 Fix license statements
Update from ISC to Apache-2.0

FAB-15276 #done

Change-Id: Icb4fb6bcc26c283463472ecb1a47062c799be548
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-04-25 05:36:37 -04:00
Simon Stone
b0bb79ee8e Merge "FAB-14444" 2019-04-24 21:46:46 +00:00
Simon Stone
fbe403616f [FAB-14486] Extend BYFN to opt skip chaincode deploy
Add a new "-n" option to byfn.sh that optionally skips
the deployment of the abstore chaincode. When BYFN is
used as a network for other samples, we don't really
want the default chaincode deployed.

Change-Id: I6b4043a5c0bcedbeec431cc4a860a3b12da8d8f6
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:21:42 +01:00
Simon Stone
0c4141f2a1 [FAB-14485] Extend BYFN to opt inc cert authorities
Add a new "-a" option to byfn.sh that optionally deploys
certificate authorities (in Docker containers) for
organisation 1 and 2.

Change-Id: Ib58c46941aa6e8e58bac01aa3349e97d1f93b930
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:20:38 +01:00
Simon Stone
529b83bc95 [FAB-14330] Add connection profiles for BYFN and EYFN
Add connection profiles as part of the BYFN and EYFN
samples. The connection profiles can be used by client
applications using the Fabric SDKs to connect to those
networks.

Each organisation needs its own connection profile
that contains the set of peers that organisation
should  use to connect to the network. Orderers and
channels are not needed, as they can be determined
by using service discovery.

Connection profiles can be specified in either JSON
or YAML, so provide both.

Change-Id: Ie8e3d2aef6475b324e5be8ebdada4c594c2235ae
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:20:13 +01:00
Gari Singh
dd08f70739 Merge "Update maintainers for fabric-samples" 2019-04-11 20:17:28 +00:00
Wenjian Qiao
2c21c83a8c [FABN-1184] Update fabtoken/README.md
Change-Id: I2cdd071ab93ca54133ad452eec894c4c28c296b5
Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
2019-04-11 15:45:59 +00:00
Wenjian Qiao
5056a23cbf [FABN-1184] Add CI script for fabtoken sample app
Change-Id: I611d9249c177a8bbc7e36d0406b81eb8e69dfa3e
Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
2019-04-11 09:53:48 -04:00
David Enyeart
5d6db959fb Update maintainers for fabric-samples
Previously fabric-samples utilized the fabric list of maintainers. Over time
other contributors have become active. The fabric maintainers will use this
CR to vote for a new set of fabric-samples mainatiners, with the initial list
based on developers with the most contributions and reviews for fabric-samples
over the last 12 months.

Additionally, change fabric-samples from a two +2 policy to a
non-author code review policy.

Change-Id: I9c479f2e8a3dd7389e6e317aa4430cba1df9f3b3
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-04-11 00:30:20 -04:00
Gari Singh
fdf88df4c5 Merge "[FABN-1184] Implement fabtoken sample app" 2019-04-09 14:28:13 +00:00
David Enyeart
f5278157ac [FAB-15119] Fix BYFN with Java chaincode
The issue is that BYFN passes "Init" function while the
sample Java chaincode checks for "init" function.

Within the init function, there is no need to check the function
argument that is passed in. The sample Go chaincode and Node.js
chaincode do not check the function argument. This change makes
sample Java chaincode behave the same way.

Change-Id: I802978e1276e92a3d420b3f4a391ff66a352d321
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-04-09 05:42:08 -04:00
wenjian3
8245252acc [FABN-1184] Implement fabtoken sample app
- implement sample app to issue, transfer, redeem and list tokens
- change basic-network/crypto-config.yaml user count to 2
- regenerate crypto and channel config via generate.sh
- add fabtoken/README.md

Change-Id: I8d270c95b29e4af9c432fb05e7e8dc6be7bbc069
Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
2019-04-08 14:33:43 -04:00
rameshthoomu
1bd1c2f355 FABCI-284 Update CI Pipeline script
This patch updates CI pipeline scripts which utilizes global shared
library reusable functions. It also creates ci.properties file with
all the parameters required to test the fabric-samples patch.

Change-Id: I9ed97c8dd0c07a3677042dbda034043e8a19a0f1
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
2019-04-05 20:37:23 +00:00
Alessandro Sorniotti
c24abf9c01 [FAB-15022] Basic-network support for new lifecycle
This change set upgrades config files, scripts and fixtures for the
basic-network sample.

Changes are as follows:
 - configtx.yaml was amended adding capabilities and policies required
   to bootstrap a 2.0 channel
 - crypto-config.yaml was amended adding support for node OUs (so that
   policies involving peers, admins and clients can be evaluated)
 - generate.sh was amended adding the name of the orderer system channel
 - generate.sh is executed, producing fixtures in the crypto-config and 
   config directories
 - docker-compose.yml is changed specifying the correct SKI after
   crypto material has been regenerated
 - finally, startFabric.sh has been upgraded to use the new lifecycle

Change-Id: I201a98e3bf4d9717741539f572719aa687f4bb63
Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
2019-04-05 17:01:45 +00:00
Gari Singh
3e68a7eff8 FAB-14784 Remove balance-transfer
This sample does not demonstrate best
practices.

Change-Id: I80fb5a7748ac6d067e52e8e0601a46cfb15cb0ac
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-03-30 07:37:30 -04:00
Alessandro Sorniotti
eb3fe0810f [FAB-14779] QueryApprovalStatus step in byfn
Between the approve and commit steps we add a QueryApprovalStatus to verify
whether peers are ready to commit the chaincode definition.

Change-Id: I18805a4180fa61da07d2bca321c6355660f772fc
Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
2019-03-28 14:00:37 +00:00
Alessandro Sorniotti
d24577fb5d Merge "[FAB-14711] update byfn with new lifecycle" 2019-03-26 17:14:09 +00:00
Alessandro Sorniotti
27774297ec [FAB-14711] update byfn with new lifecycle
Change-Id: I24dd3e85f6dedab52b05ce3103ee06435f01f9a3
Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
2019-03-26 16:25:14 +01:00
David Enyeart
9a6a625f8c Merge "FAB-14531 BYFN Raft with 5 nodes" 2019-03-22 00:53:33 +00:00
Yuki Kondo
aec3389792 [FAB-12215]WYFA:Remove chainId in tx proposal request
A sample application in Write Your First Application has an
unnecessary parameter “chainId” in a transaction proposal request.
Since a channel name is included in a channel object, it is not
required in a request.

This CR removes the parameter ”chainId” from the sample code.

FAB-12215 #done

Change-Id: I1e9b24c791a2129534766805855d05e78b050149
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-03-17 11:51:32 +00:00
Jason Yellick
ee5b438913 Merge "FAB-14633 Remove apt-get from eyfn.sh" 2019-03-14 17:45:09 +00:00
Jason Yellick
b5d50265e4 FAB-14633 Remove apt-get from eyfn.sh
The tools and fabric images are all alpine based now and do not have
apt-get.  Instead, they are prepopulated with jq.  This CR simply
removes the attempt to install jq (which always fails) and acts as a
red-herring when trying to debug.

Change-Id: I8fe83dc4a9ba6995ebfb2786cee45fe0e591b85a
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-03-13 14:02:09 -04:00
Yoav Tock
efaadd329d FAB-14531 BYFN Raft with 5 nodes
Extend the 3-node etcd/raft cluster in BYFN to 5 nodes, in
order to better support the documentation effort. This will
allow users to experiment creating channels with less then
5 nodes, but avoid the pitfalls of a 2-node cluster.

Change-Id: I5ba1d6039b4bb4864b2b97271de81fbfe91b4fb5
Signed-off-by: Yoav Tock <tock@il.ibm.com>
2019-03-07 15:00:04 +02:00
NickLatkovich
d63047cac9 FAB-14444
Awaiting of wallet importing in fabcar

Change-Id: Ib4a43f75850728794b90b58add7956de113cac80
Signed-off-by: NickLatkovich <nicklatkovich@gmail.com>
2019-03-01 18:55:35 +03:00
Yacov Manevich
ed0f1cc9ea Merge "FAB-12762 Add etcd/raft consensus option to BYFN" 2019-02-28 16:17:46 +00:00
Yoav Tock
420ba2311c FAB-12762 Add etcd/raft consensus option to BYFN
Augment the fabric-samples first-network sample to include an option
to choose etcd/raft as consensus-type.

Extend the -o flag so that it allows users to choose between the
solo, kafka, or etcdraft consensus-type for the ordering service.

Use three orderer nodes.

Change-Id: Ibc4c3564220466aef0a87baee4a2d594e5554a62
Signed-off-by: Yoav Tock <tock@il.ibm.com>
2019-02-28 16:09:17 +02:00
Christopher Ferris
4eaad65db2 Merge "Correct broken link" 2019-02-26 21:36:21 +00:00
David Enyeart
f734aaef05 Merge "[FAB-13933] Fix misspellings" 2019-02-25 18:09:58 +00:00
Jason Yellick
2b68c80716 FAB-14317 Add default policies to org3
Configtxgen was failing to print the org definition for org3 because it
was missing the required policies for the org definition.  This caused a
failure in the CI test for adding an org.

Because it will be needed in the future, this CR also adds the new
lifecycle endorsement and general endorsement policies to the
configtx.yamls as well.

Change-Id: Ie53165231cf8afe6377b51a28625797b15ca78ec
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-02-24 20:56:35 -05:00
David Enyeart
7b673ffd2f Merge "[FAB-14268] Make BYFN/EYFN ports match external ports" 2019-02-22 16:17:59 +00:00
Kostas Christidis
b0f3770648 Merge "Fix doc link Fix variable error" 2019-02-22 14:41:02 +00:00
Gari Singh
44ab2bbd15 Merge "FAB-13489 fabric-samples add error msg" 2019-02-22 13:00:58 +00:00
Gari Singh
e6894e82fb Merge "[FAB-14162] Pin fabric-samples in master to "unstable"" 2019-02-22 13:00:08 +00:00
Gari Singh
f94753cfa4 Merge "[FAB-11796]high-throughput:Remove unnecessary prunesafe" 2019-02-22 12:58:21 +00:00
Simon Stone
f942010fa6 [FAB-14268] Make BYFN/EYFN ports match external ports
Update both BYFN and EYFN so that the peer request and
chaincode ports match the externally mapped ports. This
enables applications both inside and outside the Docker
network to use service discovery to interact with these
networks (see the JIRA for more details).

Change-Id: I73c36dfdb269ec4225376fb04b1e7a087363e4cc
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-02-21 14:57:39 +00:00
Jason Yellick
4e2ce23e43 FAB-14271 Add channel policies to channel config
Previously, configtxgen would auto-populate policies if they were
omitted.  This presented some problems for specifying partial policy
schemes, like only overriding one policy.  Support for omitting policies
was deprecated in v1.3 and has been removed for v2.0.0.

Change-Id: Ie01bf8f05911358a0af144f2fe2df2667c2bf12e
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-02-20 14:08:40 -05:00
Yuki Kondo
f26477c99d [FAB-11796]high-throughput:Remove unnecessary prunesafe
fabric-samples/high-throughput is a sample Chaincode for
delta-based transaction model. When executing `update`, a new delta
for a particular variable is updated to the ledger. The sum of a
variable is updated to ledger by deleting all of its delta rows
while computing the sum. The current Chaincode has two types of
pruning functions. However, there is no difference in terms of
Fabric's transaction model.

This CR adds the following changes.
- Remove unnecessary `pruneSafe` function.
- Change the name of function from `pruneFast` to `prune`.
- Update or delete related scripts.
- Improve a related documentation.

FAB-11796 #done

Change-Id: I5daa21554e53d77b7b5081f02a2846a85ec06f9a
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-02-15 18:27:15 +00:00
David Enyeart
137327a009 [FAB-14162] Pin fabric-samples in master to "unstable"
Pin fabric-samples in master to "unstable" so that latest node modules get used by default.

Change-Id: I36df30cb108a350c8e59756ed0d2f03610eb1d73
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-02-12 13:08:22 -05:00
Arnaud J Le Hors
6007c0974c [FAB-13862] Rename example02 ABstore
Updated chaincode, BYFN, and all other references to example02 to use
the new name ABstore.

Change-Id: I04c177f9de68eb913f4384fd643aa69631143d58
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-30 09:02:23 +01:00
Daisuke IIZUKA
94cb6033de [FAB-13933] Fix misspellings
Fix misspellings of "Prerequesites" to "Prerequisites",
and "prinicpal" to "principal"

Change-Id: I1024cc0f720bedddee3286b2520ab3824d7a1d5b
Signed-off-by: Daisuke IIZUKA <daisuke.iizuka.ag@hitachi.com>
2019-01-29 02:16:17 +00:00
BigManing
a8a55395af Fix doc link
Fix variable error

Change-Id: I24cae31cc3df080b8906812b81f63b15795dc6e5
Signed-off-by: BigManing <lingshui2008@qq.com>
2019-01-24 16:47:03 +08:00
Arnaud J Le Hors
c7438e1f7c [FAB-13668] BYFN's container volume mapping is bad
Updated compose files and scripts to use the correct mapping.

Change-Id: Iccbe384393c2736c5ba197d70ef6a124588ad588
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-14 16:17:30 +01:00
Bret Harrison
e48b2dece9 FAB-13489 fabric-samples add error msg
Add error messages and update console logging.

Change-Id: Ic4ffd73ffa098121d7af03f8d2e5383b79f832c0
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2019-01-07 18:03:15 -05:00
David Enyeart
8a458b5cdc [FAB-12056] Private marbles cc use transient data
The marbles02_private example needs to be updated to pass all
attributes as transient data instead of arguments.
This will prevent identifiable information being sent to the orderer.

Also removed transferMarblesBasedOnColor since range
queries and update is not supported in a transaction when
using private data, as different peers may have
different data in their local private state
databases.

Change-Id: I7c3cebcb49b6c59e4e8ea35f46a799ffdd1999e9
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-01-06 16:52:37 -05:00
Rich Zhao
62699415f7 Correct broken link
Change-Id: I22071c820f5b281ae158a5c4caec9f8e4b283822
Signed-off-by: Rich Zhao <zhao.zhenhua@gmail.com>
2019-01-04 23:19:20 +00:00
Gari Singh
39e8ec4a8a Merge "FAB-13372 Fabric-Samples return error msg" 2019-01-04 19:23:15 +00:00
Gari Singh
461b6abcd6 FABC-781 Remove fabric-ca sample
This sample  uses images which are no
longer published and are not supported
by the community.

FABC-781 #done

Change-Id: I01865b433a1ef4345aaf47255b92c1f83275aa4f
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-01-04 09:38:39 -05:00