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

Upgrade go and fabric #633

Merged
merged 3 commits into from
Oct 5, 2021
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Make sure that you have the following required dependencies installed:

* CMake v3.5.1 or higher

* [Go](https://golang.org/) 1.15.4 or higher
* [Go](https://golang.org/) 1.16.7 or higher

* Docker 18.09 (or higher) and docker-compose 1.25.x (or higher)
Note that version from Ubuntu 18.04 is not recent enough! To upgrade, install a recent version following the instructions from [docker.com](https://docs.docker.com/compose/install/), e.g., for version 1.25.4 execute
Expand Down Expand Up @@ -287,7 +287,7 @@ Make sure that you have the following required dependencies installed:
* [Intel Software Guard Extensions SSL](https://github.com/intel/intel-sgx-ssl)
(we recommend using branch `lin_2.10_1.1.1g` OpenSSL `1.1.1g`)

* Hyperledger [Fabric](https://github.com/hyperledger/fabric/tree/v2.3.0) v2.3.0
* Hyperledger [Fabric](https://github.com/hyperledger/fabric/tree/v2.3.3) v2.3.3

* Clang-format 6.x or higher

Expand Down Expand Up @@ -344,15 +344,15 @@ export PROTOC_CMD=/usr/local/proto3/bin/protoc
#### Hyperledger Fabric

Our project fetches the latest supported Fabric binaries during the build process automatically.
However, if you want to use your own Fabric binaries, please checkout Fabric 2.3.0 release using the following commands:
However, if you want to use your own Fabric binaries, please checkout Fabric 2.3.3 release using the following commands:
```bash
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.3.0
cd $FABRIC_PATH; git checkout tags/v2.3.3
```

Note that Fabric Private Chaincode may not work with the Fabric `main` branch.
Therefore, make sure you use the Fabric `v2.3.0` tag.
Therefore, make sure you use the Fabric `v2.3.3` tag.
Make sure the source of Fabric is in your `$GOPATH`.

## Build Fabric Private Chaincode
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PLANTUML_IMG_FORMAT ?= png # pdf / png / svg
#--------------------------------------------------
PROJECT_NAME=fabric-private-chaincode

export FABRIC_VERSION ?= 2.3.0
export FABRIC_VERSION ?= 2.3.3

export FPC_VERSION := main

Expand Down
4 changes: 2 additions & 2 deletions fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ To clean the native build, type `cd $FPC_PATH/fabric; make clean-native`.
### Wrong Fabric version
```
Patching Fabric ...
Aborting! Tag on current HEAD () does not match expected tag/v2.3.0!
Aborting! Tag on current HEAD () does not match expected tag/v2.3.3!
...
```

Seems that your Fabric is on the wrong branch.
Try to run `pushd $FABRIC_PATH; git checkout tags/v2.3.0; popd;` followed by `make` again.
Try to run `pushd $FABRIC_PATH; git checkout tags/v2.3.3; 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 @@ -99,7 +99,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.3.0) and then the remaining one is the
# one arg (true as of v2.3.3) 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 @@ -206,7 +206,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.3.0) and then the remaining one is the
# one arg (true as of v2.3.3) and then the remaining one is the
# output file ...
-h|--help)
# with help, no point to continue but run it right here ..
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hyperledger/fabric-private-chaincode

go 1.15
go 1.16

// Note:
// - fabric has a go.mod but the normal tagging, e.g., v2.2.0 does NOT
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ If you have installed them somewhere else on your system, please set `FABIC_BIN_
For instance, you can download the binaries and use them by following the commands:
```bash
cd $FPC_PATH/samples/deployment/k8s
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.0 1.4.9 -d -s
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.3 1.4.9 -d -s
export FABRIC_BIN_DIR=$(pwd)/bin
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
value: /var/hyperledger/orderer/tls/server.key
- name: ORDERER_GENERAL_CLUSTER_ROOTCAS
value: "[/var/hyperledger/orderer/tls/ca.crt]"
image: hyperledger/fabric-orderer:2.3.0
image: hyperledger/fabric-orderer:2.3.3
name: orderer
ports:
- containerPort: 7050
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
value: /var/hyperledger/orderer/tls/server.key
- name: ORDERER_GENERAL_CLUSTER_ROOTCAS
value: "[/var/hyperledger/orderer/tls/ca.crt]"
image: hyperledger/fabric-orderer:2.3.0
image: hyperledger/fabric-orderer:2.3.3
name: orderer
ports:
- containerPort: 7050
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
value: /var/hyperledger/orderer/tls/server.key
- name: ORDERER_GENERAL_CLUSTER_ROOTCAS
value: "[/var/hyperledger/orderer/tls/ca.crt]"
image: hyperledger/fabric-orderer:2.3.0
image: hyperledger/fabric-orderer:2.3.3
name: orderer
ports:
- containerPort: 7050
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org1/org1-cli-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
configMapKeyRef:
name: chaincode-config
key: FPC_MRENCLAVE
image: hyperledger/fabric-tools:2.3.0
image: hyperledger/fabric-tools:2.3.3
name: cli
tty: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org1/org1-peer0-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
value: 0.0.0.0:9443
- name: CORE_METRICS_PROVIDER
value: prometheus
image: hyperledger/fabric-peer:2.3.0
image: hyperledger/fabric-peer:2.3.3
name: peer0
ports:
- containerPort: 7051
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org2/org2-cli-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
configMapKeyRef:
name: chaincode-config
key: FPC_MRENCLAVE
image: hyperledger/fabric-tools:2.3.0
image: hyperledger/fabric-tools:2.3.3
name: cli
tty: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org2/org2-peer0-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
value: 0.0.0.0:9443
- name: CORE_METRICS_PROVIDER
value: prometheus
image: hyperledger/fabric-peer:2.3.0
image: hyperledger/fabric-peer:2.3.3
name: peer0
ports:
- containerPort: 7051
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org3/org3-cli-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
configMapKeyRef:
name: chaincode-config
key: FPC_MRENCLAVE
image: hyperledger/fabric-tools:2.3.0
image: hyperledger/fabric-tools:2.3.3
name: cli
tty: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/k8s/org3/org3-peer0-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
value: 0.0.0.0:9443
- name: CORE_METRICS_PROVIDER
value: prometheus
image: hyperledger/fabric-peer:2.3.0
image: hyperledger/fabric-peer:2.3.3
name: peer0
ports:
- containerPort: 7051
Expand Down
8 changes: 4 additions & 4 deletions samples/deployment/test-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Next, setup fabric sample network, binaries and docker images. Here we follow th

```bash
cd $FPC_PATH/samples/deployment/test-network
git clone https://github.com/hyperledger/fabric-samples -b v2.3.0
git clone https://github.com/hyperledger/fabric-samples
cd $FPC_PATH/samples/deployment/test-network/fabric-samples
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.0 1.4.9 -s
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.3 1.4.9 -s
```

Before we can start the network, we need to update the Fabric peer configuration to enable FPC support.
Expand Down Expand Up @@ -70,8 +70,8 @@ cd $FPC_PATH/samples/deployment/test-network
Let's start the Fabric-Samples test network.
```bash
cd $FPC_PATH/samples/deployment/test-network/fabric-samples/test-network
./network.sh up
./network.sh createChannel -c mychannel -ca -cai 1.4.9 -i 2.3.0
./network.sh up -ca
./network.sh createChannel -c mychannel
```

Next, we install the FPC Enclave Registry and our FPC Chaincode on the network by using the standard Lifecycle commands,
Expand Down
2 changes: 1 addition & 1 deletion samples/deployment/test-network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ services:
networks:
default:
external:
name: net_test
name: fabric_test
2 changes: 1 addition & 1 deletion utils/docker/base-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG FPC_VERSION=main
FROM hyperledger/fabric-private-chaincode-base-rt:${FPC_VERSION} as common

# config/build params
ARG GO_VERSION=1.15.4
ARG GO_VERSION=1.16.7
ARG NANOPB_VERSION=0.4.3
ARG OPENSSL=1.1.1g
ARG SGXSSL=2.10_1.1.1g
Expand Down
2 changes: 1 addition & 1 deletion utils/docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM hyperledger/fabric-private-chaincode-base-dev:${FPC_VERSION}

# config/build params
ARG FABRIC_REPO=https://github.com/hyperledger/fabric.git
ARG FABRIC_VERSION=2.3.0
ARG FABRIC_VERSION=2.3.3

ARG FABRIC_REL_PATH=src/github.com/hyperledger/fabric
ARG FPC_REL_PATH=src/github.com/hyperledger/fabric-private-chaincode
Expand Down
2 changes: 1 addition & 1 deletion utils/docker/dev_peer_cc-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ARG SGX_MODE

# config/build params
ARG FABRIC_REPO=https://github.com/hyperledger/fabric.git
ARG FABRIC_VERSION=2.3.0
ARG FABRIC_VERSION=2.3.3
ARG FPC_REPO_URL=https://github.com/hyperledger/fabric-private-chaincode.git
ARG FPC_REPO_BRANCH_TAG_OR_COMMIT=main
ARG GIT_USER_NAME=tester
Expand Down