Commit graph

500 commits

Author SHA1 Message Date
Matthew White
7a5f3398a9 Merge "[FAB-15717] fix Error Unexpected end of JSON input" 2019-07-15 09:43:14 +00:00
Jason Yellick
e8c0ca1b03 Merge "FAB-15782 Sample Go CC should include deps" 2019-07-11 20:00:09 +00:00
Gari Singh
a872358668 Merge "[FAB-15723] Fix script and instruction with ccenv" 2019-07-10 09:45:20 +00:00
Tatsuya Sato
8bbdd0faf0 [FAB-15716] Fix instructions for dev-mode
This patch fixes the instructions for dev-mode.

For the commands to start the chaincode to work properly,
this patch modifies the commands.
- Use peer.address flag (instead of the unused env var after FAB-14770)
- Add CORE_PEER_TLS_ENABLED=false (dev-mode is for non-TLS mode only)

FAB-15716 #done

Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
Change-Id: I160d22389bb611c5b96ee880497266f06d25abd7
2019-07-03 20:30:26 +00:00
Will Lahti
0254d67b37 QueryApprovalStatus -> SimulateCommitChaincodeDef
Update samples now that QueryApprovalStatus has been renamed
to SimulateCommitChaincodeDefinition.

FAB-15831 #done

Change-Id: I4e12ca2c8424bf8d6537e77e1a9de7fd3723636d
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2019-07-02 13:37:20 -04:00
Arnaud J Le Hors
0acd3eb935 Merge "[FAB-15104] Remove scripts/bootstrap.sh" 2019-06-26 12:59:28 +00:00
Gari Singh
c57d67ce80 FAB-15782 Sample Go CC should include deps
The ccenv used to build Go chaincode is being
updated to no longer include the shim
dependency.  Go chaincode must now vendor
all of its dependencies prior to being
packaged and installed.

Go chaincodes have been updated to include
go.mod for versioned dependencies.

Change-Id: Ib971cd3f841d5c92a509450bd85f6e424cc60c6e
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-06-25 09:50:31 -04:00
Gari Singh
6ba5a19c2c Update to Go 1.12.5 in ci.properties
FAB-15809 #done

Change-Id: I2decb07cb97d7f655926d8606de26aba100fcd94
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-06-25 05:12:48 -04:00
Tatsuya Sato
1774a25de8 [FAB-15723] Fix script and instruction with ccenv
This patch fixes the script and instruction with the ccenv container.

Running chaincode dev-mode fails because bash was removed from the
ccenv by FAB-15670.
This patch changes the command from /bin/bash to /bin/sh.

FAB-15723 #done

Change-Id: Ibf31ce9170e606988302bf46d8dac98b62e2043e
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
2019-06-18 17:42:24 +00:00
Cefold
6ae711cf7b [FAB-15717] fix Error Unexpected end of JSON input
Change-Id: If5700abbe8315ece19e488e2d1ee0e0a7f0b8f49
Signed-off-by: Huida Liu <cefold@gmail.com>
2019-06-18 14:56:18 +00:00
Yukihiko
5be56d3f77 [FAB-15104] Remove scripts/bootstrap.sh
Removed scripts/bootstrap.sh file and updated the README.md
with steps to download bootstrap.sh from Fabric repository.

Signed-off-by: Yukihiko <hirayanagi@jp.fujitsu.com>
Change-Id: I50357c702c8b357fedaf8ccd1ec97ef6c4429371
2019-06-14 14:39:32 +10:00
Yuki Kondo
779f8f3418 [FAB-15649]Fix Fabcar to install Chaincode on all peers
CI Fabcar javascript test fails because a query proposal is
sent to a peer which does not have Chaincode. The query handler
in fabric-network does not consider if Chaincode is installed on
target peers.

As a workaround, this CR adds steps installing Chaincode
on all peers during the setup.

Change-Id: Iaff0c5bde8c54cef12a176b55e13d70173ee8108
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-06-12 20:07:16 +00:00
NIKHIL E GUPTA
7c5f5d39c9 [FAB-15199] Update interest rate sample
Update interest rate sample for chaincode
lifecycle

