From a538b10b8ebe46b6c87be7e2fbdf3f24b1d8c059 Mon Sep 17 00:00:00 2001 From: YoungHypo Date: Thu, 10 Oct 2024 23:33:53 -0700 Subject: [PATCH] upgrade Fabric version to 2.5.10 Signed-off-by: YoungHypo --- Makefile | 2 +- build_image/docker/cello-hlf/Dockerfile | 8 ++++---- build_image/docker/cello-hlf/scripts/init.sh | 2 +- build_image/docker/common/api-engine/Dockerfile.in | 2 +- src/api-engine/api/config.py | 2 +- src/api-engine/api/lib/agent/docker/handler.py | 2 +- src/api-engine/api/routes/chaincode/views.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 88f221fe..9f207fce 100755 --- a/Makefile +++ b/Makefile @@ -223,7 +223,7 @@ docker-rest-agent: docker build -t hyperledger/cello-agent-docker:latest -f build_image/docker/agent/docker-rest-agent/Dockerfile.in ./ --build-arg pip=$(PIP) --platform linux/$(ARCH) fabric: - docker build -t hyperledger/fabric:2.5.9 -f build_image/docker/cello-hlf/Dockerfile build_image/docker/cello-hlf/ + docker build -t hyperledger/fabric:2.5.10 -f build_image/docker/cello-hlf/Dockerfile build_image/docker/cello-hlf/ dashboard: docker build -t hyperledger/cello-dashboard:latest -f build_image/docker/common/dashboard/Dockerfile.in ./ diff --git a/build_image/docker/cello-hlf/Dockerfile b/build_image/docker/cello-hlf/Dockerfile index a7eb7929..3988edca 100644 --- a/build_image/docker/cello-hlf/Dockerfile +++ b/build_image/docker/cello-hlf/Dockerfile @@ -21,7 +21,7 @@ # Workdir is set to $GOPATH/src/github.com/hyperledger/fabric # Data is stored under /var/hyperledger/production -FROM golang:1.22 +FROM golang:1.23.1 LABEL maintainer="Baohua Yang " # Orderer, peer, ca, operation api @@ -34,11 +34,11 @@ ENV FABRIC_ROOT=$GOPATH/src/github.com/hyperledger/fabric \ FABRIC_CA_ROOT=$GOPATH/src/github.com/hyperledger/fabric-ca # BASE_VERSION is used in metadata.Version as major version -ENV BASE_VERSION=2.5.9 +ENV BASE_VERSION=2.5.10 # PROJECT_VERSION is required in core.yaml for fabric-baseos and fabric-ccenv -ENV PROJECT_VERSION=2.5.9 -ENV HLF_CA_VERSION=1.5.12 +ENV PROJECT_VERSION=2.5.10 +ENV HLF_CA_VERSION=1.5.13 # generic environment (core.yaml) for builder and runtime: e.g., builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION), golang, java, node ENV DOCKER_NS=hyperledger diff --git a/build_image/docker/cello-hlf/scripts/init.sh b/build_image/docker/cello-hlf/scripts/init.sh index c617b055..1c19e36a 100644 --- a/build_image/docker/cello-hlf/scripts/init.sh +++ b/build_image/docker/cello-hlf/scripts/init.sh @@ -5,7 +5,7 @@ # It will read the following env variables # HLF_NODE_MSP: store a base64 encoded zipped "msp" path # HLF_NODE_TLS: store a base64 encoded zipped "tls" path -# HLF_NODE_BOOTSTRAP_BLOCK: store a base64 encoded zipped bootstrap block, which is no longer needed for HLF 2.5.9 or higher versions +# HLF_NODE_BOOTSTRAP_BLOCK: store a base64 encoded zipped bootstrap block, which is no longer needed for HLF 2.5.10 or higher versions # HLF_NODE_PEER_CONFIG: store a base64 encoded zipped peer configuration file (core.yaml) # HLF_NODE_ORDERER_CONFIG: store a base64 encoded zipped orderer configuration file (orderer.yaml) diff --git a/build_image/docker/common/api-engine/Dockerfile.in b/build_image/docker/common/api-engine/Dockerfile.in index da386b22..dc625775 100644 --- a/build_image/docker/common/api-engine/Dockerfile.in +++ b/build_image/docker/common/api-engine/Dockerfile.in @@ -11,7 +11,7 @@ RUN apt-get update \ WORKDIR /var/www/server # Install compiled code tools from Artifactory and copy it to opt folder. -RUN curl -L --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v2.5.9/hyperledger-fabric-linux-amd64-2.5.9.tar.gz" | tar xz -C /opt/ +RUN curl -L --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v2.5.10/hyperledger-fabric-linux-amd64-2.5.10.tar.gz" | tar xz -C /opt/ # Copy source code to the working dir COPY src/api-engine ./ diff --git a/src/api-engine/api/config.py b/src/api-engine/api/config.py index a289a39d..aed82409 100644 --- a/src/api-engine/api/config.py +++ b/src/api-engine/api/config.py @@ -13,4 +13,4 @@ FABRIC_CHAINCODE_STORE = "/opt/cello/chaincode" -FABRIC_VERSION = "2.5.9" +FABRIC_VERSION = "2.5.10" diff --git a/src/api-engine/api/lib/agent/docker/handler.py b/src/api-engine/api/lib/agent/docker/handler.py index 311ca62c..50affc01 100644 --- a/src/api-engine/api/lib/agent/docker/handler.py +++ b/src/api-engine/api/lib/agent/docker/handler.py @@ -40,7 +40,7 @@ def create(self, info): 'tls': info.get("tls")[2:-1], 'peer_config_file': info.get("config_file")[2:-1], 'orderer_config_file': info.get("config_file")[2:-1], - 'img': 'hyperledger/fabric:2.5.9', + 'img': 'hyperledger/fabric:2.5.10', 'cmd': 'bash /tmp/init.sh "peer node start"' if info.get("type") == "peer" else 'bash /tmp/init.sh "orderer"', 'name': info.get("name"), 'type': info.get("type"), diff --git a/src/api-engine/api/routes/chaincode/views.py b/src/api-engine/api/routes/chaincode/views.py index 52b5d7e0..bc2d2942 100644 --- a/src/api-engine/api/routes/chaincode/views.py +++ b/src/api-engine/api/routes/chaincode/views.py @@ -162,7 +162,7 @@ def package(self, request): # ) # peer_node = qs.first() # envs = init_env_vars(peer_node, org) - # peer_channel_cli = PeerChainCode("v2.5.9", **envs) + # peer_channel_cli = PeerChainCode("v2.5.10", **envs) # return_code, content = peer_channel_cli.lifecycle_calculatepackageid(temp_cc_path) # if (return_code != 0): # return Response(