diff --git a/.github/settings.yml b/.github/settings.yml index 4fb3b414..655bc544 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -2,7 +2,7 @@ repository: name: fabric-sdk-java description: null homepage: https://wiki.hyperledger.org/display/fabric - default_branch: master + default_branch: main has_downloads: true has_issues: false has_projects: false diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3d8e0fdc..45c78fb7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,7 @@ name: Pull request on: pull_request: branches: - - release-2.2 + - main concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c9065ac8..cf4de8e6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,8 +3,30 @@ name: Push on: push: branches: - - release-2.2 + - main jobs: build: uses: ./.github/workflows/test.yml + + publish: + needs: build + name: Publish Java artifact to GitHub Packages + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + cache: maven + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + run: ${{ github.workspace }}/.github/scripts/maven_publish_snapshot.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b603034f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + publish-github: + name: Publish Java artifact to GitHub Packages + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + cache: maven + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh github + + publish-ossrh: + name: Publish Java artifact to Maven Central + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + cache: maven + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh ossrh diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 00000000..a1f1bb10 --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,9 @@ +name: Scheduled build + +on: + schedule: + - cron: "5 0 * * *" + +jobs: + main: + uses: ./.github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 804dd629..cd7b5a8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ env: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index a453d6e4..4605d49b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Changelog + +Notable changes in each release are documented on the project's [GitHub releases](https://github.com/hyperledger/fabric-sdk-java/releases) page. Historic changelog is retained below for reference. + ## v2.2.19 Tue 29 Nov 2022 15:34:43 GMT diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6432cb62..243174e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,10 +9,10 @@ docs to learn how to make contributions to this exciting project. ## Code of Conduct Guidelines -See our [Code of Conduct Guidelines](../blob/master/CODE_OF_CONDUCT.md). +See our [Code of Conduct Guidelines](../blob/main/CODE_OF_CONDUCT.md). ## Maintainers -Should you have any questions or concerns, please reach out to one of the project's [Maintainers](../blob/master/MAINTAINERS.md). +Should you have any questions or concerns, please reach out to one of the project's [Maintainers](../blob/main/MAINTAINERS.md). Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 4226fe69..295beacf 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -7,16 +7,16 @@ Maintainers |------|--------|------|---------------------- | Andrew Coleman | [andrew-coleman][andrew-coleman] | andrew-coleman | andrew_coleman@uk.ibm.com | | Mark Lewis | [bestbeforetoday][bestbeforetoday] | bestbeforetoday | Mark.S.Lewis@outlook.com | -| Gari Singh | [mastersingh24][mastersingh24] | mastersingh24 | **Retired Maintainers** | Name | GitHub | email | |---|---|---| -| Rick Rineholt | cr22rc | cr22rc@gmail.com | +| Gari Singh | [mastersingh24][mastersingh24] | mastersingh24 | | | Jim Zhang | jimthematrix | jim_the_matrix@hotmail.com | | Muhammad Altaf | malik-altaf | muhammada@fast.au.fujitsu.com | | Pardha Vishnumolakala| psaradhi | psaradhi@gmail.com | +| Rick Rineholt | cr22rc | cr22rc@gmail.com | | Satheesh Kathamuthu | xspeedcruiser | satheesh.ceg@gmail.com | Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/README.md b/README.md index 31a8ed03..936eb133 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -# Hyperledger Fabric SDK for Java +# Hyperledger Fabric SDK for Java Build status + +> **Note:** This API is deprecated. When developing applications for Hyperledger Fabric v2.4 and later, you should use the [Fabric Gateway client API](https://hyperledger.github.io/fabric-gateway/). When developing applications for earlier Fabric versions, you are strongly encouraged to use the high-level API detailed below. + This project provides a low-level API for interacting with Hyperledger Fabric blockchain networks, and is used by the high-level **Hyperledger Fabric Gateway SDK for Java**: - Documentation: https://hyperledger.github.io/fabric-gateway-java/ - GitHub repository: https://github.com/hyperledger/fabric-gateway-java/ - -For building Hyperledger Fabric blockchain client applications, you are strongly encouraged to use the high level API. The information below is intended for contributors to this repository. @@ -104,22 +105,10 @@ You may also need to on your v2.1 Fabric ## Known limitations and restrictions -* TCerts are not supported: JIRA FAB-1401 +* TCerts are not supported: [JIRA FAB-1401](https://jira.hyperledger.org/browse/FAB-1401) --- -## v2.1 builds of Fabric and Fabric-ca needed for the integration test - -To get a functioning Fabric v2.1 network needed by the SDK Integration tests. -In the directory `src/test/fixture/sdkintegration` issue : - -`./fabric.sh restart` - -This command needs to be rerun each time the Integration tests are run. - -### Setting Up Eclipse -To get started using the Fabric Java SDK with Eclipse, refer to the instructions at: ./docs/EclipseSetup.md - ## SDK dependencies SDK depends on few third party libraries that must be included in your classpath when using the JAR file. To get a list of dependencies, refer to pom.xml file or run mvn dependency:tree or mvn dependency:list. @@ -135,6 +124,10 @@ To run the integration tests Fabric and Fabric CA is needed which require ## Using the SDK +### Setting Up Eclipse + +If you want to get started using the Fabric Java SDK with Eclipse, refer to the instructions at: ./docs/EclipseSetup.md + ### Compiling Once your JAVA_HOME points to your installation of JDK 1.8 (or above) and JAVA_HOME/bin and Apache maven are in your PATH, issue the following command to build the jar file: @@ -154,9 +147,12 @@ To run the unit tests, please use mvn install which will run the un **[INFO] BUILD SUCCESS** **_At the end is usually a very reliable indication that all tests have passed successfully!_** ### Running the integration tests -You must be running local instances of Fabric-ca, Fabric peers, and Fabric orderers to be able to run the integration tests. See above for for how to get a Fabric network running. -Use this `maven` command to run the integration tests: - * _mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc_ + +The script below both sets up the test environment and runs the tests. + +```sh +./scripts/run-integration-tests.sh +``` ### End to end test scenario @@ -300,7 +296,7 @@ Go lang chaincode dependencies must be contained in vendor folder. ### Where can I find the Javadoc? -Look in the [Maven repository](http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/) +Look in the [Maven repository](https://search.maven.org/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java) for the release in question there should be a file fabric-sdk-java-_<release>_-javadoc.jar For SNAPSHOT builds look in [Sonatype repository](https://oss.sonatype.org/content/repositories/snapshots/org/hyperledger/fabric-sdk-java/fabric-sdk-java/) @@ -321,7 +317,7 @@ can be on all requests overridden by setting the user context on that specific r ### Idemix users or Idemix test cases (IdemixIdentitiesTest) just seems to hang or take forever. Most likely this is running on a virtual machine that does not have sufficient entropy. -Google for adding entropy on virtual machines or look at [virtual machines entropy](http://giovannitorres.me/increasing-entropy-on-virtual-machines.html) +Google for adding entropy on virtual machines or look at [virtual machines entropy](https://web.archive.org/web/20191202062101/http://giovannitorres.me/increasing-entropy-on-virtual-machines.html) If linux try installing rng-tools package as this suggests. ### Firewalls, load balancers, network proxies @@ -411,7 +407,16 @@ CORE_LOGGING_LEVEL=DEBUG Fabric CA by starting command have the -d parameter. -Upload full logs to the JIRA not just where the issue occurred if possible +Upload full logs to JIRA, not just where the issue occurred if possible + +### Tracing + +The SDK is set up to trace all gRPC communications: +* All outgoing messages bear trace metadata, allowing correlation with peers. +* Each request/response is computed as a span. +* If you use OpenTelemetry in your program, the gRPC span will correlate using the thread local context to the parent context. + +The SDK accepts all environment variables as described in the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md). ### Tracing diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 00000000..b9c1183b --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,25 @@ +# Releasing + +The following artifacts are created as a result of releasing the Hyperledger Fabric SDK for Java: + +- [fabric-sdk-java](https://central.sonatype.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java/2.2.0/versions) + +## Before releasing + +The following tasks are required before releasing: + +- Check that the last merge or scheduled build for the release branch passed successfully. + +## Create release + +Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-sdk-java/releases) will trigger the build to publish the new release. + +When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `vX.Y.Z` + +See previous releases for examples of the title and description. + +## After releasing + +The following tasks are required after releasing: + +- Update the `version` element in [pom.xml](pom.xml) to the next point release. diff --git a/docs/java_sdk_release.md b/docs/java_sdk_release.md deleted file mode 100644 index c3ccd6bf..00000000 --- a/docs/java_sdk_release.md +++ /dev/null @@ -1,152 +0,0 @@ -# Java SDK Release Process Document: - -Below are the steps explains how to publish Hyperledger Fabric sdk-java jar file to OSSRH -(Open Source Software Repository Hosting) and then to Maven central. -Sonatype OSSRH uses Sonatype Nexus Repository Manager to provide repository hosting service for -Open source projects like Hyperledger Fabric. - -OSSRH uses the Maven repository format and allow you to - -1) deploy development version (snapshots) -2) stage release binaries -3) promote release and sync them to Maven central repository - -Before you deploy developement version or stable release, you have to follow below steps -to continue further - -1) Create JIRA account (https://issues.sonatype.org/secure/Signup!default.jspa) -2) Create a new Project -See this example for reference -https://issues.sonatype.org/browse/OSSRH-30331 - -Make sure your requested project is created and JIRA ticket is marked a Resolved. - -Add below lines in **pom.xml** - -``` - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - -``` - -``` - - ossrh - https://oss.sonatype.org/ - false - -``` - -Add below lines in **settings.xml** - -``` - - - - ossrh - ${env.OSSRH_USER_TOKEN} - ${env.OSSRH_PWD_TOKEN} - - - - - ossrh - - true - - - ${env.GPG_KEY} - ${env.GPG_PWD} - - - - -``` -Please make sure **settings.xml** is copied in maven home path. -Verify **settings.xml** in `cd ~/.m2/`. Follow below steps to publish java jar artifacts to -nexus/maven repository using Maven approach. - -### Step 1: Export Environment Variables - -Make sure values are passed to the environment variables placed in settings.xml file - -``` -export OSSRH_USER_TOKEN=ossrh ID -export OSSRH_PWD_TOKEN=ossrh pwd -``` -### Step 2: Generate gpg keys. - -Follow below link to generate gpg keys http://central.sonatype.org/pages/working-with-pgp-signatures.html - -Follow below steps to generate gpg keys: - -- Execute below command to generate gpg key to sign artifacts - - `gpg --gen-key` Stick to the defaulut values like - - Key type should be RSA & RSA (default) - - Key Size should be 2048 (default) - - Key valid for 0 (defaulut) - - Confirm above section - (y) - - Provide Real Name (ossrh userid) - - Provide email address (associated to the ossrh userid) - - Provide comment ( Any of your choice) - - Confirm the selection (Type O for Okay) - - Enter Passphrase (remember this) and re-enter Passphrase - -After provide the correct information above, it generates gpg keys. -If the process taking time to generate gpg key, perform some other actions like accessing keyboard, -mouse and accessing disk usage to fasten the process. - -- List out generated gpg keys - `gpg2 --list-keys` -ex: -``` -/home/juven/.gnupg/pubring.gpg ------------------------------- -pub 1024D/E8EBD57A 2017-06-17 -uid Juven Xu (Juven Xu works at Sonatype) -sub 2048g/D704745C 2017-06-17 -``` - -- Distribute public key - -Run below command to distribute public key - -`gpg2 --keyserver hkp://pool.sks-keyservers.net --send-keys E8EBD57A` - -``` -export GPG_KEY= (E8EBD57A) -export GPG_PWD= -``` -### Step 3: Deploy Artifact - -Execute below command from fabric-sdk-java directory to build and publish java jar artifact to -maven repository - -``` -mvn clean install deploy -P release -s settings.xml -DskipITs=false -Dmaven.test.failure.ignore=false -``` - -Once the command is successfully execute, you will see fabric-sdk-java artifacts in maven central -repository https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java -and snapshot java artifacts in nexus repository -https://oss.sonatype.org/content/repositories/snapshots/org/hyperledger/fabric-sdk-java/fabric-sdk-java/ - -### Step 4: Perform Release to Maven - -Promote release build from sonatype nexus the artifact is successfully pushed to -https://oss.sonatype.org/#stagingProfiles. Wait for sometime to syncup this release in maven central -repository. If everything goes fine, published artifact should be available in maven central repository. - -https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java - -# Test Java SDK jar file using sample APP - -[TODO] - -## License - -Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/docs/release_v2.0.0_notes.md b/docs/release_v2.0.0_notes.md index 32f57959..836e1b5f 100644 --- a/docs/release_v2.0.0_notes.md +++ b/docs/release_v2.0.0_notes.md @@ -8,7 +8,7 @@ v2.0 capabilities are enabled the deprecated pre v2.0 APIs ( [InstallProposalReq [UpgradeProposalRequest](https://github.com/hyperledger/fabric-sdk-java/blob/df422e10fa38bf8a627dd81e7ad038404d625576/src/main/java/org/hyperledger/fabric/sdk/UpgradeProposalRequest.java) ) can no longer be used to manage any chaincode using that channel. The v2.0 Lifecycle can require organizations to endorse (consent) to new chaincode being run on the channel. The default is to require a majority of organizations on the channel - to endorse chaincode before it can be run. For more details on Lifecycle chaincode management see [Fabric read the docs: Chaincode for Operators](https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html) + to endorse chaincode before it can be run. For more details on Lifecycle chaincode management see the [Fabric chaincode lifecycle](https://hyperledger-fabric.readthedocs.io/en/release-2.0/chaincode_lifecycle.html) The [End2endLifecycleIT.java](https://github.com/hyperledger/fabric-sdk-java/blob/df422e10fa38bf8a627dd81e7ad038404d625576/src/test/java/org/hyperledger/fabric/sdkintegration/End2endLifecycleIT.java) integration test tests and demonstrates these APIs between two organizations. diff --git a/pom.xml b/pom.xml index cb03137f..1155bbef 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.hyperledger.fabric-sdk-java fabric-sdk-java jar - 2.2.21-SNAPSHOT + 2.2.22-SNAPSHOT fabric-java-sdk Java SDK for Hyperledger Fabric https://www.hyperledger.org/community/projects @@ -665,7 +665,6 @@ owasp - diff --git a/release_notes/v1.0.0-beta.md b/release_notes/v1.0.0-beta.md index 26f66b2d..27353d05 100644 --- a/release_notes/v1.0.0-beta.md +++ b/release_notes/v1.0.0-beta.md @@ -13,7 +13,7 @@ none ## Known Issues & Workarounds -## [Change Log](https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v100-beta) +## [Change Log](https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v100-beta) ## License diff --git a/release_notes/v1.0.0-rc1.txt b/release_notes/v1.0.0-rc1.txt index 4b4a9280..7fdca475 100644 --- a/release_notes/v1.0.0-rc1.txt +++ b/release_notes/v1.0.0-rc1.txt @@ -20,4 +20,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v100-rc1 +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v100-rc1 diff --git a/release_notes/v1.0.0.txt b/release_notes/v1.0.0.txt index 07ec5bfa..627721b8 100644 --- a/release_notes/v1.0.0.txt +++ b/release_notes/v1.0.0.txt @@ -20,4 +20,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v1.0.0 \ No newline at end of file +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v1.0.0 \ No newline at end of file diff --git a/release_notes/v1.0.1.txt b/release_notes/v1.0.1.txt index ce3b4680..9f09b2c7 100644 --- a/release_notes/v1.0.1.txt +++ b/release_notes/v1.0.1.txt @@ -20,4 +20,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v1.0.1 \ No newline at end of file +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v1.0.1 \ No newline at end of file diff --git a/release_notes/v2.0.0.txt b/release_notes/v2.0.0.txt index dbbb33c0..959243ff 100644 --- a/release_notes/v2.0.0.txt +++ b/release_notes/v2.0.0.txt @@ -21,4 +21,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v2.0.0 \ No newline at end of file +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v2.0.0 \ No newline at end of file diff --git a/release_notes/v2.1.0.txt b/release_notes/v2.1.0.txt index 4a2cfc40..40566d81 100644 --- a/release_notes/v2.1.0.txt +++ b/release_notes/v2.1.0.txt @@ -23,4 +23,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v2.1.0 \ No newline at end of file +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v2.1.0 \ No newline at end of file diff --git a/release_notes/v2.2.0.txt b/release_notes/v2.2.0.txt index 8885dda5..598514e4 100644 --- a/release_notes/v2.2.0.txt +++ b/release_notes/v2.2.0.txt @@ -11,7 +11,7 @@ previous v2.x releases. Refer to the change log for a full list of updates. Please see the Fabric LTS release strategy document for more information on LTS releases: -https://github.com/hyperledger/fabric-rfcs/blob/master/text/0005-lts-release-strategy.md +https://github.com/hyperledger/fabric-rfcs/blob/main/text/0005-lts-release-strategy.md Known Vulnerabilities --------------------- @@ -27,4 +27,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-sdk-java/blob/master/CHANGELOG.md#v2.2.0 +https://github.com/hyperledger/fabric-sdk-java/blob/main/CHANGELOG.md#v2.2.0 diff --git a/scripts/pull-fabric-images.sh b/scripts/pull-fabric-images.sh index d91db05c..421d9d1c 100755 --- a/scripts/pull-fabric-images.sh +++ b/scripts/pull-fabric-images.sh @@ -1,16 +1,14 @@ #!/bin/bash -e set -euo pipefail -# FABRIC_VERSION is set overridden by CI pipeline -VERSION=${FABRIC_VERSION:-2.2} -STABLE_TAG=amd64-${VERSION}-stable +# FABRIC_VERSION is overridden by CI pipeline +FABRIC_VERSION=${FABRIC_VERSION:-2.2} +CA_VERSION=${CA_VERSION:-1.4} for image in peer orderer tools ccenv baseos javaenv nodeenv; do - docker pull -q hyperledger-fabric.jfrog.io/fabric-${image}:${STABLE_TAG} - docker tag hyperledger-fabric.jfrog.io/fabric-${image}:${STABLE_TAG} hyperledger/fabric-${image} - docker rmi -f hyperledger-fabric.jfrog.io/fabric-${image}:${STABLE_TAG} >/dev/null + docker pull -q "hyperledger/fabric-${image}:${FABRIC_VERSION}" + docker tag "hyperledger/fabric-${image}:${FABRIC_VERSION}" "hyperledger/fabric-${image}" done -docker pull -q hyperledger/fabric-ca:1.4 -docker tag hyperledger/fabric-ca:1.4 hyperledger/fabric-ca -docker rmi -f hyperledger/fabric-ca:1.4 >/dev/null +docker pull -q "hyperledger/fabric-ca:${CA_VERSION}" +docker tag "hyperledger/fabric-ca:${CA_VERSION}" hyperledger/fabric-ca diff --git a/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java b/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java index e1f6b8fa..af73fb89 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java +++ b/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java @@ -31,7 +31,7 @@ File getChaincodeMetaInfLocation() { * Only applies if source location {@link #chaincodeSourceLocation} for the chaincode is set. * * @param chaincodeMetaInfLocation The directory where the "META-INF" directory is located.. - * @see + * @see * Fabric Read the docs couchdb as a state database * */ diff --git a/src/main/java/org/hyperledger/fabric/sdk/Peer.java b/src/main/java/org/hyperledger/fabric/sdk/Peer.java index 9ba0666e..a83e4f7a 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/Peer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/Peer.java @@ -594,12 +594,12 @@ public enum PeerRole { */ LEDGER_QUERY("ledgerQuery"), /** - * Peer will monitor block events for the channel it belongs to. + * Event Source is used to set peer to eventing. */ EVENT_SOURCE("eventSource"), /** - * Peer will monitor block events for the channel it belongs to. + * Service Discovery will be used to discover other peers, orderers. */ SERVICE_DISCOVERY("serviceDiscovery"); diff --git a/src/test/fixture/sdkintegration/javacc/2.1/sample1/build.gradle b/src/test/fixture/sdkintegration/javacc/2.1/sample1/build.gradle index c2a6dcba..8ccc9c58 100644 --- a/src/test/fixture/sdkintegration/javacc/2.1/sample1/build.gradle +++ b/src/test/fixture/sdkintegration/javacc/2.1/sample1/build.gradle @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.2.+' + implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.+' implementation 'commons-logging:commons-logging:1.2' } diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java index 69676e14..df11b83f 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java @@ -339,7 +339,7 @@ void runChannel(HFClient client, Channel channel, SampleOrg sampleOrg, final int * The following is using Fabric v1.0 APIs for testing and demoing backward compatibility. * After v2.0 Fabric release unless there is a need for this in your application it is highly * encouraged to move to Fabric v2.0 capabilities and use the new v2.0 Lifecycle APIs for managing chaincode. - * @see + * @see * **/ ///////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java index fe98caef..4eb998a4 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java @@ -385,7 +385,7 @@ class ChaincodeEventCapture { //A test class to capture chaincode events * The following is using Fabric v1.0 APIs for testing and demoing backward compatibility. * After v2.0 Fabric release unless there is a need for this in your application it is highly * encouraged to move to Fabric v2.0 capabilities and use the new v2.0 Lifecycle APIs for managing chaincode. - * @see + * @see * */ ///////////////////////////////////////////////////////////////////////////////////////////////// @@ -423,7 +423,7 @@ class ChaincodeEventCapture { //A test class to capture chaincode events if (testConfig.isFabricVersionAtOrAfter("1.1")) { // Fabric 1.1 added support for META-INF in the chaincode image. - //This sets an index on the variable a in the chaincode // see http://hyperledger-fabric.readthedocs.io/en/master/couchdb_as_state_database.html#using-couchdb-from-chaincode + //This sets an index on the variable a in the chaincode // see http://hyperledger-fabric.readthedocs.io/en/main/couchdb_as_state_database.html#using-couchdb-from-chaincode // The file IndexA.json as part of the META-INF will be packaged with the source to create the index. installProposalRequest.setChaincodeMetaInfLocation(new File("src/test/fixture/meta-infs/end2endit")); } diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java b/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java index e7443509..d5347e42 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java @@ -69,7 +69,7 @@ /** * Update channel scenario - * See http://hyperledger-fabric.readthedocs.io/en/master/configtxlator.html + * See http://hyperledger-fabric.readthedocs.io/en/main/configtxlator.html * for details. */