Change-Id: I8e481dda11a757d5fe76105098307141a67dff60
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2019-06-12 17:43:22 +00:00
Simon Stone
f0dca20446 [FAB-14532] Remove LL FabCar sample
Remove the Fabric v2.0 version of the low-level FabCar sample. We
should not be advertising how to use the low-level APIs at this
point. The low-level samples are still available for Fabric v1.4
to show the difference between the low-level and high-level APIs.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I0faef40d4cfddc689e6d7184491fd3759a3558a1
2019-06-10 19:17:29 +01:00
Arnaud J Le Hors
ae91463639 Merge "[FAB-13769] Add UT code to ABAC sample Chaincode" 2019-06-05 12:07:13 +00:00
Simon Stone
9225122fb3 Merge "[FAB-15601] BYFN: Fix MAX_RETRY for couchdb" 2019-06-05 11:04:32 +00:00
Arnaud J Le Hors
423b2ffe18 Merge "[FAB-9329] Remove the unused variable in BYFN/EYFN" 2019-06-05 09:18:51 +00:00
Tatsuya Sato
1ed1a10af6 [FAB-15573] Fix typo in fabric-samples-ci.md
This patch fixes typo in docs/fabric-samples-ci.md

Change-Id: I814efb14d47e3509e3f785504b8d6d2ef26399a0
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
2019-06-04 21:23:14 +00:00
Arnaud J Le Hors
2e7fec9da8 [FAB-15601] BYFN: Fix MAX_RETRY for couchdb
CR31665 increased MAX_RETRY to 15 which allowed the fabcar go test
to succeed but the fabcar javascript test still fails. This sets
it to 20 in hope this will be enough.

Change-Id: I51a0e24893634d773b12341f5b87d49d2bbf7cb6
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-06-03 16:30:54 +02:00
Yuki Kondo
1e9e4c4dce [FAB-9329] Remove the unused variable in BYFN/EYFN
This CR removes the unused variable 'OS_ARCH' from byfn.sh,
eyfn.sh and interest swap in fabric-samples.

FAB-9329 #done

Change-Id: I0d1b87679d66bec1d9e4aaee9e770305f9c8f4b9
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-06-03 10:42:47 +00:00
Yuki Kondo
964c09fe00 [FAB-15601] BYFN: Fix MAX_RETRY for couchdb
BYFN and Fabcar with couchdb are failing intermittently
because CLI sends a request for joining a Channel before
a Peer connects to the couchdb.
This CR changes the value of MAX_RETRY from 10 to 15
as a workaround.

FAB-15601 #done

Change-Id: I8d91fa224c585cc52c9dfabebb808b8909253900
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-05-31 23:50:36 +00:00
Arnaud J Le Hors
0b12e687fb Merge "[FAB-15127] Update high throughput sample" 2019-05-28 16:37:42 +00:00
NIKHIL E GUPTA
41dca99e5a [FAB-15127] Update high throughput sample
Update high throughput sample scripts for
chaincode lifecycle

Change-Id: I8e7f9d98bb62d75a779e2767b0e165a36a700d43
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2019-05-28 11:04:31 -04:00
Matthew White
876662e244 Merge "[FAB-14487] Make FabCar use BYFN, not basic-network" 2019-05-28 10:24:00 +00:00
Arnaud J Le Hors
f331828701 Merge "Use official CouchDB image" 2019-05-21 08:09:21 +00:00
Arnaud J Le Hors
11a534fac7 Merge "[FAB-14369]Fix dev mode failing to build Chaincode" 2019-05-16 14:15:52 +00:00
Arnaud J Le Hors
ccf765ad56 Merge "[FAB-15051] delStandard() function for high-throughput" 2019-05-16 13:45:53 +00:00
Gari Singh
3fe014a8c2 Use official CouchDB image
Replace fabric-couchdb image with
official CouchDB library image.

FAB-15353 #done

Change-Id: I248fb452419f590553ad578141dbfb3ab1fb5dd5
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-05-05 09:01:01 -04:00
Simon Stone
f2d0fa05e4 [FAB-14487] Make FabCar use BYFN, not basic-network
Update FabCar to use BYFN. As a result, the sample
client applications need to change so that they use
the correct connection profile paths, and so that
they use service discovery.

Change-Id: If02b7fb4ad308c6a7d1e1aa9f953e1bc4e942719
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-05-03 08:51:17 +01:00
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
Ethan Fox
b64fd45da0 [FAB-15051] delStandard() function for high-throughput
This change is to add a delStandard() function to the
high-throughput fabric sample, as well as fix a typo
in putStandard(). In addition to modifying the
chaincode, an additional bash script,
'del-traditional.sh', was created to remotely delete
a created asset from within the docker CLI in
accordance with the sample walkthrough.

This change is necessary to demonstrate the full
capability of the fabric Shim library, such that no
assets remain on the ledger that the user doesn't want

This change was tested on a local deployment of
Fabric 1.4, using the 'Basic Network' asset that
was created by Ethan Fox for internal use by the
IBM Blockchain Innovation Unit within GBS Global.

Change-Id: I34488dc3131f817563568a43f923856fecb07a5a
Signed-off-by: Ethan Fox <Ethan.Fox@ibm.com>
2019-04-04 15:13:09 -04: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