Commit graph

1202 commits

Author SHA1 Message Date
Mark S. Lewis
f16e9e6de5 Consistent Go version in go.mod and go.work files
The repository currently uses Go 1.22 to test samples in the automated
build. This change sets the Go version in all go.mod (and go.work) files
to Go 1.22.0, and removes any Go toolchain entries.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-10-14 10:25:34 -04:00
Mark S. Lewis
b931df3a5f Explicitly specify hash in client applications
For some signing implementations, such as ed25519, a non-default hash
implementation must be specified when creating the Gateway connection in
client applications. Rather than relying on the default hash algorithm,
it is probably good practice in general to specify an algorithm that is
compatible with your signing implementation.

This change explicitly specifies the hash algorithm to raise visibility
of the option to select the hash algorithm.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-10-07 12:25:40 -04:00
Mark S. Lewis
e37e991c4c Update applications to use fabric-gateway v1.6.0
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-09-25 13:18:45 +09:00
David Enyeart
137f365ec9 Bump ubuntu to 22.04 in CI
Since Fabric v3.0 builds on ubuntu 22.04,
it is necessary for samples CI to run on ubuntu 22.04.

Both Fabric v2.5 components (ubuntu 20.04) and
Fabric v3.0 components (ubuntu 22.04) work on
ubuntu 22.04 runtime.

