Commit graph

1173 commits

Author SHA1 Message Date
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
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