Hyperledger

본문 바로가기
사이트 내 전체검색


Hyperledger
Hyperledger

6. Hyperledger Fabric 네트워크 구축하기 (3)

페이지 정보

작성자 관리자 댓글 0건 조회 2,548회 작성일 19-08-28 09:28

본문

6. Hyperledger Fabric 네트워크 구축하기 (3)

42.PNG 

43.PNG 

44.PNG 

45.PNG 

46.PNG 

47.PNG 

root@client:~# cd testnet/
root@client:~/testnet# ls
Org0MSPanchors.tx  configtx.yaml  crypto-config       orderer.yaml
ch1.tx             core.yaml      crypto-config.yaml
root@client:~/testnet# vi create-channel.sh 

CORE_PEER_LOCALMSPID="Org0MSP" \
CORE_PEER_TLS_ROOTCERT_FILE=/root/testnet/crypto-config/peerOrganizations/org0/peers/peer0.org0/tls/ca.crt \
CORE_PEER_MSPCONFIGPATH=/root/testnet/crypto-config/peerOrganizations/org0/users/Admin@org0/msp \
CORE_PEER_ADDRESS=peer0:7051 \
peer channel create -o orderer0:7050 -c ch1 -f ch1.tx


root@client:~/testnet# chmod 777 create-channel.sh
root@client:~/testnet# ./create-channel.sh
2019-08-28 08:37:00.852 KST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-08-28 08:37:01.011 KST [cli/common] readBlock -> INFO 002 Got status: &{SERVICE_UNAVAILABLE}
2019-08-28 08:37:01.014 KST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-08-28 08:37:01.217 KST [cli/common] readBlock -> INFO 004 Got status: &{SERVICE_UNAVAILABLE}
2019-08-28 08:37:01.219 KST [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized
2019-08-28 08:37:01.424 KST [cli/common] readBlock -> INFO 006 Received block: 0
root@client:~/testnet# ls
Org0MSPanchors.tx  configtx.yaml      crypto-config
ch1.block          core.yaml          crypto-config.yaml
ch1.tx             create-channel.sh  orderer.yaml
root@client:~/testnet#
root@client:~/testnet# vi peer0-join.sh

export CORE_PEER_LOCALMSPID="Org0MSP"
export CORE_PEER_MSPCONFIGPATH=/root/testnet/crypto-config/peerOrganizations/org0/users/Admin@org0/msp
export CORE_PEER_ADDRESS=peer0:7051
peer channel join -b ch1.block

root@client:~/testnet# ls
Org0MSPanchors.tx  configtx.yaml      crypto-config       peer0-join.sh
ch1.block          core.yaml          crypto-config.yaml
ch1.tx             create-channel.sh  orderer.yaml
root@client:~/testnet# chmod 777 peer0-join.sh
root@client:~/testnet# ./peer0-join.sh
2019-08-28 09:16:38.356 KST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-08-28 09:16:38.464 KST [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
root@client:~/testnet#
root@client:~/testnet#
root@client:~/testnet# vi org0-anchor.sh

export CORE_PEER_LOCALMSPID="Org0MSP"
export CORE_PEER_MSPCONFIGPATH=/root/testnet/crypto-config/peerOrganizations/org0/users/Admin@org0/msp
export CORE_PEER_ADDRESS=peer0:7051
peer channel create -o orderer0:7050 -c ch1 -f Org0MSPanchors.tx

root@client:~/testnet# chmod 777 org0-anchor.sh
root@client:~/testnet# ./org0-anchor.sh
2019-08-28 09:25:11.386 KST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-08-28 09:25:11.578 KST [cli/common] readBlock -> INFO 002 Received block: 0
root@client:~/testnet#
root@client:~/testnet# 

 

 

peer0노드에서 하이퍼레저의 데이터 구조를 확인한다.

root@peer0:~# tree /var/hyperledger/
/var/hyperledger/
└── production
    ├── chaincodes
    └── ledgersData
        ├── bookkeeper
        │   ├── 000001.log
        │   ├── CURRENT
        │   ├── LOCK
        │   ├── LOG
        │   └── MANIFEST-000000
        ├── chains
        │   └── index
        │       ├── 000001.log
        │       ├── CURRENT
        │       ├── LOCK
        │       ├── LOG
        │       └── MANIFEST-000000
        ├── configHistory
        │   ├── 000001.log
        │   ├── CURRENT
        │   ├── LOCK
        │   ├── LOG
        │   └── MANIFEST-000000
        ├── historyLeveldb
        │   ├── 000001.log
        │   ├── CURRENT
        │   ├── LOCK
        │   ├── LOG
        │   └── MANIFEST-000000
        ├── ledgerProvider
        │   ├── 000001.log
        │   ├── CURRENT
        │   ├── LOCK
        │   ├── LOG
        │   └── MANIFEST-000000
        ├── pvtdataStore
        │   ├── 000001.log
        │   ├── CURRENT
        │   ├── LOCK
        │   ├── LOG
        │   └── MANIFEST-000000
        └── stateLeveldb
            ├── 000001.log
            ├── CURRENT
            ├── LOCK
            ├── LOG
            └── MANIFEST-000000

11 directories, 35 files
root@peer0:~# tree /var/hyperledger/
/var/hyperledger/
└── production
    ├── chaincodes
    ├── ledgersData
    │   ├── bookkeeper
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── chains
    │   │   ├── chains
    │   │   │   └── ch1
    │   │   │       └── blockfile_000000
    │   │   └── index
    │   │       ├── 000001.log
    │   │       ├── CURRENT
    │   │       ├── LOCK
    │   │       ├── LOG
    │   │       └── MANIFEST-000000
    │   ├── configHistory
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── historyLeveldb
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── ledgerProvider
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── pvtdataStore
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   └── stateLeveldb
    │       ├── 000001.log
    │       ├── CURRENT
    │       ├── LOCK
    │       ├── LOG
    │       └── MANIFEST-000000
    └── transientStore
        ├── 000001.log
        ├── CURRENT
        ├── LOCK
        ├── LOG
        └── MANIFEST-000000

14 directories, 41 files
root@peer0:~# tree /var/hyperledger/
/var/hyperledger/
└── production
    ├── chaincodes
    ├── ledgersData
    │   ├── bookkeeper
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── chains
    │   │   ├── chains
    │   │   │   └── ch1
    │   │   │       └── blockfile_000000
    │   │   └── index
    │   │       ├── 000001.log
    │   │       ├── CURRENT
    │   │       ├── LOCK
    │   │       ├── LOG
    │   │       └── MANIFEST-000000
    │   ├── configHistory
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── historyLeveldb
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── ledgerProvider
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   ├── pvtdataStore
    │   │   ├── 000001.log
    │   │   ├── CURRENT
    │   │   ├── LOCK
    │   │   ├── LOG
    │   │   └── MANIFEST-000000
    │   └── stateLeveldb
    │       ├── 000001.log
    │       ├── CURRENT
    │       ├── LOCK
    │       ├── LOG
    │       └── MANIFEST-000000
    └── transientStore
        ├── 000001.log
        ├── CURRENT
        ├── LOCK
        ├── LOG
        └── MANIFEST-000000

14 directories, 41 files
root@peer0:~#

댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.