Commit graph

70 commits

Author SHA1 Message Date
Mark S. Lewis
63cc77bdc3
Avoid usage of deprecated ioutil Go package (#843)
* Refactor Go files
1. replace deprecated ioutil functions (ioutil is deprecated since Go 1.16)
2. fix variable names that collide with imported package name
3. fix typos

Also update Go version specified by Go modules to ensure a Go version is used in which ioutil is deprecated and replacement functions are available in os and io packages.

Signed-off-by: Tommy TIAN <xtianae@connect.ust.hk>
Co-authored-by: Mark S. Lewis <mark_lewis@uk.ibm.com>

* Specify go 1.18 instead of go 1.19 in go.mod files

Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>

Signed-off-by: Tommy TIAN <xtianae@connect.ust.hk>
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Co-authored-by: Tommy TIAN <xtianae@connect.ust.hk>
2022-10-25 07:04:39 -04:00
denyeart
ee959a2eb0
Update to Go 1.16.7 (#491)
Update Go to 1.16.7 and run "go mod tidy"
to clean up go modules in samples.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2021-10-01 09:16:56 +01:00
dvrajitha
2b662e08b4
Update RegisterUser.java (#428)
Use correct identity for the appUser (Not the same admin user certificates)

Signed-off-by: dvrajitha <dvrajitha@gmail.com>
2021-03-21 07:29:30 +01:00
Brett Logan
08aaaf0313
Update Javascript and Typescript Deps (#403)
Update all of the Node deps to 2.2.<latest>
and regenerate existing package-lock.json files

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>

Co-authored-by: Brett Logan <brett.t.logan@ibm.com>
2021-01-13 12:19:31 -05:00
Andrew Coleman
637ef63425
FAB-18367 Update Go client samples to use RC1 of Go SDK (#385)
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
2020-12-04 08:31:59 -05:00
dependabot[bot]
f497793e57
Bump yargs-parser from 13.1.1 to 13.1.2 in /fabcar/javascript (#328)
Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-16 15:20:28 -04:00
dependabot[bot]
21572f833f
Bump elliptic from 6.5.2 to 6.5.3 in /fabcar/javascript (#273)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-05 13:25:32 -04:00
Arnaud J Le Hors
7771b4f216
Revert "Remove Typescript References (#258)" (#261)
This reverts commit 7a23d7872a.
2020-07-23 17:06:57 +02:00
Brett Logan
7a23d7872a
Remove Typescript References (#258)
As the Typescript examples are essentially just reiterations
of the same Javascript code, there is no benefit to having
providing examples in both languages. The functional code
was exactly the same in both languages. On the contrary it
meant we widened the surface of maitainence and thus we are
removing due to the limited benefit provided by the example
chaincode and applications.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-22 21:57:54 +02:00
Bret Harrison
1f27c327f3 Allow install of a chaincode
options on the network script to deploy chaincode
-ccn The name to be used as the deployed name and used as
     the short name of known chaincodes when the -ccp is not included.
   known short names
     'basic' - asset-transfer-basic
     'secure' - asset-transfer-secured-agreement
     'ledger' - asset-transfer-ledger-queries
     'private' - asset-transfer-private-data
-ccl the language of the chaincode
-ccv the version
-ccs the sequence
-ccp [optional] the path to the chaincode, when provided
     the -ccn will be the deployed name
-cci [optional] the chaincode function to call during deployment
     that will perform an initialization of the channel state
     required for this chaincode

Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2020-07-15 10:39:12 -04:00
Acmefocus
59acacbef1
run fabcar go (#232)
* add go/runfabcar.sh

Signed-off-by: Acmefocus <107723772@qq.com>

* add set hosts and env in go

Signed-off-by: Acmefocus <107723772@qq.com>

* Update fabcar/startFabric.sh

Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com>
Signed-off-by: Acmefocus <107723772@qq.com>

* Update startFabric.sh

delete  set  /etc/hosts

Signed-off-by: Acmefocus <107723772@qq.com>

* add environment variable DISCOVERY_AS_LOCALHOST

Signed-off-by: Acmefocus <107723772@qq.com>

Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com>
2020-07-10 16:18:05 +01:00
Andrew Coleman
87a2bc7afd
FABG-935 Update Go fabcar sample use latest beta (#196)
Now that fabric-sdk-go beta2 has been released which contains the new programming model, update the dependency in the fabcar go sample

Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
2020-06-03 07:47:43 +01:00
Andrew Coleman
cda88df4f6
FABG-935 GoSDK Fabcar sample (#192)
Fabcar sample demonstrating the use of the new Gateway package in the Go SDK

Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
2020-05-27 15:19:16 +01:00
Pratik Patil
2759db2847
Disconnected from the gateway in fabcar query.js (#190)
Signed-off-by: pratikpatil024 <pratikspatil024@gmail.com>
2020-05-27 11:22:01 +02:00
Arnaud J Le Hors
23df2d620a
FGJ-84 Update Fabcar Java app to 2.1.1 (#167)
This updates the fabcar java application to work with the fabric
gateway java version 2.1.1.
It also changes pom.xml to produce a jar file that is self contained
for ease of use.

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-05-20 09:03:10 +01:00
Arnaud J Le Hors
2e3683c419
Add missing Copyright in some files (#163)
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-05-19 15:50:48 +01:00
Arnaud J Le Hors
a091687b9a Fix Fabcar java dependencies
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-04-20 14:20:56 -04:00
denyeart
11e4c23a35
Update samples to use v2.0 or later dependencies (#161)
Update application and chaincode dependendencies to use v2.0 or
later versions in package.json, build.gradle, pom.xml files.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2020-04-17 14:29:37 +02:00
heatherlp
94beab7648 FABN-1531 Use v2.1.0 sdk-node modules
Signed-off-by: heatherlp <heatherpollard0@gmail.com>
2020-04-16 14:31:02 -04:00
dependabot[bot]
6f984e17f3
Bump acorn from 6.4.0 to 6.4.1 in /fabcar/javascript (#144)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-31 07:49:52 +02:00
nikhil550
87600bd29b
[FAB-17268] Move fabcar sample to test network (#103)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-03-30 20:18:06 +02:00
YasongLi
4c7bab0c86
fix: package seletor REGEX (#135)
Signed-off-by: 李亚松 <liyasong1987x@gmail.com>
2020-03-27 14:36:30 +01:00
harrisob
3dbe116a30
FAB-17456 fabric-samples read ccp (#117)
Have the application read the common connection profile to
build a JSON object used for the gateway connect and for
a fabric-ca client instance.

Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2020-02-18 14:05:50 +00:00
Matthew B White
b89ee34ff7
Update Commercial Paper to v2.0 Lifecycle (#109)
* WIP Commercial Paper -> Test network

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

* Update Commercial Paper to v2.0 lifecycle

- move to using the test-network
- updating README.md to include commands to use v2.0 lifecylce
- update Contracts and Applications to use 2.0 libraries

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2020-02-11 09:38:52 +00:00
Matthew B White
94ac8b6050 Update to use beta levels of modules (#88)
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2019-12-13 20:20:58 +00:00
Simon Stone
81aabf4c0b [FAB-16849] Various updates for Java version of FabCar
- Update .gitignore
- Use builds on Sonatype, not Nexus
- Enable new discovery as localhost flag

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ia0904cedf953b5ecbf6aaf859245a9bb431d3f76
2019-10-16 17:12:48 +01:00
Simon Stone
a42b858bc4 Update FabCar to reflect wallet API changes
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I845aa7af376b9a21da9f285079c025c71c43a2cf
2019-10-07 05:18:16 -04:00
Simon Stone
890f9eab9f [FAB-16713] Fix npm audit warnings
Also add .gitignore files for abstore/marbles02, as these are
currently missing.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I9f9da3e5289a275dd26c1021ea8de80def605e36
2019-10-07 04:16:39 -04:00
Simon Stone
3d19014bd7 [FAB-6415] Java 11 support for FabCar sample
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I97cd3ab48f6f2fe828c3328adfaf706be5124387
2019-09-24 09:41:02 +01:00
Simon Stone
b6380cc88c [FAB-16198] Run "go mod vendor" for FabCar Go contract
FAB-15782 added go.mod files for versioned dependencies,
but "go mod vendor" is never run before deploying the
FabCar Go contract either by the user or in CI.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I958d426ca72938a2051bf95d6ecc4c6e3cd1d7b2
2019-08-02 15:48:48 +01:00
Simon Stone
13f16e5d6d [FGJ-4] CI tests for FabCar Java sample
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I2b28c69a2f3ec0e3d87252ef4a585b4a46fddcbd
2019-07-30 17:23:08 +01:00
andrew-coleman
171a7d2275 FGJ-4 Fabcar sample
Implementation of Fabcar client for Java Gateway SDK
Changes to first-network to generate the CCP files with
embedded PEM certificates rather than paths to files on disk

Change-Id: Iff15425e96ce28c6f96079cee474c35868fab554
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>

FGJ-4 split java fabcar into separate classes

Incorporate review comments from previous CR
Split enroll/register/transactions into separate classes

Change-Id: I384cec59c7f53a37864bfc28be11e785a61421f3
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>

FGJ-4 add license header to fabcar java sample

Change-Id: Ic658fe3bdece9875ca3ceaf28d94c5fb48879083
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
2019-07-30 14:07:14 +01:00
James Taylor
750f937218 [FAB-15213] Add Java FabCar sample contract
Change-Id: I0ae40c2a02aea8293a348038e3e1bd02f7030509
Signed-off-by: James Taylor <jamest@uk.ibm.com>
2019-07-29 11:59:30 +00:00
Simon Stone
abbda9575f [FAB-15897] Improve FabCar test logging
Collect logs from all existing Docker containers instead
of just limiting it to a predefined (and incorrect) set.

Also clean up the directory structure for the logs, and
remove any networks/volumes after each test run.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ifcf88baeb9ba4d42f757f7cd23ab2a178ab39b41
2019-07-29 11:03:10 +01: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
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
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
Simon Stone
b0bb79ee8e Merge "FAB-14444" 2019-04-24 21:46:46 +00: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
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
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
Gari Singh
44ab2bbd15 Merge "FAB-13489 fabric-samples add error msg" 2019-02-22 13:00:58 +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
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
6a7472e72e [FAB-13126] Align fabric-samples with 1.4.0-rc1 release
Change-Id: I2ff248e93cbac8747c322672f7a831ece597e116
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-12-12 07:55:08 -05:00
Simon Stone
445ccbc25a [FAB-12880] Move old prog model samples for FabCar
Move the old programming model samples for FabCar,
including the "node" (JavaScript!) chaincode sample
and the JavaScript application in the top level into
new subdirectories called "javascript-low-level".

We still want to keep these samples around for comparision
purposes, but most new developers should be using the new
samples built using the new programming model.

At the same time, update the startFabric.sh script
to output correct help information on how to run
the applications built using the new programming model
after starting the Fabric network and deploying the chaincode.

Change-Id: I1e3701737f105cba67f661bf893771ac8a3a0373
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-12-10 21:39:30 +00:00
Christopher Ferris
527024833b Merge "[FAB-13206] Remove dependencies on fabric-client" 2018-12-10 15:56:46 +00:00
Simon Stone
5be62b5200 [FAB-13207] Remove incorrect discovery options
The TypeScript version of the FabCar app uses a dodgy
"as any" cast to get around a bug that has been fixed;
turns out the wrong name was being used (should have
been asLocalhost, not useLocalhost).

Note, because basic-network does not use TLS, we cannot
use service discovery. We can enable service discovery
when we migrate FabCar to BYFN instead.

Change-Id: I36dad1c8cc7380ca1123805ae3e74fe1e7665b40
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-12-10 13:13:11 +00:00
Simon Stone
fdbd92d65f [FAB-13206] Remove dependencies on fabric-client
The new FabCar apps currently have a dependency on
the fabric-client (old programming model) module,
but now the dependencies of the fabric-network module
have been corrected, this dependency can be removed.

The fabric-ca-client dependency is staying because the
FabCar apps explicitly require this module to perform
CA interactions.

Change-Id: Iee40f7a560d5ac0a0f8202fc6d751aa45467829e
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-12-10 12:03:03 +00:00