leader peer 是peer之間動態選舉選出的
endorsing peer 預設為每個peer都是,安裝chaincode後,實例化設定policy可以有變化
committing peer 預設為每個peer都是
https://medium.com/@kctheservant/transactions-in-hyperledger-fabric-50e068dda8a9
https://stackoverflow.com/questions/52893818/difference-between-endorsing-peer-and-committing-peer-in-hyperledger-fabric/52894994
Hyperledger Hurley is the development environment toolset
https://github.com/worldsibu/hurley#readme
[轉]Hyperledger Composer is deprecated
https://hackernoon.com/hyperledger-composer-is-deprecated-kuzqu31cb
Hyperledger KC Tam
https://medium.com/@kctheservant
http://www.ledgertech.biz/kcarticles.html
===========
https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorials.html
http://www.ledgertech.biz/kcarticles.html
===========
https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorials.html
[轉]Hyperledger Fabric BYFN之配置進階篇
https://www.itread01.com/content/1550412200.html
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允許停止和重啟。
這自然是有的,但是必須開啟orderer, peer等的持久化配置。
...........
7051是Peer啟動的gRPC, 一般是客戶端應用接入。
7053是事件埠(Peer Event)
..........
Fabric 1.1之後peer event做了完全不同的設計,訊息的監聽不在peer節點了,而是基於channel,這樣設計提供了對Peer資料更細粒度的採訪控制和提供了接收訊息的可靠性。(官方文件是這麼扯,我也有點疑惑) 主要提供兩種服務,Deliver(通知提交到記賬本的整個區塊內容) 和DeliverFiltered(過濾一些區塊減少訊息通知返回的區塊大小)
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(過濾一些區塊減少訊息通知返回的區塊大小)
[DIY] HyperLedger
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' ============================== All GOOD, BYFN execution completed ===========
5. check docker ps Need like this
PS:
1. See Error
2019-11-06 02:22:34.819 UTC [main] InitCmd -> ERRO 001 Cannot run peer because cannot init crypto, folder "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" does not exist
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
How to Fix
cd fabric-samples/first-network
./byfn.sh down
./byfn.sh generate #This maybe don't need
./byfn.sh up
6. How to querying chaincode again
https://learnblockchain.cn/2019/07/03/chaincode-run/
docker exec -it cli bash
root@73e65944cade:/opt/gopath/src/github.com/hyperledger/fabric/peer>
root@73e65944cade:/opt/gopath/src/github.com/hyperledger/fabric/peer> peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
# peer chaincode query This command come from e2etest that you first time See This message:
========= All GOOD, BYFN execution completed ===========
Then just find screen up, can see "peer chaincode query ooxxooxxooxx". Please copy it then use in here.
Helm charts for running and operating Hyperledger Fabric in Kubernetes
https://github.com/apggroeifabriek/pivt
hyperledger crypetogen
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/cryptogen.html
cryptogen is an utility for generating Hyperledger Fabric key material. It is provided as a means of preconfiguring a network for
cryptogen is an utility for generating Hyperledger Fabric key material. It is provided as a means of preconfiguring a network for
testing purposes
. It would normally not be used in the operation of a production network.hyperledger Ansible
https://ibmcode-staging.us-east.containers.mybluemix.net/announcements/provision-hyperledger-fabric-on-multiple-vms-using-ansible/
https://github.com/hyperledger-labs/fabric-vms-provision
https://github.com/hyperledger/cello/tree/master/src/agent/ansible
https://cello.readthedocs.io/en/latest/tutorial/
https://github.com/hyperledger-labs/fabric-vms-provision
https://github.com/hyperledger/cello/tree/master/src/agent/ansible
https://cello.readthedocs.io/en/latest/tutorial/
hypderledger composer
https://hyperledger.github.io/composer/
https://www.mchampaneri.in/2018/03/setup-development-environment-for.html
https://www.codementor.io/hajsf/install-hyperledger-fabric-at-win-10-tb85r9dqg
https://medium.com/beyondi/setup-and-build-hyperledger-fabric-blockchain-applications-b7c476f9cef2
https://mindf.org/setting-up-ubuntu-18-04-on-virtualbox-for-hyperledger-fabric/
https://www.mchampaneri.in/2018/03/setup-development-environment-for.html
https://www.codementor.io/hajsf/install-hyperledger-fabric-at-win-10-tb85r9dqg
https://medium.com/beyondi/setup-and-build-hyperledger-fabric-blockchain-applications-b7c476f9cef2
https://mindf.org/setting-up-ubuntu-18-04-on-virtualbox-for-hyperledger-fabric/
訂閱:
文章 (Atom)
