主頁 > 軟體設計 > Fabric開發(二) Ubuntu20.04.1快速搭建Fabric1.0.0 (排雷版)

Fabric開發(二) Ubuntu20.04.1快速搭建Fabric1.0.0 (排雷版)

2020-09-25 18:35:02 軟體設計

一、安裝Fabric前準備:

1、安裝ubuntu,建議virtualBox+ubuntu鏡像,

我所使用的版本:

1、virtualBox 5.2.20
#ubuntu桌面版,方便某些操作,例如修改源,(建議安裝英文版)
2、ubuntu-20.04.1-desktop-amd64.iso 

virtual版本
安裝注意點:

1、記憶體: 2048M
2、CPU: 2
3、磁盤: 位置放在D盤,大小50G, fabric 安裝完需要10G
4、網路模式: 橋接

1、記憶體 顯存 存盤修改
在這里插入圖片描述
在這里插入圖片描述
2、網路修改
在這里插入圖片描述
3、安裝完成后,九宮格找到Software&Update,修改源,
在這里插入圖片描述

2、xshell6 連接 可以網站直接申請學校版本

1.采用xshell 進行操作,方便復制

sudo apt-get install openssh-server
ps -e|grep ssh

2.查看ip

sudo apt install net-tools
ifconfig

查看ip也可以直接點擊 九宮格找到Setting ->Network
在這里插入圖片描述
3.進行xshell連接

3、安裝 vim、git、curl、pip、npm

此處注意:python-pip安裝會報找不到,所以改為python3-pip

sudo apt-get update
sudo apt-get install vim
sudo apt-get install git
sudo apt-get install curl
sudo apt-get install python3-pip
pip3 install --upgrade pip
sudo apt-get install npm

4、安裝go

安裝版本:1.14.4

wget https://storage.googleapis.com/golang/go1.14.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz

家目錄創建go檔案夾

cd ~
mkdir go

編輯當前用戶的環境變數.(:x可以直接回傳保存,)

vim ~/.profile

末尾追加:

export PATH=$PATH:/usr/local/go/bin 
export GOROOT=/usr/local/go 
export GOPATH=$HOME/go 
export PATH=$PATH:$HOME/go/bin

環境變數立即生效

source ~/.profile

