You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Code remains compatible with Node 18.
- Project continues to be built and tested with Node 18.
- Node 20 is used as the runtime for the nodeenv Docker image to allow chaincode access to latest Node features and security fixes.
Signed-off-by: Mark S. Lewis <[email protected]>
Copy file name to clipboardExpand all lines: COMPATIBILITY.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,18 @@ Github is used for code base management, issues should reported in the repositor
6
6
7
7
This table shows the summary of the compatibility of the Node modules at versions 1.4 and 2.x, together with the Node.js runtime they require and the Fabric Peer versions they can communicate with.
Whilst these are defaults based on the corresponding `fabric-nodeenv` Docker image version, 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 desired Docker image and version.
16
19
17
-
* Fabric peer v1.4 will create a Node.js v8 runtime
18
-
* Fabric peer v2.2/2.3 will create a Node.js 12 runtime
19
-
* Fabric peer v2.4 will create a Node.js 16 runtime
20
-
* Fabric peer v2.5 will create a Node.js 18 runtime
21
-
22
-
Whilst these are defaults based on the corresponding `fabric-nodeenv` docker image version, 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 desired docker image and version.
23
-
24
-
For example `CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.2` will allow the use of the latest Node 12 runtime to be used within a Peer v1.4.
20
+
For example `CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.2` will allow the use of a Node 12 runtime to be used within a Peer v1.4.
25
21
26
22
The Node chaincode 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 Node.js 8 runtime, if a Node.js 12 runtime was configured, the node chaincode modules at v2.x still function when connecting to the Fabric Peer v1.4.
27
23
@@ -39,7 +35,7 @@ The key elements are :
39
35
- the version of the Node.js runtime used to run the code
40
36
- When starting a chaincode container to run a Smart Contract, the version of the runtime that is used is determined by these factors:
41
37
42
-
Fabric v1.4.x, and Fabric v2.x will, by default, start up a docker container based on `fabric-nodeenv` to host the chaincode and contracts. The version of the docker image used is driven by the version of Fabric in use, but can be overridden by setting the peer's `CORE_CHAINCODE_NODE_RUNTIME` environment variable.
38
+
Fabric v1.4.x, and Fabric v2.x will, by default, start up a Docker container based on `fabric-nodeenv` to host the chaincode and contracts. The version of the Docker image used is driven by the version of Fabric in use, but can be overridden by setting the peer's `CORE_CHAINCODE_NODE_RUNTIME` environment variable.
43
39
44
40
With Fabric v2.x, the chaincode container can be configured to be started by other means, and not the Peer. In this case, the environment used is not in the control of Fabric.
45
41
@@ -50,19 +46,20 @@ Node modules that are produced are `fabric-contract-api`, `fabric-shim` & `fabri
50
46
* Fabric v1.4 Node.js chaincode modules are supported running Nodejs 8.16.1 with the x86_64 architecture.
51
47
* Fabric v2.2/v2.3 Node.js chaincode modules are supported running in Node.js 12.22.6, with the x86_64 architecture.
52
48
* Fabric v2.4 Node.js chaincode modules are supported running in Node.js 16.x, with the x86_64 architecture.
53
-
* Fabric v2.5 Node.js chaincode modules are supported running in Node.js 18.x, with the x86_64 and arm64 architectures.
49
+
* Fabric v2.5.x Node.js chaincode modules are supported running in Node.js 18.x, with the x86_64 and arm64 architectures.
54
50
55
-
Architecture Support: all docker images, runtimes, tools are tested under x86_64 ONLY
51
+
Architecture Support: all Docker images, runtimes, tools are tested under x86_64 ONLY
56
52
57
53
### Default Peer Runtime selection
58
54
59
-
* Fabric 2.2/2.3 `fabric-nodeenv` docker image is based on node:12.22.6-alpine.
60
-
* Fabric 2.4 `fabric-nodeenv` docker image is based on node:16-alpine.
61
-
* Fabric 2.5 `fabric-nodeenv` docker image is based on node:18-alpine.
55
+
* Fabric 2.2/2.3 `fabric-nodeenv` Docker image is based on node:12.22.6-alpine.
56
+
* Fabric 2.4 `fabric-nodeenv` Docker image is based on node:16-alpine.
57
+
* Fabric 2.5.0 - 2.5.4 `fabric-nodeenv` Docker image is based on node:18-alpine.
58
+
* Fabric 2.5.5+ `fabric-nodeenv` Docker image is based on node:20-alpine.
62
59
63
-
*Note:* With the default docker image used by Fabric 2.x, the packaged code will be installed with npm. If a `package-lock.json` or a `npm-shrinkwrap.json` file is present, `npm ci --only=production` will be used. Otherwise `npm install --production` will be used.
60
+
*Note:* With the default Docker image used by Fabric 2.x, the packaged code will be installed with npm. If a `package-lock.json` or a `npm-shrinkwrap.json` file is present, `npm ci --only=production` will be used. Otherwise `npm install --production` will be used.
64
61
65
-
When using Fabric 1.4.x, the docker image that is used to run the Node.js chaincode is node v8.16.1. It is installed with npm install --production
62
+
When using Fabric 1.4.x, the Docker image that is used to run the Node.js chaincode is node v8.16.1. It is installed with npm install --production
0 commit comments