Commit graph

69 commits

Author SHA1 Message Date
Aadithyan Raju
480ef2e40a
removed sed command utils.sh
Signed-off-by: Aadithyan Raju <93834376+AadithyanRaju@users.noreply.github.com>
2025-03-24 17:29:59 +05:30
Aadithyan Raju
325b056e9d modified script calls
to enable multidestro support

Signed-off-by: Aadithyan Raju <93834376+AadithyanRaju@users.noreply.github.com>
2025-03-23 08:51:34 +00:00
AadithyanRaju
fdb773449d modified script calls
to enable multidestro support

Signed-off-by: AadithyanRaju <aadithyan75@gmail.com>
2025-03-05 11:52:56 +05:30
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
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
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
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
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
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
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
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
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
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
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
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
98f748155b add a retry to the test-network ccaas chaincode init command
Without this, the init command fails if the chaincode container is not ready.

Signed-off-by: Arne Rutjes <arne123@gmail.com>
2023-09-27 08:14:33 -06:00
Aditya Joshi
9441772423 updated help message for CFSSL
Signed-off-by: Aditya Joshi <adityaprakashjoshi1@gmail.com>
2023-09-27 08:08:20 -06:00
Tatsuya Sato
7d5aaf11e2
Improve BFT sample on test-network (#1083)
This patch includes:
- Fixed a minor bug in the parsing of the BFT flag
- Added check for when a user attempts to use BFT orderer in
  Fabric network with CA
- Update of printHelp for use of the BFT flag
- Fixed explanations

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
2023-08-28 15:38:14 +02:00
arkadipiven
eb16caf3d5 Fix test-network to work with BFT consensus.
Added a new option for creating channel:
Running ./network.sh createChannel -bft will initiate a channel running BFT orderers.
Using ./network.sh up -bft will initiate dockers for bft environment.
Added option for 4 orderers.

Add add_new_orderer_to_config.py which is referenced in the fabric official docs.

Signed-off-by: Arkadi Piven <arkadi.piven@ibm.com>
Signed-off-by: arkadipiven <arkadi7770@gmail.com>
2023-08-22 10:54:41 -04:00
Parameswaran Selvam
f838d6b5a8
added a check for prereq into deploycc script (#884)
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>

Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
2022-12-14 09:31:10 +01:00
James Taylor
4eff55b75b
Fix test network chaincode deploy (#827)
Correctly check for installed chaincode and enable the same chaincode to be deployed on different channels

Signed-off-by: James Taylor <jamest@uk.ibm.com>

Signed-off-by: James Taylor <jamest@uk.ibm.com>
2022-09-09 12:33:27 +01:00
Arnaud J Le Hors
bfe8f6e04d Update podman support information
This change updates the test-network README with up-to-date information
about using podman on Mac and improves support for podman in deployCCAAS.sh

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2022-08-03 12:06:39 -04:00
D
17d5b96493 fix error message in deployCC
Signed-off-by: D <d_kelsey@uk.ibm.com>
2022-05-13 06:28:31 -04:00
Matthew B White
ecbf3f5db1
Support for using podman with the test-network (#596)
* Experimental Support for using podman with the test-network

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

* supplement podman with nerdctl

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* adds experimental support for nerdctl compose

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* install fabric images to containerd with 'nerdctl' pull

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Podman Support

Use a core set of compose files, with overlays for specific details.
In the case of podman, the overlays refer to a specific core.yaml for the peer that distables the use of teh
docker daemon

In the case of docker, the overlays add enable the docker daemon accesss for the peer to create chaincode
containers

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

Co-authored-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2022-02-08 06:41:56 -05:00
Dave Enyeart
9e9b8d3138
Update test-network to use org level ca-cert.pem (#609)
Although test network scripts functionally worked, they demonstrated
some strange patterns around use of the ca cert.

This change makes it clear that the ca cert is configured and used
at the org level, and not related to any individual peer or orderer node.
Also that when connecting to individual servers, clients can pass the
org level CA cert as the root of trust when establishing TLS connections.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2022-02-02 09:03:20 +00:00
Matthew B White
e07a9ff86b
Adding examples of CCAAS and support into the test-network-k8s (#527)
* Changes to the test-network k8s deployment to use the
built-in as-a-service chaincode builder from the Peer Container

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

* Remove the ccaas init container from org2 peer; tweak docs on ccaas config

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

Co-authored-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2021-12-17 14:09:03 +00:00
Matthew B White
96623f1bd5
Adding examples of CCAAS and support into the test-network (#560)
- Updated the test-network with examples of runnig CCAAS
- Updating the asset transfer basic with how to run chaincode as a service.

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2021-12-17 13:18:22 +00:00
sapthasurendran
9df7e9f86d
Configtxlator script changes (#552)
Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
2021-12-09 11:37:38 +00:00
QQ喵
42c456ffda
Clean install folder for Java (#475)
Signed-off-by: gqqnbig <gqqnb2005@gmail.com>

Co-authored-by: Matthew B White <mbwhite@users.noreply.github.com>
2021-09-03 07:54:36 +00:00
Brett Logan
c30ceaa675 Remove Image Tag Override
The `-i` flag was originally added to support an
upgrade sample. Since that sample is no longer available
remove the `-i` flag to clean up the network.sh options
and avoid confusion as it's possible now to specify
an image version that is no longer backwards compatible
with the new test-network with osnadmin.

Signed-off-by: Brett Logan <lindluni@github.com>
2021-02-11 18:20:43 -05:00
Julian Castrence
51f76977b0 Rename --channel-id to --channelID in osadmin
Signed-off-by: Julian Castrence <juliancastrence@ibm.com>
2021-02-03 13:33:19 -05:00
Waleed Mortaja
14dc7e1316
Fix creating channel when ${PWD} contains space. (#402)
* Fix creating channel when ${PWD} contains space.

If the path of the project contains spaces, the "test-network/scripts/envVar.sh" script sets the value of "$ORDERER_CA" to a value containg "${PWD}" which, in turn, contains space(s).

When the variable used in "test-network/scripts/createChannel.sh", The first part of the value (before the first space) is handled as the whole value for "--cafile". Other parts are considered to be part of the command!

I tried putting (escaped) quotes in the "test-network/scripts/envVar.sh" definition for the variable "$ORDERER_CA" to make the fix more general, but the quotation marks were sometime interpreted to be part of the path that consisted of concatenated parts somewhere and it did not work.

While this edit will fix this issue, I belive this is just a work around. I expect that there is a better way to solve the root cause of the problem instead of just fixing it in one place. Moreover, All variables/paths that may include spaces should be properly handled as well.

Thanks

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* Double quote variables evaluations that depends on $PWD

I tried to handle most (if not all) of the variables evaluations in the project that depends on $PWD by wrapping them in double-quotations to avoid values that contains white spaces.

Some lines I was not sure if they are Okay or not but I left them as they are. Samples (not all lines) as follows:
- commercial-paper/network-clean.sh:15:DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- commercial-paper/network-starter.sh:15:DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- asset-transfer-basic/chaincode-javascript/node_modules/fabric-shim/coverage/fabric-shim/lib/chaincode.js.html:997: optsCpy.pem = fs.readFileSync(process.env.CORE_PEER_TLS_ROOTCERT_FILE).toString();
- commercial-paper/organization/digibank/digibank.sh:29:export PEER_PARMS="${PEER_CONN_PARMS##*( )}"

The next sample I was not really sure, but still edited it:
- test-network/addOrg3/fabric-ca/registerEnroll.sh:68:  cp ${PWD}/../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/tlscacerts/* ${PWD}/../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt

I deliberately ignored some lines because I think they are not problem. These lines include:
- `export` sentences
- assignment sentences like: test-network/scripts/createChannel.sh:48:  FABRIC_CFG_PATH=$PWD/../config/
- gradlew files: the line SAVED="`pwd`"
- gradlew files: the line APP_HOME="`pwd -P`"
- gradlew files: the line CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* remove unnecessary leading space trimming

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* resolved conflict with master

Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
2021-01-20 16:32:38 +01:00
Julian Castrence
aa7287e1e3 Update Test Network to Use osadmin
FAB-18369

Signed-off-by: Julian Castrence <juliancastrence@ibm.com>
2021-01-19 20:55:19 -05:00
Will Lahti
b690d8f30f
Stop using deprecated outputAnchorPeersUpdate in test-network (#394)
* Stop using deprecated outputAnchorPeersUpdate in test-network

FAB-18381

Signed-off-by: Will Lahti <wtlahti@us.ibm.com>

* Improve consistency of test-network output

Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2021-01-07 13:22:03 -05:00
Julian Castrence
27ac653c74
Completely Remove Short Name Support (#390)
Signed-off-by: Julian Castrence <juliancastrence@ibm.com>

Co-authored-by: Julian Castrence <juliancastrence@ibm.com>
2020-12-22 18:10:58 -05:00
The Coder X Tea
541cebe154
correct typing (#391)
Signed-off-by: tuyendev <tuyendev@gmail.com>
2020-12-11 08:44:57 -05:00
Arnaud J Le Hors
613d269f15
Fix test-network chaincode packaging log (#383)
The chaincode packaging function wrongly implies that the packaging
operation is performed on a peer when it is in fact done locally.
This change fixes that.

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-12-01 08:30:46 -05:00
harrisob
9f245809bb
Add Asset-Transfer-Events (#325)
Add new chaincode and javascript application to demostrate
the use of chaincode events and block events with private data.

Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2020-11-04 15:13:08 +01:00
NIKHIL E GUPTA
327e3a78aa Remove restart mode and add mode specific help text
Signed-off-by: NIKHIL E GUPTA <ngupta@symbridge.com>
2020-10-07 03:03:00 -04:00
Naser Mirzaei
eb88315107
add utils.sh and colorize messages (#310)
* add utils.sh and colorize messages

Signed-off-by: Naser Mirzaei <nasermirzaei89@gmail.com>

* rename utils to scriptUtils

Signed-off-by: Naser Mirzaei <nasermirzaei89@gmail.com>
2020-08-27 16:43:19 -04:00
Naser Mirzaei
be3ce853dc hide set +x from output
Signed-off-by: Naser Mirzaei <nasermirzaei89@gmail.com>
2020-08-21 13:03:30 -04:00
NIKHIL E GUPTA
026217db9a Add sbe to help text
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-08-10 09:20:35 -04:00
Gaurav Giri
02368e99b0 SBE Improvements and Referencing SBE in fabric-samples readme and test-network
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-09 14:58:18 -04:00
tyanj
55c0b47952
[BUG] res=$? missing (#260)
Signed-off-by: tyanj <653291675@qq.com>
Signed-off-by: Ry Jones <ry@linux.com>

Co-authored-by: Ry Jones <ry@linux.com>
2020-08-07 20:22:24 +02:00
Titas
0031db5de2
Fix deployment of chaincode with higher version than 9 issue (#243)
This script fails if chaincode version is higher than 9 as 'grep' does not match ex. version equal to '10'

Signed-off-by: Titas <titas.petravicius@gmail.com>
Signed-off-by: lehors <lehors@us.ibm.com>

Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-08-06 22:59:25 +02:00
NIKHIL E GUPTA
d72be92feb private data readme edits
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-27 23:37:41 -04:00
nikhil550
971af50cdf
Fix bugs in deployCC script (#265)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-23 23:36:33 -04:00
Arnaud J Le Hors
7771b4f216
Revert "Remove Typescript References (#258)" (#261)
This reverts commit 7a23d7872a.
2020-07-23 17:06:57 +02:00