国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

Hyperledger Fabric命令詳解之 up

newtrek / 1251人閱讀

摘要:創建網絡,,,執行中。。。通道上,向發送的交易,成功在上安裝鏈碼上鏈碼安裝成功請求上鏈碼。。。請求上鏈碼請求結果通道上,請求成功通道上,,請求成功拜占庭執行完成

sudo ./byfn.sh up
a@ubuntu:~/hyfa/fabric-samples/first-network$ sudo ./byfn.sh up

> 創建網絡,peer,orderer,cli

Starting with channel "mychannel" and CLI timeout of "10" seconds and CLI delay of "3" seconds
Continue? [Y/n] y

執行中。。。

proceeding ...

2018-07-10 01:55:17.481 UTC [main] main -> INFO 001 Exiting.....

LOCAL_VERSION=1.1.0

DOCKER_IMAGE_VERSION=1.1.0

創建網絡

Creating network "net_byfn" with the default driver

使用默認引擎,創建組織節點的volume

Creating volume "net_peer0.org2.example.com" with default driver

Creating volume "net_peer1.org2.example.com" with default driver

Creating volume "net_peer1.org1.example.com" with default driver

Creating volume "net_peer0.org1.example.com" with default driver

Creating volume "net_orderer.example.com" with default driver

創建節點,peer和指定oederer (.example.com是域名)

Creating peer0.org2.example.com

Creating peer1.org2.example.com

Creating peer1.org1.example.com

Creating orderer.example.com

Creating peer0.org1.example.com

創建cli

Creating cli


start


創建你的第一個拜占庭網絡,end-to-end 測試

Build your first network (BYFN) end-to-end test

Channel name : mychannel

> 創建通道

Creating channel...

peer TLS 根證書 文件

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

peer TLS KTY 文件

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

peer 本地msp ID

CORE_PEER_LOCALMSPID=Org1MSP

VM 端口

CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock

peer TLS 證書 文件

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

peer TLS 狀態

CORE_PEER_TLS_ENABLED=true

peer TLS 配置路徑

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp

peer ID

CORE_PEER_ID=cli

登陸 等級

CORE_LOGGING_LEVEL=INFO

peer 地址

CORE_PEER_ADDRESS=peer0.org1.example.com:7051

+peer channel create

-o orderer.example.com:7050

-c mychannel

-f ./channel-artifacts/channel.tx

--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

+res=0

+set +x

2018-07-10 01:55:27.536 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-07-10 01:55:27.637 UTC [main] main -> INFO 002 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=INFO

CORE_PEER_ADDRESS=peer0.org1.example.com:7051

+peer channel join -b mychannel.block

+res=0

+set +x

2018-07-10 01:55:27.705 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-07-10 01:55:27.870 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-07-10 01:55:27.870 UTC [main] main -> INFO 003 Exiting.....

peer0.org1 加入通道

===================== peer0.org1 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=INFO

CORE_PEER_ADDRESS=peer1.org1.example.com:7051

+peer channel join -b mychannel.block

+res=0

+set +x

2018-07-10 01:55:30.932 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-07-10 01:55:31.051 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-07-10 01:55:31.051 UTC [main] main -> INFO 003 Exiting.....

peer1.org1 加入通道

===================== peer1.org1 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=INFO

CORE_PEER_ADDRESS=peer0.org2.example.com:7051

+peer channel join -b mychannel.block

+res=0

+set +x

2018-07-10 01:55:34.140 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-07-10 01:55:34.299 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-07-10 01:55:34.299 UTC [main] main -> INFO 003 Exiting.....

peer0.org2 加入通道

===================== peer0.org2 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=INFO

CORE_PEER_ADDRESS=peer1.org2.example.com:7051

+peer channel join -b mychannel.block

+res=0

+set +x

INFO 001 Endorser 和 orderer 連接初始化完成

2018-07-10 01:55:37.360 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

INFO 002 成功提交請求(請求加入通道)

2018-07-10 01:55:37.468 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

INFO 003 退出中。。

2018-07-10 01:55:37.468 UTC [main] main -> INFO 003 Exiting.....

peer1.org2加入通道

===================== peer1.org2 joined on the channel "mychannel" =====================

更新org1 的anchor節點

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=INFO

CORE_PEER_ADDRESS=peer0.org1.example.com:7051

+peer channel update

-o orderer.example.com:7050

-c mychannel

-f ./channel-artifacts/Org1MSPanchors.tx

