Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FABCN-396] Add notes on minimum 1.4 module version for node 12 #140

Merged
merged 2 commits into from
May 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ Github is used for code base management, issues should reported in the [FABCN](h

This table shows the summary of the compatibility of the Node modules at versions 1.4 and 2.0, together with the Nodejs runtime they require and the Fabric Peer versions they can communicate with.

| | Peer Connectivity v1.4 | NodeJS 8 | Peer Connectivity v2.0 | NodeJS12 |
| --------------------- | ---------------------- | -------- | ---------------------- | -------- |
| Node modules **v1.4** | Yes | Yes | Yes | Yes |
| Node modules **v2.0** | Yes | No | Yes | Yes |
| | Peer Connectivity v1.4 | NodeJS 8 | Peer Connectivity v2.0 | NodeJS12 |
| ----------------------- | ---------------------- | -------- | ---------------------- | -------- |
| Node modules **v1.4.5** | Yes | Yes | Yes | Yes |
| Node modules **v2.1.x** | Yes | No | Yes | Yes |

By default a Fabric Peer v1.4 will create a Nodejs v8 , and a Fabric Peer v2.0 will create a Nodejs v12 runtime. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_NODE_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_NODE_RUNTIME=example/customNodeRuntime:latest`
By default a Fabric Peer v1.4 will create a Nodejs v8 , and a Fabric Peer v2.0 will create a Nodejs v12 runtime. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_NODE_RUNTIME` on the peer to the name of the docker image.

The Node modules 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 Nodejs 8 fruntime, if a Nodejs 12 runtime was configured, the Node modules at v2.0.0 still function when connecting to the Fabric Peer v1.4.
For example `CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.1` will allow the latest Node 12 runtime to be used within a Peer v1.4.

The Node modules 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 Nodejs 8 runtime, if a Nodejs 12 runtime was configured, the node modules at v2.x still function when connecting to the Fabric Peer v1.4.

Note that the `fabric-contract-api` & `fabric-shim` node modules must be at v1.4.5 or greater to work with Node version 12. If you therefore use a contract originally written to work with Fabric 1.4, check the node modules before deploying on Fabric v2.

## Compatibility

Expand Down