Commit graph

1184 commits

Author SHA1 Message Date
AadithyanRaju
fdb773449d modified script calls
to enable multidestro support

Signed-off-by: AadithyanRaju <aadithyan75@gmail.com>
2025-03-05 11:52:56 +05:30
Mark S. Lewis
aa0c9d3004
Pull Fabric images from GitHub Container Registry (#1307)
By default, Docker images are referenced from Docker Hub. This has now
applied rate limiting that is causing builds to fail. Current Fabric
v2.5 and chaincode container Docker images are also published to GitHub
Container Registry, which does not impose rate limits and will be
located closer to the GitHub Actions runners.

This change:

- Updates to latest Fabric component versions, which are available in
  GHCR. The Fabric install script defaults to GHCR as the Docker
  registry for versions that are available here.
- Pulls and re-tags chaincode container images from GHCR in advance of
  running tests in the build. This avoids them being pulled from Docker
  Hub during test execution.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-02-23 10:53:41 -05:00
Dave Enyeart
8547618f06
Fix intermittent errors with test-network ca (#1305)
If CA server hasn't finished initialization then the initial register and enroll requests will fail.
Instead of waiting 3 seconds, actually check if CA service is ready.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2025-02-21 10:41:13 +00:00
Dave Enyeart
50699a6801
Fix intermittent errors with test-network ca (#1304)
If CA server hasn't finished initialization then the initial
register and enroll requests will fail.
Waiting 3 seconds resolves the issue.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2025-02-20 22:14:35 +00:00
David Enyeart
e1d8779f2a Add connection profile to test-network-nano-bash
Add connection profile to test-network-nano-bash
to enable legacy SDK apps.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2025-02-19 15:21:29 +09:00
Dave Enyeart
839f79343b
Fix test-network-nano-bash orderer4 enrollment (#1302)
Fix test-network-nano-bash orderer4 enrollment.
Also improve error handling and messages in CA interaction.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2025-02-18 19:48:25 +00:00
Tatsuya Sato
63bb2282fe
test-network: Add support for using BFT consensus with CA (#1301)
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-02-18 17:44:43 +00:00
Mark S. Lewis
5e91d365d4 Update to Go 1.23
Go 1.24 was released on 2025-02-11. At this point Go 1.22 become an
unsupported Go runtime.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-02-12 08:34:17 -05:00
Dave Enyeart
0126ca518e
Update CA server bin path in test-network-nano-bash (#1299)
test-network-nano-bash is often used with locally built
fabric and fabric-ca binaries.
As such the intent is to first look for locally
built binaries and then fall back to binaries downloaded
with the samples.
This was correct for fabric binaries but not the fabric-ca binaries.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2025-02-12 11:10:10 +00:00
Tatsuya Sato
b8d462c22a
Bump fabric to v2.5.11 (#1298)
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-02-03 09:52:12 +00:00
Tatsuya Sato
31c8ef0197
test-network-k8s: Add documentation for initial BFT orderer support (#1297)
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-01-30 14:20:18 +00:00
Tatsuya Sato
fcb6e69e0d
CI: Add BFT Orderer support (#1296)
This patch adds BFT Orderer testing to the CI workflows.
The following test environments are updated:
- test-network
- test-network-k8s

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-01-29 09:47:34 +00:00
Tatsuya Sato
714bcb0a9f
test-network-k8s: Introduce initial support for BFT orderers (#1294)
This patch adds initial support for BFT orderers in the test-network-k8s.
When `TEST_NETWORK_ORDERER_TYPE` is set to `bft`, the network launches
four orderers configured with SmartBFT.

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-01-27 10:06:03 +00:00
munapower
859c025e57
Translated into Spanish the Fabric Gateway section and minor corrections (#1292)
Signed-off-by: munapower <mmunaro@hotmail.com>
2025-01-17 15:14:45 +00:00
Tatsuya Sato
f174360f14
Update test-network-k8s to support both v2.5 and v3.0 (#1291)
The existing orderer configuration file is incompatible with v3.0,
and the v3.0 configuration does not work with v2.5.
To support both versions, configuration settings have been updated to
use environment variables instead of referencing static configuration
files.

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-01-16 23:15:00 +00:00
Mark S. Lewis
b50ae22f73
Fix shellcheck linting failure (#1293)
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-01-16 17:26:21 -05:00
munapower
00bd6aa65c Fix issue 1289 with missing parameter in peer chaincode lifecycle command
Signed-off-by: munapower <mmunaro@hotmail.com>
2025-01-10 18:18:26 -05:00
Tatsuya Sato
858e3564a4
Update some old links (#1287)
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2025-01-07 10:59:19 +00:00
Mark S. Lewis
e1a64665db
Update fabric-contract-api-go to v2.2.0 (#1283)
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-12-25 18:06:01 +09:00
leo
898d333efb
docs: Quotation marks are used incorrectly. (#1282)
Signed-off-by: RiceChuan <lc582041246@gmail.com>
2024-12-24 09:52:40 +00:00
Arne Rutjes
5e0e5a1550 make version regex posix compliant so that it works on mac
Signed-off-by: Arne Rutjes <arne123@gmail.com>
2024-12-16 16:06:42 -05:00
Mark S. Lewis
8538e32437
Update Gradle version and shadow plugin (#1278)
The shadow plugin is now maintained by the GradleUp organization. Change
to use the current plugin ID and latest version.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-12-11 08:04:56 -05:00
Andi
b71a4587dc
chore: use errors.New to replace fmt.Errorf with no parameters (#1277)
Also remove repetitive words.

Signed-off-by: ChengenH <hce19970702@gmail.com>
2024-12-10 11:15:02 +00:00
Mark S. Lewis
15ab2e5da8
Fix invoke CLI commands in full-stack guide (#1276)
A behaviour change in microfab means that the orderer endpoint needs to
be explicitly specified when using the peer CLI to submit transactions.
Ideally the microfab environment would not require this but the
documented commands do not currently work without this.

This change updates the full-stack-asset-transfer-guide documentation so
that CLI commands include the orderer endpoint explicitly.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-12-07 15:05:30 -05:00
Mark S. Lewis
b11239aac0
Update fabric-contract-api-go to v2.1.0 (#1275)
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-12-07 08:36:56 -05:00
Mark S. Lewis
1aa3822788 Fix build with new microfab release
The new microfab release seems to start slower than the previous
release. This might be due to a change from solo to raft consensus. This
causes failures in the full-stack-asset-transfer appdev tests. Chaincode
deployment fails since the channel is not yet available.

Instead of increasing the sleep time after launching microfab, this
change attempts to wait however long is required by looking for the
"Microfab started" message in the container log before proceeding.

The test script is also updated to correctly stop the external chaincode
process when the script exits. Previously the process ID of the npm
command used to lauch the chaincode was captured rather than the actual
chaincode process.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-11-27 21:20:37 -05:00
David Enyeart
30b6186440 Update maintainers
Update maintainers to reflect activty from the past year.
- Retire Josh Kneubuhl, Matthew White, Arnaud Le Hors, Nikhil Gupta.
- Add Mark Lewis

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-11-12 09:07:30 -05:00
Tatsuya Sato
dd94aae3d5 Update chaincode container versions in k8s samples
This patch updates chaincode container versions to 2.5 in the following
samples:
- test-network-k8s
- full-stack-asset-transfer-guide

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2024-11-07 17:13:06 -05:00
Mark S. Lewis
8136eb4f5e Update test-network chaincode container versions
The test-network peer configuration specifies $(TWO_DIGIT_VERSION) as
the tag for the Node and Java chaincode containers. For Fabric v3.0,
this requests fabric-nodeenv:3.0 and fabric-javaenv:3.0 Docker images to
host Node and Java chaincode respectively. These images do not exist,
which causes deployment of Node and Java chaincode to fail when using
Fabric v3.0. Fabric v3.0 continues to use fabric-nodeenv:2.5 and
fabric-javaenv:2.5.

This change updates the test-network peer configuration to explicitly
specify `2.5` as the Node and Java chaincode Docker image tags. This is
(currently) the correct version for both Fabric v2.5 and Fabric v3.0.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-11-06 19:38:53 +09:00
Stanislav Jakuschevskij
9b199d4e0b Add private data go application
Created project directory, app.go and connect.go files. Reused the logic for
connect.go from the events application and added second organization setup.

Implemented private data transaction example in go as described in the main
documentation in "Tutorials/Using Private Data in Fabric".

Updated README.md with the command to run the go application and the script
which runs the application in the Github Actions workflow.

Fixed typos and punctuation in the private data typescript application.

Signed-off-by: Stanislav Jakuschevskij <stas@two-giants.com>
2024-10-31 16:30:25 -04:00
Mark S. Lewis
e23bc6714e Simplify Java client error-handling example
The latest fabric-gateway client API release (v1.7.0) includes the gRPC error
details in the GatewayExcetion stack trace so it is not necessary to
programmatically access them to demonstrate that they are present.

This change updates the asset-transfer-basic/application-gateway-java
sample to simplify the updateNonExistentAsset example method. It also:

- Updates all samples to use the latest fabric-gateway release.
- Adds equivalent Maven POM files for fabric-gateway application samples.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-10-24 23:45:04 -04:00
Stanislav Jakuschevskij
51e3a533dc Remove cli from podman compose file
Signed-off-by: Stanislav Jakuschevskij <stas@two-giants.com>
2024-10-22 16:50:08 -04:00
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