diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c68c862..2f75d61d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## v2.1.0 +Wed 1 Apr 2020 16:12:36 BST + +* [644213a](https://github.com/hyperledger/fabric-chaincode-node/commit/644213a) [FABCN-391](https://jira.hyperledger.org/browse/FABCN-391) Remove references to 2.0 and 2.0.0 - replace with 2.x +* [de8c29c](https://github.com/hyperledger/fabric-chaincode-node/commit/de8c29c) [FABCN-241](https://jira.hyperledger.org/browse/FABCN-241) Change to.be.ok test calls +* [a3ff93c](https://github.com/hyperledger/fabric-chaincode-node/commit/a3ff93c) Add readme to redirect to site +* [659d36d](https://github.com/hyperledger/fabric-chaincode-node/commit/659d36d) Improve build reliability +* [d62ecae](https://github.com/hyperledger/fabric-chaincode-node/commit/d62ecae) [FABCN-373](https://jira.hyperledger.org/browse/FABCN-373) Compatibility Matrix +* [c09385c](https://github.com/hyperledger/fabric-chaincode-node/commit/c09385c) [FABCN-391](https://jira.hyperledger.org/browse/FABCN-391) Use version 2.1 of fabric docker images +* [78f8cf8](https://github.com/hyperledger/fabric-chaincode-node/commit/78f8cf8) Expand node engine version range +* [c9e9e5b](https://github.com/hyperledger/fabric-chaincode-node/commit/c9e9e5b) Update audit level +* [dd51dfa](https://github.com/hyperledger/fabric-chaincode-node/commit/dd51dfa) [FABCN-381](https://jira.hyperledger.org/browse/FABCN-381) Access localmspid + ## v2.0.0 Wed 22 Jan 2020 16:03:50 GMT diff --git a/TUTORIAL.md b/TUTORIAL.md index 9e65da52..7d8d4bda 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -28,8 +28,8 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-chaincode-api": "2.1.0-unstable", - "fabric-shim": "2.1.0-unstable" + "fabric-chaincode-api": "2.1.0", + "fabric-shim": "2.1.0" } } diff --git a/apis/fabric-contract-api/package.json b/apis/fabric-contract-api/package.json index ed05548b..b8fda2ab 100644 --- a/apis/fabric-contract-api/package.json +++ b/apis/fabric-contract-api/package.json @@ -1,7 +1,7 @@ { "name": "fabric-contract-api", - "version": "2.1.0-unstable", - "tag": "unstable", + "version": "2.1.0", + "tag": "latest", "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "repository": { @@ -46,7 +46,7 @@ "lines": 100 }, "dependencies": { - "fabric-shim-api": "2.1.0-unstable", + "fabric-shim-api": "2.1.0", "class-transformer": "^0.2.2", "fast-safe-stringify": "~2.0.7", "get-params": "^0.1.2", diff --git a/apis/fabric-shim-api/package.json b/apis/fabric-shim-api/package.json index e4ff830f..ff7b4f21 100644 --- a/apis/fabric-shim-api/package.json +++ b/apis/fabric-shim-api/package.json @@ -1,7 +1,7 @@ { "name": "fabric-shim-api", - "version": "2.1.0-unstable", - "tag": "unstable", + "version": "2.1.0", + "tag": "latest", "description": "A node.js API of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "repository": { diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index e0b8f8f7..cb31227c 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -286,7 +286,7 @@ stages: workingFile: '$(Agent.TempDirectory)/.npmrc' customEndpoint: 'fabric-chainode-node-npm' - script: | - find $(Pipeline.Workspace)/node-tgz/ -maxdepth 1 -type f -name 'fabric-*.tgz' -exec npm publish {} --tag unstable \; + find $(Pipeline.Workspace)/node-tgz/ -maxdepth 1 -type f -name 'fabric-*.tgz' -exec npm publish {} --tag latest \; displayName: 'npm publish' - job: jsdoc_publish steps: @@ -311,11 +311,13 @@ stages: docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD} echo "Logged in to docker registry" # tag nodeenv image to PACKAGE_VERSION - docker tag hyperledger/fabric-nodeenv fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable + docker tag hyperledger/fabric-nodeenv hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-latest # push nodeenv to repository - docker push hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable - ./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable" --target "hyperledger/fabric-nodeenv:$(BuildData.PACKAGE_VERSION)-unstable" - ./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable" --target "hyperledger/fabric-nodeenv:2.0-unstable" + docker push hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-latest + # publish patch version (3-digit) image + ./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-latest" --target "hyperledger/fabric-nodeenv:$(BuildData.PACKAGE_VERSION)-latest" + # publish minor version (2-digit) image + ./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-latest" --target "hyperledger/fabric-nodeenv:$(BuildData.MINOR_PACKAGE_VERSION)-latest" env: DOCKER_REGISTRY_USERNAME: $(DockerHub-Username) DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password) diff --git a/docker/fabric-nodeenv/Dockerfile b/docker/fabric-nodeenv/Dockerfile index 6b1dbcc0..c0eb3f9a 100644 --- a/docker/fabric-nodeenv/Dockerfile +++ b/docker/fabric-nodeenv/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -ARG NODE_VER=10.15.2 +ARG NODE_VER=12.16.1 FROM node:${NODE_VER}-alpine RUN apk add --no-cache \ make \ diff --git a/docker/fabric-nodeenv/docker.js b/docker/fabric-nodeenv/docker.js index 617dfc55..40c2dc56 100644 --- a/docker/fabric-nodeenv/docker.js +++ b/docker/fabric-nodeenv/docker.js @@ -16,7 +16,7 @@ const util = require('util'); const { shell: runcmds } = require('toolchain'); const version = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'))).version; -const node_version = process.env.NODE_VERSION || '10.15.2'; +const node_version = process.env.NODE_VERSION || '12.16.1'; const build_dir = path.join(__dirname); const tag = version + '-' + git.short(); diff --git a/docs/_jsdoc/index.md b/docs/_jsdoc/index.md index 56df3a5d..070846dc 100644 --- a/docs/_jsdoc/index.md +++ b/docs/_jsdoc/index.md @@ -125,9 +125,6 @@ Start the chaincode process and listen for incoming endorsement requests: shim.start(new Chaincode()); ``` -## Support -Tested with node.js 8.9.0 (LTS). - ## License This package is distributed under the diff --git a/docs/_jsdoc/tutorials/using-chaincodeinterface.md b/docs/_jsdoc/tutorials/using-chaincodeinterface.md index b1df0abb..7b3f7d65 100644 --- a/docs/_jsdoc/tutorials/using-chaincodeinterface.md +++ b/docs/_jsdoc/tutorials/using-chaincodeinterface.md @@ -8,7 +8,7 @@ cd mycc // create a new node project npm init // install fabric-shim at master branch -npm install 2.1.0-unstable +npm install 2.1.0 // or using the released version npm install fabric-shim touch mychaincode.js @@ -60,7 +60,7 @@ Finally, update the "start" script in package.json to "node mychaincode.js": "version": "1.0.0", "description": "My first exciting chaincode implemented in node.js", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "scripts": { "start" : "node mychaincode.js" }, @@ -68,7 +68,7 @@ Finally, update the "start" script in package.json to "node mychaincode.js": "engineStrict": true, "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable" + "fabric-shim": "2.1.0" } } ``` diff --git a/docs/_jsdoc/tutorials/using-contractinterface.md b/docs/_jsdoc/tutorials/using-contractinterface.md index 4bd2f92d..8bc2ad5e 100644 --- a/docs/_jsdoc/tutorials/using-contractinterface.md +++ b/docs/_jsdoc/tutorials/using-contractinterface.md @@ -15,7 +15,7 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "name": "chaincode", "description": "My first exciting chaincode implemented in node.js", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "scripts": { @@ -28,8 +28,8 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-chaincode-api": "2.1.0-unstable", - "fabric-shim": "2.1.0-unstable" + "fabric-chaincode-api": "2.1.0", + "fabric-shim": "2.1.0" } } diff --git a/libraries/fabric-shim-crypto/package.json b/libraries/fabric-shim-crypto/package.json index 86d67edf..34f134be 100644 --- a/libraries/fabric-shim-crypto/package.json +++ b/libraries/fabric-shim-crypto/package.json @@ -1,7 +1,7 @@ { "name": "fabric-shim-crypto", - "version": "2.1.0-unstable", - "tag": "unstable", + "version": "2.1.0", + "tag": "latest", "description": "A node.js implementation of encryption library for Hyperledger Fabric chaincode shim", "main": "index.js", "repository": { diff --git a/libraries/fabric-shim/package.json b/libraries/fabric-shim/package.json index f4e1b208..04c6743c 100644 --- a/libraries/fabric-shim/package.json +++ b/libraries/fabric-shim/package.json @@ -1,7 +1,7 @@ { "name": "fabric-shim", - "version": "2.1.0-unstable", - "tag": "unstable", + "version": "2.1.0", + "tag": "latest", "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "bin": { @@ -61,8 +61,8 @@ "@grpc/proto-loader": "^0.5.1", "@types/node": "^8.9.4", "ajv": "^6.5.5", - "fabric-contract-api": "2.1.0-unstable", - "fabric-shim-api": "2.1.0-unstable", + "fabric-contract-api": "2.1.0", + "fabric-shim-api": "2.1.0", "fs-extra": "8.1.0", "grpc": "^1.23.3", "reflect-metadata": "^0.1.12", diff --git a/package.json b/package.json index 844df0be..855ee9d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fabric-chaincode-node", - "version": "2.1.0-unstable", - "tag": "unstable", + "version": "2.1.0", + "tag": "latest", "description": "fabric-chaincode-node monorepo, built with rush", "testFabricVersion": "master", "testFabricCAVersion": "1.4.4", diff --git a/release_notes/v2.0.0.txt b/release_notes/v2.0.0.txt index e39b9cbd..f46b59db 100644 --- a/release_notes/v2.0.0.txt +++ b/release_notes/v2.0.0.txt @@ -50,4 +50,4 @@ none Change Log ---------- -https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.0/CHANGELOG.md#v2.0.0 +https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.x/CHANGELOG.md#v2.0.0 diff --git a/release_notes/v2.1.0.txt b/release_notes/v2.1.0.txt new file mode 100644 index 00000000..b052bdb4 --- /dev/null +++ b/release_notes/v2.1.0.txt @@ -0,0 +1,17 @@ +v2.1.0 +------ + +Release Notes +------------- +There are minimal changes between v2.0.0 and v2.1.0, please see the change log for a full list of updates. + +The release-2.0 branch has been renamed to release-2.x; the v2.1.0 release supercedes v2.0.0. +The release-1.4 branch is currently LTS, please see the proposed Fabric LTS strategy for more information: +https://github.com/hyperledger/fabric-rfcs/pull/23 + +- FABCN-373 Added a compatibility.md file, explaining support for node and fabric versions +- FABCN-381 Exposes a new shim function for returning the CORE_PEER_LOCALMSPID peer environment variable + +Change Log +---------- +https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.x/CHANGELOG.md#v2.1.0 diff --git a/test/chaincodes/annotations/package.json b/test/chaincodes/annotations/package.json index 23e64d85..87e0f1ee 100644 --- a/test/chaincodes/annotations/package.json +++ b/test/chaincodes/annotations/package.json @@ -18,8 +18,8 @@ "author": "", "license": "APACHE-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable", + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0", "@types/node": "^10.3.6", "ts-node": "^3.3.0", "tslint": "^5.6.0", diff --git a/test/chaincodes/clientidentity/package.json b/test/chaincodes/clientidentity/package.json index 5bc958cf..477314eb 100644 --- a/test/chaincodes/clientidentity/package.json +++ b/test/chaincodes/clientidentity/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/crosschaincode/package.json b/test/chaincodes/crosschaincode/package.json index 51922129..0659293b 100644 --- a/test/chaincodes/crosschaincode/package.json +++ b/test/chaincodes/crosschaincode/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/crosschaincode2/package.json b/test/chaincodes/crosschaincode2/package.json index 7480cca1..8ad10f56 100644 --- a/test/chaincodes/crosschaincode2/package.json +++ b/test/chaincodes/crosschaincode2/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/crud/package.json b/test/chaincodes/crud/package.json index d6e9039e..05d5c6d3 100644 --- a/test/chaincodes/crud/package.json +++ b/test/chaincodes/crud/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/encryption/package.json b/test/chaincodes/encryption/package.json index eec9cc26..f2f1f946 100644 --- a/test/chaincodes/encryption/package.json +++ b/test/chaincodes/encryption/package.json @@ -15,8 +15,8 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable", - "fabric-shim-crypto": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0", + "fabric-shim-crypto": "2.1.0" } } diff --git a/test/chaincodes/events/package.json b/test/chaincodes/events/package.json index 8ff655f3..13fc825a 100644 --- a/test/chaincodes/events/package.json +++ b/test/chaincodes/events/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/query/package.json b/test/chaincodes/query/package.json index 1724579f..27d3b9fc 100644 --- a/test/chaincodes/query/package.json +++ b/test/chaincodes/query/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/chaincodes/scenario/package.json b/test/chaincodes/scenario/package.json index 9ed5b460..e19166da 100644 --- a/test/chaincodes/scenario/package.json +++ b/test/chaincodes/scenario/package.json @@ -15,7 +15,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.1.0-unstable", - "fabric-contract-api": "2.1.0-unstable" + "fabric-shim": "2.1.0", + "fabric-contract-api": "2.1.0" } } diff --git a/test/fv/package.json b/test/fv/package.json index 40a7656d..fde41f6f 100644 --- a/test/fv/package.json +++ b/test/fv/package.json @@ -1,6 +1,6 @@ { "name": "fvtests", - "version": "2.1.0-unstable", + "version": "2.1.0", "description": "fv tests", "testFabricVersion": "master", "testFabricThirdParty": "0.4.15", @@ -26,10 +26,10 @@ "del": "^3.0.0", "delay": "4.3.0", "eslint": "6.6.0", - "fabric-contract-api": "2.1.0-unstable", - "fabric-shim": "2.1.0-unstable", - "fabric-shim-api": "2.1.0-unstable", - "fabric-shim-crypto": "2.1.0-unstable", + "fabric-contract-api": "2.1.0", + "fabric-shim": "2.1.0", + "fabric-shim-api": "2.1.0", + "fabric-shim-crypto": "2.1.0", "fs-extra": "8.1.0", "git-rev-sync": "1.12.0", "gulp": "^4.0.0", diff --git a/tools/toolchain/network/crypto-material/core.yaml b/tools/toolchain/network/crypto-material/core.yaml index 93c58307..a9087f16 100644 --- a/tools/toolchain/network/crypto-material/core.yaml +++ b/tools/toolchain/network/crypto-material/core.yaml @@ -50,7 +50,7 @@ peer: interval: 7200s # Timeout is the duration the server waits for a response # from the client after sending a ping before closing the connection - timeout: 20s + timeout: 120s # MinInterval is the minimum permitted time between client pings. # If clients send pings more frequently, the peer server will # disconnect them @@ -63,7 +63,7 @@ peer: interval: 60s # Timeout is the duration the client waits for a response from # peer nodes before closing the connection - timeout: 20s + timeout: 120s # DeliveryClient keepalive settings for communication with ordering # nodes. deliveryClient: diff --git a/tools/toolchain/network/docker-compose/docker-compose-base.yaml b/tools/toolchain/network/docker-compose/docker-compose-base.yaml index 4d680787..8eba5f2c 100644 --- a/tools/toolchain/network/docker-compose/docker-compose-base.yaml +++ b/tools/toolchain/network/docker-compose/docker-compose-base.yaml @@ -92,7 +92,7 @@ services: # # bridge network as the peers # # https://docs.docker.com/compose/networking/ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=node_default - - CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.1.0-unstable + - CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.1.0 # Allow more time for chaincode container to build on install. - CORE_CHAINCODE_EXECUTETIMEOUT=300s working_dir: /opt/gopath/src/github.com/hyperledger/fabric