This resolves mocking errors using the latest Java chaincode shim and
very old versions of Mockito.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
Allow client applications to work regardless of whether network was creating using a CA or cryptogen since they create different client certificate file names.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
This patch moves publishing of REST sample image from AZP to GHA.
This was the last job running on AZP.
Also, this patch fixes an error encounterd during the image build.
Publishing of REST sample image is now only executed when pushing to main.
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Include specific gRPC TLS implementation in dependencies instead of relying on an appropriate one to be present as a transitive dependency.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
* Fix npm problems on asset-transfer-basic/chaincode-typescript
This patch fixes npm problems on
asset-transfer-basic/chaincode-typescript.
- Sync npm-shrinkwrap.json with package.json to fix the npm ci error
- Update the version of TypeScript to avoid the type error on logform
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
* Update npm-shrinkwrap.json
Fix dependencies
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
---------
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
* Update go dependencies
Update go dependencies in sample chaincodes and applications
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* Update to Go 1.19.6
Update to Go 1.19.6
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
---------
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* Return exit(1) if application-java fails
If application-java fails, return an exit(1) code,
so that callers such as Github Actions CI can detect the failure.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* asset-transfer-basic CI improvements
- Application failure should result in CI failure
- Automatically remove wallet from prior runs
- Fix chaincode name issues, allow chaincode name to be passed from CI
- Fix appUser collisions (duplicate registration failures)
- Fix key create collisions across apps (in cases where same chaincode is used for multiple apps)
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
---------
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
This patch fixes the gradle version used in asset-transfer-basic/
chaincode-java build to 7.
The reason is because the gradle version in the gradle:jdk11-alpine
image is updated from 7 to 8, which seems to cause the build to fail.
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Rely on the dependencies of @hyperledger/fabric-gateway making these packages transitively available. Having explicit dependency versions in the application can cause type conflicts due to private member changes in the gRPC Client class across versions.
Also fix some missing or incorrect Node types and engines version contraints.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* fixed comment consistency problem with erc20 chaincode
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
Co-authored-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* REST api added for asset transfer in Golang
Signed-off-by: Basil K Y <techiebasil@gmail.com>
* add go.sum to git
Signed-off-by: Basil K Y <techiebasil@gmail.com>
* fix golint error
Signed-off-by: Basil K Y <techiebasil@gmail.com>
Signed-off-by: Basil K Y <techiebasil@gmail.com>
Error handling example used a transaction invocation with the wrong number of arguments and so did not demonstrate the same error condition as other language samples. The error handling code was also not as comprehensive as it should be.
Also changed the console output throughout to match the content and format of the Node and Java samples.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* 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>
This changes the base image used to build the chaincode-as-a-service
java container to the alpine version which is sufficient and less
taxing than using the full gradle:jdk11 one.
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
npm audit reveals several high and one critical vulnerabilities in the dependencies:
ansi-regex 4.0.0 - 4.1.0
Severity: high
Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/nyc/node_modules/ansi-regex
minimist <=1.2.5
Severity: critical
Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h
Prototype Pollution in minimist - https://github.com/advisories/GHSA-vh95-rmgr-6w4m
fix available via `npm audit fix --force`
Will install mocha@10.0.0, which is a breaking change
node_modules/minimist
node_modules/ts-node/node_modules/minimist
mkdirp 0.4.1 - 0.5.1
Depends on vulnerable versions of minimist
node_modules/mkdirp
mocha 1.21.5 - 6.2.2 || 7.0.0-esm1 - 7.1.0
Depends on vulnerable versions of mkdirp
node_modules/mocha
protobufjs 6.11.0 - 6.11.2
Severity: high
Prototype Pollution in protobufjs - https://github.com/advisories/GHSA-g954-5hwp-pp24
fix available via `npm audit fix`
node_modules/protobufjs
5 vulnerabilities (2 moderate, 2 high, 1 critical)
This change (from running npm audit fix --force) removes all of them:
npm audit
found 0 vulnerabilities
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
- Updated build to use Go 1.18 since Go 1.16 is no longer supported.
- Use Java 11 in updated samples, and take advantage of new language features.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Use an .npmrc to enable engine-strict checks so that `npm install` will fail for projects when an incompatible Node version is used, rather than confusing errors about unsupported language features occuring at runtime.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* Addresses Issue #548 by providing a simple guide for running Java chaincode as a service with a local debugger.
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* missed a couple of bash syntax errors
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Add metadata and activate examples to the CC README
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* move ccpackage/ contents into network script
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Fix CI test - Azure mounts git checkout at a different folder root path
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Update test-network-k8s README with updated cc deploy commands
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Run basic-asset transfer CI tests with Java + golang CC in Azure
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* remove (obsolete) test-net chaincode/ folder
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Address some PR review feedback points - README reorg
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* Use the SDKs contract router Main, not a local entrypoint
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
* bump the build - remove trailing newlines from a README
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
After feedback from the community, this PR adds CORS support in, but as an option
to enable.
Along with warnings that the default wildcard origin might not be applicable
in a production use case
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
1. The default chaincode use Capitalized JSON Names, whereas for new asset the REST validation didn't.. Adjusted
so it matches the chaincode
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
Podman isn't as lenient as docker when it comes to the syntax of the
Dockerfile and insists on getting the ARG command properly scoped.
This fixes this error:
...
[2/2] STEP 12/15: EXPOSE $CC_SERVER_PORT
Error: error building at STEP "EXPOSE $CC_SERVER_PORT": EXPOSE requires at least one argument
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>