--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

+res=0

+set +x

INFO 001 , Endorser 和 orderer 連接 初始化完成

2018-07-10 01:55:40.523 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

INFO 002 成功提交提交通道更新

2018-07-10 01:55:40.537 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update

INFO 003 退出中。。

2018-07-10 01:55:40.537 UTC [main] main -> INFO 003 Exiting.....

通道上Org1MSP 的anchor節點 更新成功

===================== Anchor peers for org "Org1MSP" on "mychannel" is updated successfully =====================

更新org2 的anchor節點。。。

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=INFO

CORE_PEER_ADDRESS=peer0.org2.example.com:7051

+peer channel update

-o orderer.example.com:7050

-c mychannel

-f ./channel-artifacts/Org2MSPanchors.tx

--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

+res=0

+set +x

2018-07-10 01:55:43.745 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-07-10 01:55:43.766 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update

2018-07-10 01:55:43.766 UTC [main] main -> INFO 003 Exiting.....

通道中的org2MSP 的anchor節點 更新成功

===================== Anchor peers for org "Org2MSP" on "mychannel" is updated successfully =====================


安裝鏈碼到peer0.org1

Installing chaincode on peer0.org1...

+peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/

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=INFO

CORE_PEER_ADDRESS=peer0.org1.example.com:7051

+res=0

+set +x

INFO 001,使用默認escc

2018-07-10 01:55:46.900 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

INFO 002,使用默認vscc

2018-07-10 01:55:46.900 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

INFO 003 退出。。。

2018-07-10 01:55:48.856 UTC [main] main -> INFO 003 Exiting.....

peer0.org1 上鏈碼,安裝成功

===================== Chaincode is installed on peer0.org1 =====================

在peer0.org2 上安裝鏈碼

Install chaincode on peer0.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=INFO

CORE_PEER_ADDRESS=peer0.org2.example.com:7051

節點鏈碼安裝 --注意格式 -n鏈碼 -v版本號 -l語言 -p

+peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/

+res=0

+set +x

2018-07-10 01:55:48.956 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-07-10 01:55:48.956 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-07-10 01:55:49.125 UTC [main] main -> INFO 003 Exiting.....

peer0.org2 上鏈碼安裝成功

===================== Chaincode is installed on peer0.org2 =====================


實例化 peer0.org2上的鏈碼。。。

Instantiating chaincode on peer0.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=INFO
CORE_PEER_ADDRESS=peer0.org2.example.com:7051

節點鏈碼實例化--注意格式 -o --tls --cafile -C -n -l -c

+peer chaincode instantiate

-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

-l golang -v 1.0