檢驗go是否安裝成功(成功顯示go version go1.14.4 linux/amd64

go version

5、安裝Docker

1.卸載舊版本docker

sudo apt-get remove docker docker-engine docker.io

2.更新系統軟體

sudo apt-get update

3.安裝依賴包

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

4.添加官方密鑰

執行該命令時,如遇到長時間沒有回應說明網路連接不到docker網站,需要使用代-理進行,
顯示OK,表示添加成功.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5.添加倉庫

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

6.修改倉庫源(如果要設定專屬阿里云,自己先百度下哈)

sudo vim /etc/docker/daemon.json

填寫以下內容

{
    "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

重置docker服務

systemctl restart docker.service

7.再次更新軟體

sudo apt-get update

8.安裝docker

如果想指定安裝某一版本,可使用 sudo apt-get install docker-ce= 命令,把替換為具體版本即可,
以下命令沒有指定版本,默認就會安裝最新版

sudo apt-get install docker-ce

9.查看docker版本

docker -v

10.安裝完成后需要修改當前用戶(我使用的用戶叫halfape)權限:

sudo gpasswd -a halfape docker #正在將用戶“halfape”加入到“docker”組中
newgrp docker #更新用戶組

6、安裝docker-compose

1.下載docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

2.授權

sudo chmod +x /usr/local/bin/docker-compose

3.查看版本資訊

docker-compose --version

二、安裝Fabric

1、下載 Fabric原始碼

我們可以使用Git命令下載原始碼,首先需要建立對應的目錄,然后進入該目錄,Git下載原始碼:

mkdir -p ~/go/src/github.com/hyperledger 
cd ~/go/src/github.com/hyperledger 
git clone https://github.com/hyperledger/fabric.git

由于Fabric一直在更新,所有我們并不需要最新最新的原始碼,需要切換到v1.0.0版本的原始碼即可:(這個下載程序比較慢,目前看到一種從gitee下載的方法 我沒有試)

cd ~/go/src/github.com/hyperledger/fabric
git checkout v1.0.0

2、Fabric Docker鏡像的下載

因為我們已經設定了Docker Hub鏡像地址,所以下載也會很快,官方檔案也提供了批量下載的腳本,我們直接運行:

cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/
source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0

檢查Fabric Docker鏡像串列

docker images

![在這里插入圖片描述](https://img-blog.csdnimg.cn/20200924135347468.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2Fpd2FzdG9u,size_16,color_FFFFFF,t_70#pic_center
可以看出,檔案還是蠻大的,
至此,下載 fabric 原始碼、fabric 鏡像的作業已經完成,

三、Fabric簡單除錯

1、啟動Fabric網路并完成ChainCode的測驗

我們仍然停留在e2e_cli檔案夾,這里提供了啟動、關閉Fabric網路的自動化腳本,我們要啟動Fabric網路,并自動運行Example02 ChainCode的測驗,執行一個命令:

./network_setup.sh up
1.1編譯生成Fabric公私鑰、證書的程式,程式在目錄:fabric/release/linux-amd64/bin
1.2基于configtx.yaml生成創世區塊和通道相關資訊,并保存在channel-artifacts檔案夾,
1.3基于crypto-config.yaml生成公私鑰和證書資訊,并保存在crypto-config檔案夾中,
1.4基于docker-compose-cli.yaml啟動1Orderer+4Peer+1CLI的Fabric容器,
1.5在CLI啟動的時候,會運行scripts/script.sh檔案,這個腳本檔案包含了創建Channel,加入Channel,安裝Example02,運行Example02等功能,

最后運行完畢,我們可以看到這樣的界面:
在這里插入圖片描述
看到這里 恭喜你,說明我們整個Fabric網路已經OK了,

記錄下具體程序,以便于后續研究,

halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh up
setting to default channel 'mychannel'
mychannel

Building cryptogen
make: Entering directory '/home/halfape/go/src/github.com/hyperledger/fabric'
Building release/linux-amd64/bin/configtxgen for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/configtxgen -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/configtx/tool/configtxgen/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/configtx/tool/configtxgen
Building release/linux-amd64/bin/cryptogen for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/cryptogen -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/tools/cryptogen/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/tools/cryptogen
Building release/linux-amd64/bin/configtxlator for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/configtxlator -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/tools/configtxlator/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/tools/configtxlator
Building release/linux-amd64/bin/peer for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/peer -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.0 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.1 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger" github.com/hyperledger/fabric/peer
Building release/linux-amd64/bin/orderer for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/orderer -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/orderer/metadata.Version=1.0.0" github.com/hyperledger/fabric/orderer
mkdir -p release/linux-amd64/bin
make: Leaving directory '/home/halfape/go/src/github.com/hyperledger/fabric'

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
org1.example.com
org2.example.com

Using configtxgen -> /home/halfape/go/src/github.com/hyperledger/fabric/examples/e2e_cli/../../release/linux-amd64/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
2020-09-24 14:03:21.695 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.712 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating genesis block
2020-09-24 14:03:21.714 CST [common/configtx/tool] doOutputBlock -> INFO 003 Writing genesis block

#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
2020-09-24 14:03:21.756 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.760 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2020-09-24 14:03:21.761 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 003 Writing new channel tx

#################################################################
#######    Generating anchor peer update for Org1MSP   ##########
#################################################################
2020-09-24 14:03:21.793 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.798 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2020-09-24 14:03:21.798 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

#################################################################
#######    Generating anchor peer update for Org2MSP   ##########
#################################################################
2020-09-24 14:03:21.835 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.839 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2020-09-24 14:03:21.840 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

Creating network "e2ecli_default" with the default driver
Creating peer0.org1.example.com ... 
Creating peer1.org1.example.com ... 
Creating peer1.org2.example.com ... 
Creating orderer.example.com ... 
Creating peer0.org1.example.com
Creating peer0.org2.example.com ... 
Creating peer1.org1.example.com
Creating orderer.example.com
Creating peer0.org2.example.com
Creating orderer.example.com ... done
Creating cli ... 
Creating cli ... done

 ____    _____      _      ____    _____           _____   ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|         | ____| |___ \  | ____|
\___ \    | |     / _ \   | |_) |   | |    _____  |  _|     __) | |  _|  
 ___) |   | |    / ___ \  |  _ <    | |   |_____| | |___   / __/  | |___ 
