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

Update to Fabric v2.1.1 #369

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ercc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions ercc/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion fabric/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions fabric/bin/peer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand Down Expand Up @@ -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 ..
Expand Down
7 changes: 5 additions & 2 deletions fabric/externalBuilder/bin/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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"
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion integration/config/configtx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion integration/config/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

###############################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion integration/config/msp/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration/config/orderer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion utils/docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/docker/peer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down