參考 [轉] Hyperledger Fabric 1.2系列 -- 将组织添加进通道: 手动执行
https://www.jianshu.com/p/09c67924da90
https://www.jianshu.com/p/09c67924da90
https://www.itread01.com/content/1550412200.html 1. byfn.sh up down會清理所有容器映象,生成的配置檔案和證書,現實場景應該可以停止或恢復區塊鏈網路,該如何處理? byfn.sh down會呼叫networkdDown去銷燬整個網路和已生成的配置。byfn.sh restart則不會清理。 ……….. 注意 docker-compose down會停止和刪除容器,網路,映象和對映的卷。 只是停止服務的話的會最好使用docker-compose stop。 docker-compose up則是建立和啟動容器服務, 這裡用於啟動。 我們也可以參考例子fabric-samples/fabcar, 它會重用fabric-samples/basic-network中的start.sh, stop.sh允許停止和重啟。 2. byfn.sh還是fabcar兩個例子即使重啟區塊鏈網路,通道需要創新建立,節點需要重新加入通道,鏈碼也要全要重新安裝,如果節點多維護起來就麻煩且費時,重啟的時候能讓通道,節點,鏈碼,State DB自動恢復? 這自然是有的,但是必須開啟orderer, peer等的持久化配置。 ……….. orderer.example.com: ... - /mnt/hyperledger/orderer:/var/hyperledger/production/orderer peer0.org1.example.com: ... - /mnt/hyperledger/org1/peer0:/var/hyperledger/production couchdb: ... - /mnt/hyperledger/couchdb:/opt/couchdb/data 4. Peer節點我們配置了兩個埠,配置用來做什麼? ports: - 7051:7051 - 7053:7053 7051是Peer啟動的gRPC, 一般是客戶端應用接入。 7053是事件埠(Peer Event) ………. Fabric 1.1之後peer event做了完全不同的設計,訊息的監聽不在peer節點了,而是基於channel,這樣設計提供了對Peer資料更細粒度的採訪控制和提供了接收訊息的可靠性。(官方文件是這麼扯,我也有點疑惑) 主要提供兩種服務,Deliver(通知提交到記賬本的整個區塊內容) 和DeliverFiltered(過濾一些區塊減少訊息通知返回的區塊大小)
1. Use docker-machine crate docker vm. And install docker-compose. 2. https://github.com/hyperledger/fabric-samples # Fetch bootstrap.sh from fabric repository using curl -sS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh -o ./scripts/bootstrap.sh # Change file mode to executable chmod +x ./scripts/bootstrap.sh # Download binaries and docker images #./scripts/bootstrap.sh [version] [ca version] [thirdparty_version] ./scripts/bootstrap.sh Here use all default value. 3. https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html # Start Run cd fabric-samples/first-network ./byfn.sh generate ./byfn.sh up 4. Hope you see ===================== Query successful on peer1.org2 on channel ‘mychannel’ ===================== ...
https://zhuanlan.zhihu.com/p/35683522
https://github.com/apggroeifabriek/pivt