|____/    |_|   /_/   \_\ |_| \_\   |_|           |_____| |_____| |_____|

Channel name : mychannel
Creating channel...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:35.240 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:35.240 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267314D535012FC052D...53616D706C65436F6E736F727469756D 
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 13F31E852E3702746BDF69BB4E8101889C7FF20CCB0A369CB048D4F2366435B0 
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...959D6EC845FCE532A9A3ADDAD6C1AD31 
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: AE949BCE386EAABE88210C5FB64D2C525F9E74B8D8CF1554F4B806FA576574C1 
2020-09-24 06:03:35.493 UTC [msp] GetLocalMSP -> DEBU 010 Returning existing local MSP
2020-09-24 06:03:35.493 UTC [msp] GetDefaultSigningIdentity -> DEBU 011 Obtaining default signing identity
2020-09-24 06:03:35.493 UTC [msp] GetLocalMSP -> DEBU 012 Returning existing local MSP
2020-09-24 06:03:35.493 UTC [msp] GetDefaultSigningIdentity -> DEBU 013 Obtaining default signing identity
2020-09-24 06:03:35.493 UTC [msp/identity] Sign -> DEBU 014 Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...825BD6FDF69112080A021A0012021A00 
2020-09-24 06:03:35.493 UTC [msp/identity] Sign -> DEBU 015 Sign: digest: 8378ACEDEF10F25823178B4C1ECB0EA5C0157422A9EE3B2241623F02FC25C523 
2020-09-24 06:03:35.494 UTC [channelCmd] readBlock -> DEBU 016 Got status:*orderer.DeliverResponse_Status 
2020-09-24 06:03:35.494 UTC [msp] GetLocalMSP -> DEBU 017 Returning existing local MSP
2020-09-24 06:03:35.494 UTC [msp] GetDefaultSigningIdentity -> DEBU 018 Obtaining default signing identity
2020-09-24 06:03:35.496 UTC [channelCmd] InitCmdFactory -> INFO 019 Endorser and orderer connections initialized
2020-09-24 06:03:35.698 UTC [msp] GetLocalMSP -> DEBU 01a Returning existing local MSP
2020-09-24 06:03:35.698 UTC [msp] GetDefaultSigningIdentity -> DEBU 01b Obtaining default signing identity
2020-09-24 06:03:35.702 UTC [msp] GetLocalMSP -> DEBU 01c Returning existing local MSP
2020-09-24 06:03:35.702 UTC [msp] GetDefaultSigningIdentity -> DEBU 01d Obtaining default signing identity
2020-09-24 06:03:35.703 UTC [msp/identity] Sign -> DEBU 01e Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...E5E08F74893C12080A021A0012021A00 
2020-09-24 06:03:35.703 UTC [msp/identity] Sign -> DEBU 01f Sign: digest: 56339A77350C1A804A8058ACEF0550D108CCB7E266A5734533F7A286133E4D9C 
2020-09-24 06:03:35.732 UTC [channelCmd] readBlock -> DEBU 020 Received block:0 
2020-09-24 06:03:35.733 UTC [main] main -> INFO 021 Exiting.....
===================== Channel "mychannel" is created successfully ===================== 

Having all peers join the channel...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:35.822 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:35.822 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:35.826 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:35.827 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A86070A5C08011A0C08B7EDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:35.827 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 1FC95717CF159E5BF071FA4D741025AB9BC17E307B1E7F11364BE1976D03F700 
2020-09-24 06:03:35.895 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:35.896 UTC [main] main -> INFO 007 Exiting.....
===================== PEER0 joined on the channel "mychannel" ===================== 

CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
2020-09-24 06:03:38.001 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:38.001 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:38.004 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:38.004 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A85070A5B08011A0B08BAEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:38.004 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: EF0E34FD2143F9EFFFB91C7593AABBCFC309C952E3AAB70DD675E67EBDBE0840 
2020-09-24 06:03:38.077 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:38.077 UTC [main] main -> INFO 007 Exiting.....
===================== PEER1 joined on the channel "mychannel" ===================== 

CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:40.144 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:40.144 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:40.148 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:40.148 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A85070A5B08011A0B08BCEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:40.148 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 7E3D9471CB81833879C4AAA68D07B99ED16F344BEBEB88BED2985D49C236C0DC 
2020-09-24 06:03:40.197 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:40.197 UTC [main] main -> INFO 007 Exiting.....
===================== PEER2 joined on the channel "mychannel" ===================== 

CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2020-09-24 06:03:42.277 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:42.277 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:42.280 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:42.280 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A86070A5C08011A0C08BEEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:42.280 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 307429B2F0A712EB734DC605111D796A5FDE454D649BCDF4D1D4CF282A863C55 
2020-09-24 06:03:42.317 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:42.317 UTC [main] main -> INFO 007 Exiting.....
===================== PEER3 joined on the channel "mychannel" ===================== 

Updating anchor peers for org1...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:44.389 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:44.389 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267314D535012FC052D...72731200220A0A0641646D696E731200 
2020-09-24 06:03:44.392 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: CE0BBEE6477F6F778EE453DD7F6172D57C855AD11FC332755829725A2E195930 
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:44.393 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:44.393 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608C0EDB0FB0522...71DB89122D78577A76A4201071ABD7A8 
2020-09-24 06:03:44.393 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 88B311AC32A7BEEF909651FEB7B79E909386ED503F0221447D0CEEAC27453BF1 
2020-09-24 06:03:44.456 UTC [main] main -> INFO 010 Exiting.....
===================== Anchor peers for org "Org1MSP" on "mychannel" is updated successfully ===================== 

Updating anchor peers for org2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:49.507 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:49.507 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:49.514 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:49.514 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:49.514 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267324D535012FC052D...72731200220A0A0641646D696E731200 
2020-09-24 06:03:49.514 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: A8F3368AF8D87033B10CB75AC0171242483FBDDDF710623AEF2D1ECB6D246921 
2020-09-24 06:03:49.515 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:49.515 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:49.515 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:49.515 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:49.515 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608C5EDB0FB0522...55111F568CFB353B048DB7829B697A59 
2020-09-24 06:03:49.515 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: DF93F35003104A57C7C8A59332669DEC2695B0EDAC5CA0A7E02256EF8B7AA20E 
2020-09-24 06:03:49.559 UTC [main] main -> INFO 010 Exiting.....
===================== Anchor peers for org "Org2MSP" on "mychannel" is updated successfully ===================== 

Installing chaincode on org1/peer0...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:54.637 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:54.638 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:54.638 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:54.638 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:55.266 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:03:55.822 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:03:55.824 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A86070A5C08031A0C08CBEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:03:55.824 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: 96E6D9272AB1D988DE69DF975A28FB8F8A142EA54D938D198973C019BBBEF948 
2020-09-24 06:03:55.828 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:03:55.828 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER0 ===================== 

Install chaincode on org2/peer2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:55.939 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:55.940 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:55.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:55.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:56.002 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:03:56.175 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:03:56.179 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A85070A5B08031A0B08CCEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:03:56.179 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: 2A11FA33DEFC09AF44B6DBD74145C6268B7B7F5D2D07DD79833515BBC4EB302B 
2020-09-24 06:03:56.186 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:03:56.186 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER2 ===================== 