The update also requires shell script updates to pass linting.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-09-19 10:27:26 +09:00
Tatsuya Sato
ce5aa883ee test-network-k8s: Improve prereqs logic
This patch improves prereqs logic in test-network-k8s.
- Use the newer install script instead of bootstrap.sh
- Download binaries matching the Docker image versions, instead of the latest version
- Add checks for Fabric versions to ensure consistency between images and binaries

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-08-21 12:29:22 -04:00
Tatsuya Sato
5c5e98bb3d Fix the default chaincode version to "1.0" in test-network
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-08-20 13:15:11 -04:00
Mark S. Lewis
3826626d00 Configure dependabot updates to GitHub Actions
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-07-29 15:50:33 -04:00
takayuki-nagai
50b69f6157
Add document about how to benchmark the performance using Hyperledger Caliper (#1238)
Add document about how to benchmark the performance using Hyperledger Caliper

Signed-off-by: takayuki-nagai <takayuki.nagai.nu@hitachi.com>
Co-authored-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-07-17 17:46:23 +09:00
chinmayi
604a0a561b Fix directory path for chaincode-external
Signed-off-by: chinmayi <chinmayishaan2316@gmail.com>
2024-06-24 16:27:16 -04:00
Mark S. Lewis
110e732259 Update Go chaincode to fabric-contract-api-go/v2
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-21 15:18:12 -04:00
Mark S. Lewis
7258b4f4ab Add JavaScript asset-transfer-basic application
While the TypeScript application sample is essentially identical (with
the addition of some type declarations), there seems to be sufficient
uncertainty amongst JavaScript developers not familiar with TypeScript
on how best to implement a JavaScript application that it is worthwhile
having one plain JavaScript sample using the current client API.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-21 12:16:31 -04:00
Mark S. Lewis
76088d0273 Remove legacy sample applications
The removed samples make use of deprecated legacy client SDKs. They all
have equivalent samples implemented using the currently supported Fabric
Gateway client API, and are therefore redundant.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-19 10:38:52 -04:00
David Enyeart
e334b7527a Bump fabric to v2.5.9
Bump fabric to v2.5.9.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-06-19 11:59:47 +09:00
Mark S. Lewis
c077dae79c Update TypeScript implementations
- Dependency updates
- ESLint flat configuration format, replacing deprecated configuration
- Minor fixes to compile and lint issues
- Consistent TypeScript formatting with .editorconfig

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-18 06:51:58 -04:00
Chris Elder
a4f0a2c5b2 Change CA ports in test-network-nano-bash
Signed-off-by: Chris Elder <celder@Chriss-MacBook-Pro.local>
2024-06-15 16:43:43 -04:00
Chris Elder
3622a5e383 Add chaincode logging for binary chaincode in test-network-nano-bash
- Correct sh compability in ca_utils.sh
- Correct linux compatibility in external builder

Signed-off-by: Chris Elder <celder628@gmail.com>
Signed-off-by: Chris Elder <celder@Chriss-MacBook-Pro.local>
2024-06-14 13:10:53 -04:00
Mark S. Lewis
29e695187a Use more specific chaincode package versions
This demonstrates good practice in restricting the chaincode package
versions to those applicable for the specific Fabric (major/minor)
version targeted for deployment.

Also some corrections to the repository README. Particularly referring
to other branches for samples targeted at earlier Fabric versions, since
samples in the main branch may exploit features not available in older
Fabric releases, which can cause confusion for end users.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-14 00:24:08 -04:00
Chris Elder
179bc96846 Add external builders for golang and node chaincode to test-network-nano-bash
The external builders will build and launch binary chaincode instead of docker containers.

Signed-off-by: Chris Elder <celder628@gmail.com>
2024-06-06 17:51:34 -04:00
Tatsuya Sato
e4af8fe198 test-network-k8s: bump k8s-builder and couchdb
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-06-04 12:56:19 -04:00
Mark S. Lewis
0ed34585e1 Update Node chaincode for v2.5.5 release
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-03 15:27:51 -04:00
Chris Elder
3c63eac4e3 Add CA capability to test-network-nano-bash
This change adds:
- shell scripts to start CAs for each org
- optional flag (-c) to network.sh to start CAs
- generate crypto material in the same format as cryptogen using the CAs
- describe how to start the CAs using terminals

Signed-off-by: Chris Elder <celder@chriss-mbp.raleigh.ibm.com>
2024-05-28 23:31:18 -04:00
David Enyeart
92f028c08d Bump dependencies
Go to 1.22
CouchDB to 3.3.3
Fabric to 2.5.8
Fabric-CA to 1.5.11

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-05-28 11:38:28 +09:00
James Taylor
1058f9ffe1 Update test-network-k8s
Add required permissions for upcoming k8s builder release

Also adds ttl to install jobs and configures the k8s builder prefix

Signed-off-by: James Taylor <jamest@uk.ibm.com>
2024-05-27 13:49:37 +09:00
Mark S. Lewis
d3e2a90ad5 Update test dependencies for Java chaincode
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>
2024-05-21 22:19:39 -04:00
David Enyeart
bf61094231 Remove double quotes for env variables
Double quotes have caused issues in some environments,
e.g. see https://github.com/hyperledger/fabric/issues/4358

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-05-07 01:06:09 +09:00
Dave Enyeart
effe8ff980
Switch microfab to hyperledger-labs version (#1203)
full-stack-asset-transfer points to an old image
that no longer exists.
Point to the hyperledger-labs microfab image instead.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-05-03 10:03:27 +01:00
David Enyeart
2fa83c957a GHA: Use ubuntu-20.04 for local forks
GHA: Use ubuntu-20.04 for local forks
since local forks don't have access to fabric-ubuntu-20.04.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-04-30 12:35:31 -04:00
David Enyeart
4763bcae8d test-network error message if jq not installed
With removal of fabric-tools image, test-network
now depends on jq being installed locally.

This commit logs an error message if jq commands
fail due to jq not being installed locally.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-04-30 14:48:25 +09:00
James Taylor
0db64487e5 Update nano test network
Fix regression in network.sh and update peer scripts to allow
chaincodeListenAddress and chaincodeAddress to be overridden if
required

Also updates the nano test network readme to describe the new
environment variables for the k8s builder

Fixes #1198

Signed-off-by: James Taylor <jamest@uk.ibm.com>
2024-04-29 10:42:41 -04:00
Mark S. Lewis
42b9b60ebc Update Go gRPC dependency
grpc.Dial() is (soon to be) deprecated in current gRPC versions. Use grpc.NewClient() instead.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-04-24 16:24:37 +09:00
Tatsuya Sato
c691cf94a9 Refactor test-network post-decoupling fabric-tools image
This patch aims to refactor the test-network in several aspects,
following the decoupling of the fabric-tools image from fabric-samples.

- Rename 'test_network_home' env var to 'TEST_NETWORK_HOME'
- Dedicate the intermediate artifacts related to configtx to
channel-artifacts
- Refer to core.yaml in fabric-samples/config, similar to org1 and 2,
  instead of adding a new core file
- Remove unnecessary functions and comments for CLI container
- Other minor modifications

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-04-18 13:41:28 -04:00
David Enyeart
820368571d test-network envVar.sh script improvement
Change shell script to use single equals.

In my shell environment single bracket with double equals did not work.
It caused failure when running the chaincode-external tutorial README.

It looks like for maximum portability, it is best to use single bracket with single equals.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-04-12 12:55:48 +09:00
Mark S. Lewis
d4ce4cfadc Update asset-transfer-sbe/chaincode-java
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-04-11 22:57:57 -04:00
Tatsuya Sato
02bcb44ad4 Fix docs and scripts for asset-transfer-basic as an external service
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-04-11 15:24:37 -04:00
Sam Yuan
ebbc419933
Decouple fabric tools image from fabric sample (#1186)
* Decouple fabric tools image from fabric sample
* update with review comments

Signed-off-by: Sam Yuan <yy19902439@126.com>
2024-04-06 19:07:18 +09:00
Mark S. Lewis
66c9992bf3 Add Go chaincode for asset-transfer-events
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-04-03 13:47:31 -04:00
Mark S. Lewis
a5eea8cd5c Read first client cert from cert directory
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>
2024-03-04 09:50:43 -05:00
Mark S. Lewis
db86460086 Use latest v2.5 fabric-chaincode-java
- Update Gradle wrappers
- Update shadow plugin

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-02-25 22:13:26 -05:00
Mark S. Lewis
6dc2fa4f81 Update GitHub action versions
Avoid using deprecated action versions based on Node versions prior to Node 18.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-02-25 22:11:28 -05:00
Arne Rutjes
a708af9159 add optional extra arguments to lifecycle commands for more flexibility
Signed-off-by: Arne Rutjes <arne123@gmail.com>
2024-02-09 09:16:58 -05:00
uniform64
02d9f8c58b add support for docker compose v2 (fix #730)
fix bugs in #1140

Signed-off-by: uniform64 <jiny2048@gmail.com>
2023-12-12 09:14:06 -05:00
uniform64
cdb126d061
add support for docker compose v2 (fix #730) (#1140)
* add support for docker compose v2 (fix #730)

Signed-off-by: uniform64 <jiny2048@gmail.com>

* add support for docker compose v2 (fix #730)
some missing places in the previous commit

Signed-off-by: uniform64 <jiny2048@gmail.com>

---------

Signed-off-by: uniform64 <jiny2048@gmail.com>
2023-12-11 08:13:25 +01:00
Tatsuya Sato
07e7ee4ab6
test-network: Update comments to reflect channel profile name changes (#1146)
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2023-12-11 08:08:47 +01:00
Mark S. Lewis
ce6e519fab Use Executor in asset-transfer-events/application-gateway-java
The default ForkJoinPool.commonPool may have limited capacity in some environments, risking deadlock. This implementation also better demonstrates handling of connection errors.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2023-12-04 11:31:07 -05:00
Mark S. Lewis
c0a0104ca1 Fix test-network chaincode-as-a-service deployment
Resolves a regression introduced in e73bb717db.

Previous change defaulted to "auto" as the sequence number but omitted the call to generate the correct sequence number for the "auto" value. This resulted in "auto" being used as the sequence number, which is an error since an integer is required.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2023-11-07 16:12:07 -05:00
Mark S. Lewis
0f4f62c340 Use fabric-gateway v1.4
Also update some GitHub Actions versions.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2023-10-25 17:30:29 +09:00
Chris Elder
e73bb717db Add chaincode utilities
This change is meant to help cover end user functionality
that was previously covered by the blockchain VSCode Plugin.

Functions added:
- cc mode with package, list chaincode, invoke and query functions
- auto sequencing for chaincode deployment
- move variables into config file

Signed-off-by: Chris Elder <celder@Chriss-MacBook-Air.local>
2023-10-10 12:24:23 -04:00
Arne Rutjes
99a1f49da0 add token sdk sample application
Signed-off-by: Arne Rutjes <arne123@gmail.com>
2023-10-10 09:00:23 -04:00
hexnikolas
62f304a98f Update AssetTransfer.java
added missing quotation mark (") in href

Signed-off-by: hexnikolas <114026707+hexnikolas@users.noreply.github.com>
2023-09-29 13:57:48 -04:00
Tatsuya Sato
23dc50c9ae FSAT: Update ansible playbooks for compatibility with K8s v1.25.x
The originally used image of Hyperledger Fabric Ansible Collection was
not compatible with K8s v1.25.x. This patch replaces the image with
the latest hyperledger-labs/fabric-ansible-collection.

Additionally, deprecated notations in the latest Kustomize,
patchesJson and patchesStrategicMerge, have been replaced with the
recommended syntax to prevent ansible task execution failures.

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2023-09-29 13:57:10 -04:00