Skip to content

Commit aab27a1

Browse files
Update compatibility information
Also fix some out-of-date links in the contributing documentation. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent b640ba3 commit aab27a1

File tree

2 files changed

+31
-59
lines changed

2 files changed

+31
-59
lines changed

COMPATIBILITY.md

Lines changed: 23 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,40 @@
1-
# Support and Compatibility for fabric-chaincode-java
2-
3-
Github is used for code base management, issues should reported in the [FABCJ](https://jira.hyperledger.org/projects/FABCJ/issues/) component in JIRA.
1+
# Support and Compatibility
42

3+
Github is used for code base management and issue tracking.
54

65
## Summary of Compatibility
76

8-
This table shows the summary of the compatibility of the Java libraries, together with the JVM version they require and the Fabric Peer versions they can communicate with.
9-
10-
| | Fabric Peer v1.4 connectivity | Java 8 VM | Fabric Peer v2.2/2.5 Connectivity | Java 11 VM |
11-
| ----------------------- | ----------------------------- | --------- | ----------------------------- | ---------- |
12-
| Java libraries **v1.4** | Yes | Yes | Yes | Yes |
13-
| Java libraries **v2.1** | Yes | No | Yes | Yes |
14-
| Java libraries **v2.4** | Yes | No | Yes | Yes |
15-
| Java libraries **v2.5** | Yes | No | Yes | Yes |
16-
17-
18-
Testing is performed with
19-
- Java v8: OpenJDK
20-
- Java v11: Eclipse Temurin (this has changed from OpenJDK)
21-
22-
23-
By default a Fabric Peer v1.4 will create a Java 8 VM, and a Fabric Peer v2.x will create a Java 11 VM. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_JAVA_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_JAVA_RUNTIME=example/customJavaRuntime:latest`
24-
25-
The Java Libraries will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Java 8 environment, if a Java 11 environment was configured, the Java Libraries at v2.5 still function when connecting to the Fabric Peer v1.4.
26-
27-
## Compatibility
28-
29-
The key elements are:
30-
31-
- the version of the Fabric Contract Java libraries used
32-
- the version of the JVM used to run the code
33-
- When starting a chaincode container to run a Smart Contract the version of the runtime that is used is determined by these factors:
34-
35-
Fabric v1.4.2, and Fabric v2.5.x will, by default, start up docker image to host the chaincode and contracts. The version of the docker image used is defined by the version of Fabric in use.
36-
37-
With Fabric v2.1.0 and later, the chaincode container can be configured to be started by different chaincode builders, and not the Peer. In this case, the environment used is not in the control of Fabric.
7+
This table shows the summary of the compatibility of the Java chaincode libraries, together with the JVM version they require.
388

39-
The Java libraries are produced are `group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim'`
9+
| Java chaincode version | Minimum supported Java | Java runtime | Docker image platforms |
10+
|------------------------|------------------------|--------------|------------------------|
11+
| v1.4 | 8 | 8 | amd64 |
12+
| v2.2 | 11 | 11 | amd64 |
13+
| v2.5.0 - v2.5.4 | 11 | 11 | amd64, arm64 |
14+
| v2.5.5+ | 11 | 21 | amd64, arm64 |
4015

41-
### Supported JVMs
16+
The Java runtime provided by the chaincode Docker image determines the maximum Java version (and features) that smart contract code can exploit when using the default Java chaincode container.
4217

43-
v1.4.x and v2.5.x Java Libraries are supported running in Java 11 with the x86_64 architecture. Later Java 11 versions are supported but are not tested.
18+
Subject to a suitable runtime environment, the Java chaincode libraries can be used to communicate with Fabric peers at different LTS versions. The level of functionality is determined by the Fabric version in use and channel capabilities.
4419

45-
v1.4.x Java Libraries are supported running in Java 8 with the x86_64 architecture. Later Java 8 versions are supported but are not tested.
20+
All Docker images, chaincode libraries and tools are tested using amd64 (x86-64) only.
4621

47-
Architecture Support: all docker images, JVMs, tools are tested under x86_64 ONLY
22+
## Chaincode builder
4823

24+
The default Fabric chaincode builder creates a Docker container to run deployed smart contracts. Java chaincode Docker containers are built using the `hyperledger/fabric-javaenv` Docker image, tagged with the same major and minor version as the Fabric peer version. For example, Fabric v2.5 creates Java chaincode containers using the `hyperledger/fabric-javaenv:2.5` Docker image. Fabric v3 continues to use the v2.5 Java chaincode image.
4925

50-
### Default Peer Runtime selection
26+
A different chaincode Docker image can be specified using the `CORE_CHAINCODE_JAVA_RUNTIME` environment variable on the Fabric peer. For example, `CORE_CHAINCODE_JAVA_RUNTIME=example/customJavaRuntime:latest`.
5127

52-
When using Fabric v2.5, the default docker image that is used to run the Java chaincode is *eclipse-temurin:11.0.21_9-jdk*
28+
With Fabric v2 and later, an alternative chaincode builder can be configured on the Fabric peer. In this case the configured chaincode builder controls how chaincode is launched. See the [Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.5/cc_launcher.html) for further details.
5329

54-
With the default docker image used by Fabric v2.5, if the packaged Java code contains a build script or a wrapper for either Maven or Gradle, it will be built using Gradle 7.0 wrapper, or Maven 3.8.1 wrapper.
30+
## Chaincode packaging
5531

56-
- If both Gradle and Maven files are present Gradle is used.
57-
- Gradle build files can be groovy, or kotlin.
58-
- If the Gradle or Maven wrappers are present, this will used in preference to the installed wrappers.
59-
60-
Remember that when using the wrappers, code will be downloaded from the internet. Keep this in mind for any installation with limited or no internet access.
61-
62-
Alternatively it is recommended to package prebuilt jar files, including the contract and all dependencies, in which case no build or Internet access is required when installing Java chaincode.
32+
When using the `hyperledger/fabric-javaenv` Java chaincode Docker images, deployed chaincode is built as follows:
6333

64-
Please check the [Dockerfile](./fabric-chaincode-docker/Dockerfile) that is used for the environment to see exactly how these versions are installed.
34+
- If both Gradle and Maven files are present, Gradle is used.
35+
- Gradle build files can be either Groovy or Kotlin.
36+
- If Gradle or Maven wrappers are present, they will be used instead of the preinstalled Gradle or Maven versions.
6537

66-
### Supported Runtime communication with the Peer
38+
Remember that when using the wrappers, code will be downloaded from the Internet. Keep this in mind for any installation with limited network access.
6739

68-
Subject to a suitable runtime environment, the 1.4 and 2.5 Java Libraries can used to communicate with Fabric Peers at 2.5 and previous LTS versions. The level of functionality that is implied by the Fabric version in use and channel capabilities.
40+
Alternatively, it is recommended to package prebuilt JAR files, including the smart contract and all dependencies. In this case, no Internet access is required when deploying Java chaincode.

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22

33
We welcome contributions to the [Hyperledger Fabric](https://hyperledger-fabric.readthedocs.io) Project. There's always plenty to do!
44

5-
If you have any questions about the project or how to contribute, you can find us in the [fabric-contracts-api](https://discordapp.com/channels/905194001349627914/943090527920877598) channel on Discord.
5+
If you have any questions about the project or how to contribute, you can find us in the [fabric-contracts-api](https://discordapp.com/channels/905194001349627914/943090527920877598) channel on [Discord](https://discord.lfdecentralizedtrust.org/).
66

77
Here are a few guidelines to help you contribute successfully...
88

99
## Issues
1010

11-
All issues are tracked in the issues tab in github. If you find a bug which we don't already know about, you can help us by creating a new issue describing the problem. Please include as much detail as possible to help us track down the cause.If you want to begin contributing code, looking through our open issues is a good way to start. Try looking for recent issues with detailed descriptions first, or ask us on Discord if you're unsure which issue to choose.
11+
All issues are tracked in the issues tab in GitHub. If you find a bug which we don't already know about, you can help us by creating a new issue describing the problem. Please include as much detail as possible to help us track down the cause.If you want to begin contributing code, looking through our open issues is a good way to start. Try looking for recent issues with detailed descriptions first, or ask us on Discord if you're unsure which issue to choose.
1212

1313
## Enhancements
1414

15-
Make sure you have the support of the Hyperledger Fabric community before investing a lot of effort in project enhancements. Please look up the Fabric RFC process for large changes.
15+
Make sure you have the support of the Hyperledger Fabric community before investing a lot of effort in project enhancements. Please look up the [Fabric RFC](https://github.com/hyperledger/fabric-rfcs) process for large changes.
1616

1717
## Pull Requests
1818

19-
We use our own forks and [Github Flow](https://guides.github.com/introduction/flow/index.html) to deliver changes to the code. Follow these steps to deliver your first pull request:
19+
We use our own forks and [Github Flow](https://docs.github.com/en/get-started/using-github/github-flow) to deliver changes to the code. Follow these steps to deliver your first pull request:
2020

21-
1. [Fork the repository](https://guides.github.com/activities/forking/#fork) and create a new branch from `main`.
21+
1. [Fork the repository](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) and create a new branch from `main`.
2222
2. If you've added code that should be tested, add tests!
2323
3. If you've added any new features or made breaking changes, update the documentation.
2424
4. Ensure all the tests pass.
25-
5. Include the JIRA issue number, a descriptive message, and the [Developer Certificate of Origin (DCO) sign-off](https://github.com/probot/dco#how-it-works) on all commit messages.
26-
6. [Issue a pull request](https://guides.github.com/activities/forking/#making-a-pull-request)!
27-
7. [Azure DevOps](https://dev.azure.com/Hyperledger/Fabric-Chaincode-Java) builds must succeed before the pull request can be reviewed and merged.
25+
5. Include the JIRA issue number, a descriptive message, and the [Developer Certificate of Origin (DCO) sign-off](https://github.com/dcoapp/app#how-it-works) on all commit messages.
26+
6. [Issue a pull request](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project#making-a-pull-request)!
27+
7. [GitHub Actions](https://github.com/hyperledger/fabric-chaincode-java/actions) builds must succeed before the pull request can be reviewed and merged.
2828

2929
## Coding Style
3030

0 commit comments

Comments
 (0)