Instantiating chaincode on org2/peer2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:56.239 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:56.239 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:56.242 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:56.242 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:56.242 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A90070A6608031A0B08CCEDB0FB0510...324D53500A04657363630A0476736363 
2020-09-24 06:03:56.242 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 135B4574B3AB6306330828AD313204BBC9C2EF3E5D33572E7333F02F4C312733 
2020-09-24 06:04:20.617 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A90070A6608031A0B08CCEDB0FB0510...1AA6B5B27683580A87310BC79AC46E3E 
2020-09-24 06:04:20.617 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 77FD9776C5844429F4A45B4F98499A9F45AD33998FE8DF510DF62A781F339F22 
2020-09-24 06:04:20.621 UTC [main] main -> INFO 009 Exiting.....
===================== Chaincode Instantiation on PEER2 on channel 'mychannel' is successful ===================== 

Querying chaincode on org1/peer0...
===================== Querying on PEER0 on channel 'mychannel'... ===================== 
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
Attempting to Query PEER0 ...3 secs

2020-09-24 06:04:23.794 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:23.795 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:23.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:23.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:23.798 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08E7EDB0FB0510...6D7963631A0A0A0571756572790A0161 
2020-09-24 06:04:23.798 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 21B941E99A3C8C6AD6FB5661499F8DE8045AE9FE6E403C7B59ADEE113F4C59D9 
Query Result: 100
2020-09-24 06:04:44.543 UTC [main] main -> INFO 007 Exiting.....
===================== Query on PEER0 on channel 'mychannel' is successful ===================== 
Sending invoke transaction on org1/peer0...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:04:44.700 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:44.700 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:44.702 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:44.702 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:44.702 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08FCEDB0FB0510...696E766F6B650A01610A01620A023130 
2020-09-24 06:04:44.702 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 0638FE536E7005EBCEA47F0CF3D65C8D441E7776CF800D3A4C3F2306CF3F681B 
2020-09-24 06:04:44.719 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A91070A6708031A0C08FCEDB0FB0510...060BE069770A9E6C00A400AF6CB2E539 
2020-09-24 06:04:44.719 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: F039995E54AECAE7B91FCF2FA22CED099637CF87F6077BB49D662DA6AD4B933F 
2020-09-24 06:04:44.725 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 009 ESCC invoke result: version:1 response:<status:200 message:"OK" > payload:"\n \rS-\342\361Y\335?*\201\351N\005\230o\277X\230i\272a\334^\344\210\234\033\316\200J_<\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement:<endorser:"\n\007Org1MSP\022\200\006-----BEGIN -----\nMIICGTCCAb+gAwIBAgIQIZPhuFKON7Dh0xFNWEO7AzAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDA5MjQwNjAzMjFaFw0zMDA5MjIwNjAzMjFa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXbaYHsF2xGrK5cBDcmglRok/AMWCcK9n\npkZXPTp0IG0ton3ymR3MPkQmdaM2r/SgB6mLdeqvGbOR++A0d5ordKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgv4/KeWE5IHBe\naPsMw/1zyM5IiduLeFOiwQtdspNmj7IwCgYIKoZIzj0EAwIDSAAwRQIhAJIKngNQ\nSg6LYwF3IKNPlzQV4smJYVHhiJ2duJYelbCnAiAaZgQkPDJ/noDgaEaYSr1OQDJ0\nTNAFAC2ewt9H5qoObw==\n-----END -----\n" signature:"0D\002 n\357HA\236\3571o\336\215\334\362\341\354}?W\301\027\246=bn(\034J\246\213g\224KT\002 )\303\236\313\347c\003_C8\306\315<\367j\316\006\013\340iw\n\236l\000\244\000\257l\262\3459" > 
2020-09-24 06:04:44.726 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 00a Chaincode invoke successful. result: status:200 
2020-09-24 06:04:44.726 UTC [main] main -> INFO 00b Exiting.....
===================== Invoke transaction on PEER0 on channel 'mychannel' is successful ===================== 