-c "{"Args":["init","a","100","b","200"]}" -P "OR ("""Org1MSP.peer""","""Org2MSP.peer""")"

+res=0

+set +x

2018-07-10 01:55:49.315 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-07-10 01:55:49.315 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-07-10 01:56:26.781 UTC [main] main -> INFO 003 Exiting.....

通道上 peer0.org2 鏈碼實例化成功

===================== Chaincode Instantiation on peer0.org2 on channel "mychannel" is successful =====================


請求 peer0.org1 。。。

Querying chaincode on peer0.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=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051

在通道上,請求 peer0.org1

===================== Querying on peer0.org1 on channel "mychannel"... =====================

節點鏈碼請求-注意格式-C通道 -n鏈碼 -c參數

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

Attempting to Query peer0.org1 ...3 secs

+res=0

+set +x

2018-07-10 01:56:30.181 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-07-10 01:56:30.181 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

請求結果:100

Query Result: 100

2018-07-10 01:57:05.171 UTC [main] main -> INFO 003 Exiting.....

通道上,向peer0.org1的請求成功

===================== Query on peer0.org1 on channel "mychannel" is successful =====================


鏈碼調用,發送交易到peer0.org1。。。

Sending invoke transaction on peer0.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=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051

+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","10"]}"

+res=0

+set +x

2018-07-10 01:57:06.763 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-07-10 01:57:06.763 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

鏈碼調用or請求,INFO 003,鏈碼調用:成功,結果狀態碼:200

2018-07-10 01:57:06.835 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200

INFO 004 退出。。。

2018-07-10 01:57:06.835 UTC [main] main -> INFO 004 Exiting.....

通道上,向peer0.org1發送的交易invoke,成功

===================== Invoke transaction on peer0.org1 on channel "mychannel" is successful =====================


在peer1.org2上安裝鏈碼

Installing chaincode on peer1.org2...

+peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/

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=INFO
CORE_PEER_ADDRESS=peer1.org2.example.com:7051

+res=0

+set +x

2018-07-10 01:57:06.953 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-07-10 01:57:06.954 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-07-10 01:57:08.024 UTC [main] main -> INFO 003 Exiting.....

peer1.org2上鏈碼安裝成功

===================== Chaincode is installed on peer1.org2 =====================

請求 peer1.org2上 鏈碼。。。

Querying chaincode on peer1.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=INFO
CORE_PEER_ADDRESS=peer1.org2.example.com:7051

請求peer1.org2上鏈碼

===================== Querying on peer1.org2 on channel "mychannel"... =====================

+peer chaincode query -C mychannel -n mycc -c "{"Args":["query","a"]}"
Attempting to Query peer1.org2 ...3 secs

+res=0

+set +x

2018-07-10 01:57:11.240 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-07-10 01:57:11.240 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

請求結果:90

Query Result: 90

2018-07-10 01:57:43.272 UTC [main] main -> INFO 003 Exiting.....

通道上,peer1.org2請求成功

通道上,peer1.org2,請求成功

===================== Query on peer1.org2 on channel "mychannel" is successful =====================

拜占庭執行完成

========= All GOOD, BYFN execution completed ===========


end


文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/24194.html

相關文章

  • Hyperledger Fabric 命令詳解“ generate ”

    摘要:利用生成證書生成創世區塊下載下載下載生成創世區塊寫入創世區塊創建通道配置交易下載配置生成交易配置下載下載寫入通道交易更新,生成錨節點 sudo ./byfn.sh -m generate a@ubuntu:~/hyfa/fabric-samples/first-network$ sudo ./byfn.sh -m generate Generating certs and gene...

    qiangdada 評論0 收藏0
  • Hyperledger Fabric(構建你的第一個網絡)

    摘要:構建你的第一個網絡方案提供了一個包含兩個組織的示例網絡,每個組織維護兩個對等節點,以及一個獨立排序服務。它還將啟動一個容器來運行腳本執行,該執行將對等點連接到一個通道,部署和實例化鏈碼并驅動針對部署的鏈碼執行交易。 構建你的第一個網絡 這些說明已經過驗證,可以與最新的穩定Docker鏡像和提供的tar文件中預編譯的安裝實用程序一起工作,如果使用當前主分支中的鏡像或工具運行這些命令,則可...

    XUI 評論0 收藏0
  • Hyperledger Fabric 命令詳解 down

    摘要:停止客戶端停止節點,和刪除客戶端刪除和刪除網絡刪除節點容器檢查網絡檢查容器刪除刪除刪除自動化腳本會將生成的文件一起刪掉所以,如果需要保留文件的話需要手動刪除 ./bash.sh down a@ubuntu:~/hyfa/fabric-samples/first-network$ sudo ./byfn.sh down [sudo] password for a: Stopping w...

    jonh_felix 評論0 收藏0
  • 基于ubuntu16.04部署IBM開源區塊鏈項目-彈珠資產管理(Marbles)

    摘要:協議的細節由一個名為的處理。運行下面的腳本來讓所有的事情都發生一兩分鐘后,命令提示符將返回運行結果如下圖所示現在運行該命令查看當前正在運行的容器。 showImg(https://segmentfault.com/img/bVbazHF?w=709&h=159); 前言 本教程基本上是對Marbles項目的翻譯過程. 如果英文比較好的話,建議根據官方操作說明,一步步進行環境部署。當然你...

    voidking 評論0 收藏0
  • 聯盟鏈初識以及Fabric環境搭建流程

    摘要:本文首發于深入淺出區塊鏈社區原文鏈接聯盟鏈初識以及環境搭建流程原文已更新,請讀者前往原文閱讀這篇文章首先簡單介紹了聯盟鏈是什么,再詳細的介紹了環境搭建的整個流程。 本文首發于深入淺出區塊鏈社區原文鏈接:聯盟鏈初識以及Fabric環境搭建流程原文已更新,請讀者前往原文閱讀 這篇文章首先簡單介紹了聯盟鏈是什么,再詳細的介紹了Fabric環境搭建的整個流程。 區塊鏈分類: 以參與方式分類,區...

    CoffeX 評論0 收藏0

發表評論

0條評論

newtrek

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<