diff --git a/.travis.yml b/.travis.yml index cd1c9c5c4..47ca83e0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ env: - NANOPB_VERSION=0.3.9.2 - NANOPB_PATH=${HOME}/nanopb # FABRIC - - FABRIC_VERSION=2.1.0 + - FABRIC_VERSION=2.1.1 - FABRIC_PATH=$GOPATH/src/github.com/hyperledger/fabric # FPC - FPC_PATH=$GOPATH/src/github.com/hyperledger-labs/fabric-private-chaincode diff --git a/README.md b/README.md index 07177353c..90b905a6b 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ Make sure that you have the following required dependencies installed: * [SSL](https://github.com/intel/intel-sgx-ssl) for SGX SDK v2.4.1 (we recommend using OpenSSL 1.1.0j) -* Hyperledger [Fabric](https://github.com/hyperledger/fabric/tree/v2.1.0) v2.1.0 +* Hyperledger [Fabric](https://github.com/hyperledger/fabric/tree/v2.1.1) v2.1.1 * Clang-format 6.x or higher @@ -317,14 +317,14 @@ Clone the code and make sure it is on your `$GOPATH`. (Important: we assume in t Fabric Private Chaincode support requires to re-build the Fabric peer. -Checkout Fabric 2.1.0 release using the following commands: +Checkout Fabric 2.1.1 release using the following commands: $ export FABRIC_PATH=${GOPATH}/src/github.com/hyperledger/fabric $ git clone https://github.com/hyperledger/fabric.git $FABRIC_PATH - $ cd $FABRIC_PATH; git checkout tags/v2.1.0 + $ cd $FABRIC_PATH; git checkout tags/v2.1.1 Note that Fabric Private Chaincode currently does not work with the Fabric `master` branch, therefore make sure you use the Fabric -`v2.1.0` tag. This is important as our build script applies some patches +`v2.1.1` tag. This is important as our build script applies some patches to the fabric peer to enable FPC support. Make sure the source of Fabric is in your ``$GOPATH``. ### Build Fabric Private Chaincode diff --git a/ercc/go.mod b/ercc/go.mod index 19da4f337..854a59177 100644 --- a/ercc/go.mod +++ b/ercc/go.mod @@ -6,9 +6,9 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/golang/protobuf v1.3.5 // indirect github.com/google/go-cmp v0.4.0 // indirect - github.com/hyperledger/fabric v2.0.1+incompatible - github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed - github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b + github.com/hyperledger/fabric v2.1.1+incompatible + github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a + github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 github.com/kr/pretty v0.2.0 // indirect github.com/onsi/ginkgo v1.12.0 github.com/onsi/gomega v1.9.0 diff --git a/ercc/go.sum b/ercc/go.sum index 3da2b9266..a1e4c02e5 100644 --- a/ercc/go.sum +++ b/ercc/go.sum @@ -30,13 +30,17 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hyperledger/fabric v2.0.1+incompatible h1:7W+yG0gLKTC7NLcWPT3vfpnaseztPpH9wXGfAW7yvBs= -github.com/hyperledger/fabric v2.0.1+incompatible/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= +github.com/hyperledger/fabric v2.1.1+incompatible h1:cYYRv3vVg4kA6DmrixLxwn1nwBEUuYda8DsMwlaMKbY= +github.com/hyperledger/fabric v2.1.1+incompatible/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed h1:VNnrD/ilIUO9DDHQP/uioYSy1309rYy0Z1jf3GLNRIc= github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a h1:KoFw2HnRfW+EItMP0zvUUl1FGzDb/7O0ov7uXZffQok= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b h1:rZ3Vro68vStzLYfcSrQlprjjCf5UmFk7QjKGgHL8IQg= github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 h1:75hBp86WljV3uQ7Q/wbO5w8ahfLAzxH7jfT5kVy2n6g= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= diff --git a/fabric/Makefile b/fabric/Makefile index b83ceb3f0..c579d1c02 100644 --- a/fabric/Makefile +++ b/fabric/Makefile @@ -5,7 +5,7 @@ TOP = .. include $(TOP)/build.mk -FABRIC_VERSION ?= 2.1.0 +FABRIC_VERSION ?= 2.1.1 FABRIC_VERSION_TAG =v$(FABRIC_VERSION) FABRIC_PEER_BIN = $(FABRIC_PATH)/build/bin/peer FABRIC_TLCC = $(FABRIC_PATH)/core/scc/tlcc diff --git a/fabric/README.md b/fabric/README.md index 859f33acb..261bbca5f 100644 --- a/fabric/README.md +++ b/fabric/README.md @@ -29,9 +29,9 @@ Try to run `pushd $FPC_PATH/tlcc_enclave; make; popd;` followed by `make` again. ### Wrong Fabric version ``` Patching Fabric ... -Aborting! Tag on current HEAD () does not match expected tag/v2.1.0! +Aborting! Tag on current HEAD () does not match expected tag/v2.1.1! ... ``` Seems that your Fabric is on the wrong branch. -Try to run `pushd $FABRIC_PATH; git checkout tags/v2.1.0; popd;` followed by `make` again. +Try to run `pushd $FABRIC_PATH; git checkout tags/v2.1.1; popd;` followed by `make` again. diff --git a/fabric/bin/peer.sh b/fabric/bin/peer.sh index 198866dd6..4ebeb47d3 100755 --- a/fabric/bin/peer.sh +++ b/fabric/bin/peer.sh @@ -61,7 +61,7 @@ handle_lifecycle_chaincode_package() { # Above is the flags we really care, but we need also the outputfile # which doesn't have a flag. So let's enumerate the known no-arg # flags (i.e., --tls -h/--help), assume all other flags have exactly - # one arg (true as of v2.1.0) and then the remaining one is the + # one arg (true as of v2.1.1) and then the remaining one is the # output file ... -h|--help) # with help, no point to continue but run it right here .. @@ -167,7 +167,7 @@ handle_lifecycle_chaincode_install() { # we care only about package file name but this is not prefixed # with a flag. So let's enumerate the known no-arg flags (i.e., # --tls -h/--help), assume all other flags have exactly - # one arg (true as of v2.1.0) and then the remaining one is the + # one arg (true as of v2.1.1) and then the remaining one is the # output file ... -h|--help) # with help, no point to continue but run it right here .. diff --git a/fabric/externalBuilder/bin/lib/common.sh b/fabric/externalBuilder/bin/lib/common.sh index c58649d54..5b45451eb 100644 --- a/fabric/externalBuilder/bin/lib/common.sh +++ b/fabric/externalBuilder/bin/lib/common.sh @@ -46,8 +46,8 @@ cc_build_for_host() { mkdir -p ${CC_LIB_PATH} # - ecc shims - try ln -s "${FPC_TOP_DIR}/ecc/ecc" "${CC_PATH}/chaincode" - try ln -s "${FPC_TOP_DIR}/ecc_enclave/_build/lib/libsgxcc.so" "${CC_LIB_PATH}/" + try cp "${FPC_TOP_DIR}/ecc/ecc" "${CC_PATH}/chaincode" + try cp "${FPC_TOP_DIR}/ecc_enclave/_build/lib/libsgxcc.so" "${CC_LIB_PATH}/" # - chaincode specific stuff try cp "${CC_SOURCE_DIR}/${MRENCLAVE_FILE}" "${CC_PATH}" @@ -103,6 +103,9 @@ process_runtime_metadata() { fi # For debugging purposes, we also symlink the source metadata & build artifacts + # Note: the external builder in fabric 2.1.1 has started treating symlinks differently. So + # far they still work here, so leave it for now as it is still useful for debugging. (But + # as cp doesn't make sense here, we should remove it as soon as symlinks don't work anymore). try ln -s "${CC_BUILD_DIR}/" "${RUN_STATE_DIR}/build" try ln -s "${CC_RT_METADATA_DIR}/" "${RUN_STATE_DIR}/rt-metadata" } diff --git a/go.mod b/go.mod index 4a5636571..4125f25ae 100644 --- a/go.mod +++ b/go.mod @@ -13,11 +13,11 @@ require ( github.com/golang/protobuf v1.3.5 github.com/hashicorp/go-version v1.2.0 // indirect github.com/hyperledger-labs/fabric-private-chaincode/ercc v0.0.0-20200323171133-70f103dd66ee - github.com/hyperledger/fabric v2.0.1+incompatible + github.com/hyperledger/fabric v2.1.1+incompatible github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a // indirect - github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed + github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a github.com/hyperledger/fabric-lib-go v1.0.0 // indirect - github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b + github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 github.com/miekg/pkcs11 v1.0.3 // indirect github.com/mitchellh/mapstructure v1.2.2 // indirect github.com/pelletier/go-toml v1.6.0 // indirect diff --git a/go.sum b/go.sum index 95da64207..4886cd509 100644 --- a/go.sum +++ b/go.sum @@ -156,18 +156,18 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hyperledger/fabric v2.0.1+incompatible h1:7W+yG0gLKTC7NLcWPT3vfpnaseztPpH9wXGfAW7yvBs= -github.com/hyperledger/fabric v2.0.1+incompatible/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= +github.com/hyperledger/fabric v2.1.1+incompatible h1:cYYRv3vVg4kA6DmrixLxwn1nwBEUuYda8DsMwlaMKbY= +github.com/hyperledger/fabric v2.1.1+incompatible/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a h1:JAKZdGuUIjVmES0X31YUD7UqMR2rz/kxLluJuGvsXPk= github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed h1:VNnrD/ilIUO9DDHQP/uioYSy1309rYy0Z1jf3GLNRIc= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a h1:KoFw2HnRfW+EItMP0zvUUl1FGzDb/7O0ov7uXZffQok= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9 h1:JgFP410JY/3uQQGcfxR1HUDdDnPWzmC0TlmPctPElCQ= github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b h1:rZ3Vro68vStzLYfcSrQlprjjCf5UmFk7QjKGgHL8IQg= -github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 h1:75hBp86WljV3uQ7Q/wbO5w8ahfLAzxH7jfT5kVy2n6g= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= diff --git a/integration/config/configtx.yaml b/integration/config/configtx.yaml index 571fa2e99..a2e721d96 100644 --- a/integration/config/configtx.yaml +++ b/integration/config/configtx.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.0 +# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.1 --- ################################################################################ diff --git a/integration/config/core.yaml b/integration/config/core.yaml index 31c766d51..39cc77b64 100644 --- a/integration/config/core.yaml +++ b/integration/config/core.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.0 +# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.1 ############################################################################### # diff --git a/integration/config/msp/config.yaml b/integration/config/msp/config.yaml index 3734d9770..d1dfeb6e4 100644 --- a/integration/config/msp/config.yaml +++ b/integration/config/msp/config.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.0 +# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.1 OrganizationalUnitIdentifiers: - Certificate: "cacerts/cacert.pem" diff --git a/integration/config/orderer.yaml b/integration/config/orderer.yaml index a0f59c811..1382695af 100644 --- a/integration/config/orderer.yaml +++ b/integration/config/orderer.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.0 +# Based on sampleconfig from github.com/hyperledger/fabric.git tagged with v2.1.1 --- ################################################################################ diff --git a/utils/docker/dev/Dockerfile b/utils/docker/dev/Dockerfile index 5a5492dfb..1e560220c 100644 --- a/utils/docker/dev/Dockerfile +++ b/utils/docker/dev/Dockerfile @@ -10,7 +10,7 @@ ARG GO_VERSION=go1.14.1 ARG GO_TAR=$GO_VERSION.linux-amd64.tar.gz ARG NANOPB_VERSION=0.3.9.2 ARG FABRIC_REPO=https://github.com/hyperledger/fabric.git -ARG FABRIC_VERSION=2.1.0 +ARG FABRIC_VERSION=2.1.1 ARG FPC_REPO_URL=https://github.com/hyperledger-labs/fabric-private-chaincode.git ARG FPC_REPO_BRANCH_TAG_OR_COMMIT=master ARG OPENSSL_VERSION=1.1.0j diff --git a/utils/docker/peer/Dockerfile b/utils/docker/peer/Dockerfile index 0ac87aee9..2f3e2075a 100644 --- a/utils/docker/peer/Dockerfile +++ b/utils/docker/peer/Dockerfile @@ -10,7 +10,7 @@ ARG GO_VERSION=go1.14.1 ARG GO_TAR=$GO_VERSION.linux-amd64.tar.gz ARG NANOPB_VERSION=0.3.9.2 ARG FABRIC_REPO=https://github.com/hyperledger/fabric.git -ARG FABRIC_VERSION=2.1.0 +ARG FABRIC_VERSION=2.1.1 ARG FPC_REPO_URL=https://github.com/hyperledger-labs/fabric-private-chaincode.git ARG FPC_REPO_BRANCH_TAG_OR_COMMIT=master ARG OPENSSL_VERSION=1.1.0j