* 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>
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>
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>
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>
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>
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>
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>
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>
* 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>
- 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
Also add .gitignore files for abstore/marbles02, as these are
currently missing.
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I9f9da3e5289a275dd26c1021ea8de80def605e36
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
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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>
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>