Installing chaincode on org2/peer3...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2020-09-24 06:04:44.821 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:44.821 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:44.821 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:44.821 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:45.003 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:04:45.239 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:04:45.260 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A85070A5B08031A0B08FDEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:04:45.260 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: A67215B0359AC06B8937C654F6AC7CA853C6DBCBA9D4ACA38758FACAFD448734 
2020-09-24 06:04:45.280 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:04:45.280 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER3 ===================== 

Querying chaincode on org2/peer3...
===================== Querying on PEER3 on channel 'mychannel'... ===================== 
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
Attempting to Query PEER3 ...3 secs

2020-09-24 06:04:48.368 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:48.368 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:48.368 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:48.368 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:48.368 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C0880EEB0FB0510...6D7963631A0A0A0571756572790A0161 
2020-09-24 06:04:48.368 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 4A1E7EE3E79A10E47F765C9832AC153022C90FFFAECD020608AEBBD33CD2277B 
Query Result: 90
2020-09-24 06:05:07.907 UTC [main] main -> INFO 007 Exiting.....
===================== Query on PEER3 on channel 'mychannel' is successful ===================== 

===================== All GOOD, End-2-End execution completed ===================== 


 _____   _   _   ____            _____   ____    _____ 
| ____| | \ | | |  _ \          | ____| |___ \  | ____|
|  _|   |  \| | | | | |  _____  |  _|     __) | |  _|  
| |___  | |\  | | |_| | |_____| | |___   / __/  | |___ 
|_____| |_| \_| |____/          |_____| |_____| |_____|

2、手動測驗一下Fabric網路

我們仍然是以現在安裝好的Example02為例,在官方例子中,channel名字是mychannel,鏈碼的名字是mycc,我們首先進入CLI,我們重新打開一個命令列視窗,輸入:

docker exec -it cli bash

運行以下命令可以查詢a賬戶的余額:

peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'

在這里插入圖片描述
然后,我們試一試把a賬戶的余額再轉80元給b賬戶,運行命令:

peer chaincode invoke -o orderer.example.com:7050  --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem  -C mychannel -n mycc -c '{"Args":["invoke","a","b","80"]}'

運行結果如下圖:
在這里插入圖片描述
現在轉賬完畢, 我們試一試再查詢一下a賬戶的余額,沒問題的話,應該是只剩下10塊大洋了,我們看看實際情況:
在這里插入圖片描述
bingo,正如我們所愿,

3、關閉Fabric網路

最后我們要關閉Fabric網路,首先需要運行exit命令退出cli容器,關閉Fabric的命令與啟動類似,命令為:

cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli
./network_setup.sh down

程序如下:

halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh down
setting to default channel 'mychannel'
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
Stopping cli                    ... done
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping orderer.example.com    ... done
Stopping peer1.org2.example.com ... done
Stopping peer1.org1.example.com ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing orderer.example.com    ... done
Removing peer1.org2.example.com ... done
Removing peer1.org1.example.com ... done
Removing network e2ecli_default
49c35a7144ed
1757636a5f53
425fba1bd2d7
Untagged: dev-peer1.org2.example.com-mycc-1.0:latest
Deleted: sha256:9e7b2495f4433d5b0f5eb3a876f74a246cb37af919e5b47d567505ae77f83df4
Deleted: sha256:fd93b79a499dc6e372009449bfe7a913a8695941052467c1f63eb6b86a001786
Deleted: sha256:66d9b3022ef4fc06246be09a9dfe1afe493d6cecff955f77fa8ad583b1ecbbbf
Deleted: sha256:64ec50d0ff3b4c6f1eb678ddc8ec8c0866cf98f300a925175e964fa45090c930
Deleted: sha256:cb08a8077c6f7451b589da007ea0877f1bf7393fcf3f773e4907e7e0985890ef
Deleted: sha256:f53aee1e74e529c3af7bb8d5acb750bf00f85e27af7b49f47ff8095ff5c8d575
Deleted: sha256:fe91dc1cbc204858760cc561b545038d9d8b5965ffca853ece60a59deb7eba92
Untagged: dev-peer0.org1.example.com-mycc-1.0:latest
Deleted: sha256:107d6723dd0cd2633ecf004dc6612fca57709d2dba90a657d9072534a6477c9b
Deleted: sha256:bfc9fc6475aac3b7f446171b677a6554227a3e8a0c066d28c2af679c060a6e1d
Deleted: sha256:2a5d86ab68ff3d8b4fe320754f844daef9ad76e5b8a14ec1bd09f87570cd6165
Deleted: sha256:917f297dddfd0bb4fa50928e9a43a3eea526b3b985bcccda01bafdd3f4a1b90f
Deleted: sha256:f423d7575cb773000a2fbe0dca51aa215d00bd91d8fbb37c4c26378af8134813
Deleted: sha256:fa96f0e5805e6b00d2e95b6e798dfa7470fb7431855eed4399a22bc2fc270c0c
Deleted: sha256:6586cb10d4d95034a464d7dba9f2fe509bf80413e6c30ac3119330d92f20cb40
Untagged: dev-peer0.org2.example.com-mycc-1.0:latest
Deleted: sha256:8370b1cd876644e610eb2ff362f29c96538370f7d4f513e010801cfce3a63ace
Deleted: sha256:f2190cdc9c8235ab0d9f37975a71923c7fd498fa517533e527d87bbaddbbf4ea
Deleted: sha256:e5d2ead105e3246c0cdcc1be6c8ac78fb11d959564839a2b41c147962e37cbb4
Deleted: sha256:a592dd4f7d4346b5921d6dc7fd48652bfa70907e40e04942382cdd16329be9ef
Deleted: sha256:92bae31265fc9a8bbcf394328f7855a64ef8c13b1885e21015b5accc7b9e487c
Deleted: sha256:5b34425a5f4db01b75d04a1b4f9acd367a9378a5834f77b99c441df323d1e52b
Deleted: sha256:4298b29759ca67c745a5fca6da441dd2e74d1a4802159afd1fd001a354b33d73
halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ 

參考文章:

https://blog.csdn.net/jambeau/article/details/103712408
https://www.cnblogs.com/studyzy/p/7437157.html

寫在最后

感謝上面兩位大佬的貢獻,我個人在此基礎上進行了整合,自己也是排了很多雷,終于成功了,如果你覺得這篇文章對你有所幫助,關注微信公眾號半路猿,拉你進我們的學習交流群,一起學習,一同成長,

轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/127423.html

標籤:其他

上一篇:銀行與BitcoinSV:位元幣誠實的原始設計將帶來全新的商業機會

下一篇:從程式員到架構師,五年進階到阿里P7,說說我的經驗之談吧!!!

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 面試突擊第一季,第二季,第三季

    第一季必考 https://www.bilibili.com/video/BV1FE411y79Y?from=search&seid=15921726601957489746 第二季分布式 https://www.bilibili.com/video/BV13f4y127ee/?spm_id_fro ......

    uj5u.com 2020-09-10 05:35:24 more
  • 第三單元作業總結

    1.前言 這應該是本學期最后一次寫作業總結了吧。總體來說,對作業的節奏也差不多掌握了,作業做起來的效率也更高了。雖然和之前的作業一樣,作業中都要用到新的知識,但是相比之前,更加懂得了如何利用工具以及資料。雖然之間卡過殼,但總體而言,這幾次作業還算完成的比較好。 2.作業程序總結 相比前兩個單元,此單 ......

    uj5u.com 2020-09-10 05:35:41 more
  • 北航OO(2020)第四單元博客作業暨課程總結博客

    北航OO(2020)第四單元博客作業暨課程總結博客 本單元作業的架構設計 在本單元中,由于UML圖具有比較清晰的樹形結構,因此我對其中需要進行查詢操作的元素進行了包裝,在樹的父節點中存盤所有孩子的參考。考慮到性能問題,我采用了快取機制,一次查詢后盡可能快取已經遍歷過的資訊,以減少遍歷次數。 本單元我 ......

    uj5u.com 2020-09-10 05:35:48 more
  • BUAA_OO_第四單元

    一、UML決議器設計 ? 先看下題目:第四單元實作一個基于JDK 8帶有效性檢查的UML(Unified Modeling Language)類圖,順序圖,狀態圖分析器 MyUmlInteraction,實際上我們要建立一個有向圖模型,UML中的物件(元素)可能與同級元素連接,也可與低級元素相連形成 ......

    uj5u.com 2020-09-10 05:35:54 more
  • 6.1邏輯運算子

    邏輯運算子 1. && 短路與 運算式1 && 運算式2 01.運算式1為true并且運算式2也為true 整體回傳為true 02.運算式1為false,將不會執行運算式2 整體回傳為false 03.只要有一個運算式為false 整體回傳為false 2. || 短路或 運算式1 || 運算式2 ......

    uj5u.com 2020-09-10 05:35:56 more
  • BUAAOO 第四單元 & 課程總結

    1. 第四單元:StarUml檔案決議 本單元采用了圖模型決議UML。 UML檔案可以抽象為圖、子圖、邊的邏輯結構。 在實作中,圖的節點包括類、介面、屬性,子圖包括狀態圖、順序圖等。 采用了三次遍歷UML元素的方法建圖,第一遍遍歷建點,第二、三次遍歷設定屬性、連邊,實作圖物件的初始化。這里借鑒了一些 ......

    uj5u.com 2020-09-10 05:36:06 more
  • 談談我對C# 多型的理解

    面向物件三要素:封裝、繼承、多型。 封裝和繼承,這兩個比較好理解,但要理解多型的話,可就稍微有點難度了。今天,我們就來講講多型的理解。 我們應該經常會看到面試題目:請談談對多型的理解。 其實呢,多型非常簡單,就一句話:呼叫同一種方法產生了不同的結果。 具體實作方式有三種。 一、多載 多載很簡單。 p ......

    uj5u.com 2020-09-10 05:36:09 more
  • Python 資料驅動工具:DDT

    背景 python 的unittest 沒有自帶資料驅動功能。 所以如果使用unittest,同時又想使用資料驅動,那么就可以使用DDT來完成。 DDT是 “Data-Driven Tests”的縮寫。 資料:http://ddt.readthedocs.io/en/latest/ 使用方法 dd. ......

    uj5u.com 2020-09-10 05:36:13 more
  • Python里面的xlrd模塊詳解

    那我就一下面積個問題對xlrd模塊進行學習一下: 1.什么是xlrd模塊? 2.為什么使用xlrd模塊? 3.怎樣使用xlrd模塊? 1.什么是xlrd模塊? ?python操作excel主要用到xlrd和xlwt這兩個庫,即xlrd是讀excel,xlwt是寫excel的庫。 今天就先來說一下xl ......

    uj5u.com 2020-09-10 05:36:28 more
  • 當我們創建HashMap時,底層到底做了什么?

    jdk1.7中的底層實作程序(底層基于陣列+鏈表) 在我們new HashMap()時,底層創建了默認長度為16的一維陣列Entry[ ] table。當我們呼叫map.put(key1,value1)方法向HashMap里添加資料的時候: 首先,呼叫key1所在類的hashCode()計算key1 ......

    uj5u.com 2020-09-10 05:36:38 more
最新发布
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:20:47 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:20:25 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:20:17 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:20:10 more
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:19:44 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:19:07 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:18:57 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:18:49 more
  • 05單件模式

    #經典的單件模式 public class Singleton { private static Singleton uniqueInstance; //一個靜態變數持有Singleton類的唯一實體。 // 其他有用的實體變數寫在這里 //構造器宣告為私有,只有Singleton可以實體化這個類! ......

    uj5u.com 2023-04-19 08:42:51 more
  • 【架構與設計】常見微服務分層架構的區別和落地實踐

    軟體工程的方方面面都遵循一個最基本的道理:沒有銀彈,架構分層模型更是如此,每一種都有各自優缺點,所以請根據不同的業務場景,并遵循簡單、可演進這兩個重要的架構原則選擇合適的架構分層模型即可。 ......

    uj5u.com 2023-04-19 08:42:41 more