{"id":13714157,"url":"https://github.com/blewater/pifabric","last_synced_at":"2025-08-03T09:09:07.635Z","repository":{"id":57653707,"uuid":"242367746","full_name":"blewater/pifabric","owner":"blewater","description":"Sample temperature and humidity sensor readings with a smart contract (chaincode) to work with Raspberry-Pi4 utilizing Hyperledger Fabric Blockchain v1.4.4 on latest high performing Linux 64-bit ARM Kernel 5.3.0-1018-raspi2 for 64-bit ARMv8 CPU on Ubuntu 19.10","archived":false,"fork":false,"pushed_at":"2020-03-01T02:01:21.000Z","size":56114,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T17:46:34.152Z","etag":null,"topics":["chaincode","docker-images","go","golang","humidity-sensor-readings","hyperledger-fabric","raspberry-pi","raspberry-pi-3","raspberry-pi-4","sample-temperature","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blewater.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-22T15:49:49.000Z","updated_at":"2023-10-24T05:35:07.000Z","dependencies_parsed_at":"2022-08-26T06:41:51.073Z","dependency_job_id":null,"html_url":"https://github.com/blewater/pifabric","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blewater/pifabric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blewater%2Fpifabric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blewater%2Fpifabric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blewater%2Fpifabric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blewater%2Fpifabric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blewater","download_url":"https://codeload.github.com/blewater/pifabric/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blewater%2Fpifabric/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268519123,"owners_count":24263048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaincode","docker-images","go","golang","humidity-sensor-readings","hyperledger-fabric","raspberry-pi","raspberry-pi-3","raspberry-pi-4","sample-temperature","ubuntu"],"created_at":"2024-08-02T23:01:53.670Z","updated_at":"2025-08-03T09:09:07.613Z","avatar_url":"https://github.com/blewater.png","language":"Makefile","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# Hyperledger Fabric Chaincode for 64-bit Raspberry-Pi4 and Pi3\n\n*For an introduction to the motivation and existence of this repository, you may read a [pdf report describing this Blockchain project](PROGRAMMING_THE_FABRIC_BLOCKCHAIN_ON_RASPBERRY_PI4.pdf)*\n\nBatteries included: utilize the prepared Fabric [Docker Images](https://hub.docker.com/r/blewater).\n\nIf you would rather build the Docker images yourself, I have you got you covered with a helpful, detailed Fabric v1.4.4 Docker Images [building guide for Ubuntu 19.10](buildfabric.md).\n\nSample temperature and humidity sensor readings with a Fabric smart contract on latest high performing Linux 64-bit arm64v8 kernel 5.3.0-1018-raspi2 aarch64 on Ubuntu 19.10\n\n## Getting Started\n\nYou need the following gadgets:\n\n* A Raspberry Pi4. Edition with 4Gig Ram. \n* A kit or separatedly case and power adaptor. \n* A breadboard\n* A [DHT22 temperature/humidity sensor](https://thepihut.com/products/dht22-temperature-and-humidity-sensor). The DHT-22 sensor readily available at a low cost, features a humidity range of 0 to 100%RH with a ±2% and temperature range of -40 to 80℃ with a ±0.5%.\n* 10+ [dupont wire 20cm male to female](https://www.amazon.com/EDGELEC-Breadboard-Optional-Assorted-Multicolored/dp/B07GD1XFWV/ref=sr_1_3?keywords=dupont+wire+20cm+male+to+female\u0026qid=1582390213\u0026sr=8-3)\n* An HDMI monitor\n* A plain keyboard, wireless preferred integrated with a mouse, e.g., Logitech. Later you may utilize ssh. [Logitech](https://www.amazon.com/Logitech-920-004090-Wireless-Keyboard-K360/dp/B00822GICW/ref=pd_sbs_147_img_2/142-3858854-6761000?_encoding=UTF8\u0026pd_rd_i=B00822GICW\u0026pd_rd_r=c2c5a593-dd7d-49bc-824f-1c25a154702c\u0026pd_rd_w=KqxJf\u0026pd_rd_wg=6ABHf\u0026pf_rd_p=5cfcfe89-300f-47d2-b1ad-a4e27203a02a\u0026pf_rd_r=QC900D6VD4323GA75PH5\u0026psc=1\u0026refRID=QC900D6VD4323GA75PH5). Later you may utilize ssh.\n* A standard ethernet cable. You may also utilize the embedded wifi adapter with great results in Ubuntu.\nA high performing [SD card with at least 32Gig](https://www.amazon.com/SanDisk-64GB-Extreme-UHS-I-SDSDXXY-064G-GN4IN/dp/B07H9J1YXN/ref=sr_1_3?crid=3T9H0M95H6N0B\u0026keywords=sd+card+64gb\u0026qid=1582390672\u0026sprefix=sd+card%2Caps%2C308\u0026sr=8-3).\n\n### Connect the DHT-22 sensor on the Pi4 GPIO connector\nThere are multiple easy guides to follow to connect the DHT-22 to the GPIO interface of the Pi-4 board. I followed this [guide](https://www.deviceplus.com/raspberry-pi/geekcraft-easy-raspberry-pi-humidity-temperature-sensor/), applying the **signal** connection to the GPIO position BCM24/Board18 (note your position later if you change the selected pin in the golang sampling application), but there are other Pin possibilities allowed by the redundancy of the GPIO.\n\n### Place the Ubuntu 19.10 image on SD card.\nFollow the instructions to [install \\*64bit Ubuntu 19.10.](https://ubuntu.com/download/raspberry-pi/thank-you?version=19.10.1\u0026architecture=arm64+raspi3)\n*Please note Hyperledger Fabric requires 64bit OS which excludes the Raspbian OS.\n\nLogin to Ubuntu:\n\n  user: ubuntu\n  \n  pwd: ubuntu\n*You are forced later to change your password :)\n\n### Software installation\n* Ubuntu updates\nRefer to answers https://askubuntu.com/questions/196768/how-to-install-updates-via-command-line\n\n* sudo reboot\n\n* login\n\n* run uname -a\n\n*(at the time of this writeup the latest Linux ARM kernel is 5.3.0-1018-raspi2)*\n\n* Optionally, you may follow a Ubuntu guide to set a static IP address and SSH access by public key. \n\nRefer to /etc/netplan apply, ssh-copy-id\n  \n* Install **docker** Run these commands:\n```\nsudo \ninstall docker\n\nsudo groupadd docker\n\nsudo usermod -aG docker ${USER}\n\nlogout\n\nlogin\n\ndocker run hello-world \n# should download and run the hello-world image without requiring sudo access\n\ndocker-compose version\n# displays version 1.23.2+\n```\n* install go language compiler/linker binaries\n```\nsudo snap install --channel=1.11/stable go --classic\n\nnano ~/.bashrc\n\n# add the following last line\nexport GOPATH=~/go\n\n# save \u0026 exit\nsource ~/.bashrc\n\n# retrieve the golang chaincode shim useful later\ngo get -u github.com/hyperledger/fabric/core/chaincode/shim\n\nsudo go version\ngo version go1.11.13 linux/arm64\n```\n\n### Access essential repositories\n\n```\nmkdir -p ~/go/src/github.com/hyperledger/\ncd ~/go/src/github.com/hyperledger/\n\n# download the repo of this page\ngit clone https://github.com/blewater/pifabric\n\n# retrieve the fabric-samples we use\ngit clone https://github.com/hyperledger/fabric-samples\n\n# retrieve the chaincode shim useful later\ngo get -u github.com/hyperledger/fabric/core/chaincode/shim\n\n# go to this repo's cloned local folder\ncd pifabric\n\n```\n\n### Connect the DHT22 sensor on the Pi4 GPIO board\nWhile\n\n### Install a C DHT22 raspberry lib\n#### Ref http://www.airspayce.com/mikem/bcm2835/\n```\ntar zxvf bcm2835-1.62.tar.gz\n\ncd bcm2835-1.62\n\n./configure\n\nmake\n# make sure the check returns good results \nsudo make check\n\nPASS: test\n============================================================================\nTestsuite summary for bcm2835 1.62\n============================================================================\n# TOTAL: 1\n# PASS:  1\n# SKIP:  0\n# XFAIL: 0\n# FAIL:  0\n# XPASS: 0\n# ERROR: 0\n============================================================================\n\nsudo make install\n\nMaking install in src\nmake[1]: Entering directory '/home/p/unic/bcm2835-1.62/src'\nmake[2]: Entering directory '/home/p/unic/bcm2835-1.62/src'\n /usr/bin/mkdir -p '/usr/local/lib'\n /usr/bin/install -c -m 644  libbcm2835.a '/usr/local/lib'\n ( cd '/usr/local/lib' \u0026\u0026 ranlib libbcm2835.a )\n /usr/bin/mkdir -p '/usr/local/include'\n /usr/bin/install -c -m 644 bcm2835.h '/usr/local/include'\nmake[2]: Leaving directory '/home/p/unic/bcm2835-1.62/src'\nmake[1]: Leaving directory '/home/p/unic/bcm2835-1.62/src'\nMaking install in doc\nmake[1]: Entering directory '/home/p/unic/bcm2835-1.62/doc'\nmake[2]: Entering directory '/home/p/unic/bcm2835-1.62/doc'\nmake[2]: Nothing to be done for 'install-exec-am'.\nmake[2]: Nothing to be done for 'install-data-am'.\nmake[2]: Leaving directory '/home/p/unic/bcm2835-1.62/doc'\nmake[1]: Leaving directory '/home/p/unic/bcm2835-1.62/doc'\nmake[1]: Entering directory '/home/p/unic/bcm2835-1.62'\nmake[2]: Entering directory '/home/p/unic/bcm2835-1.62'\nmake[2]: Nothing to be done for 'install-exec-am'.\nmake[2]: Nothing to be done for 'install-data-am'.\nmake[2]: Leaving directory '/home/p/unic/bcm2835-1.62'\nmake[1]: Leaving directory '/home/p/unic/bcm2835-1.62'\n\n# now we are ready to install the go wrapper\ngo get -u github.com/gerp/dht22\n# github.com/gerp/dht22\nIn file included from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,\n                 from /usr/include/stdlib.h:25,\n                 from _cgo_export.c:3:\n/usr/include/features.h:185:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n  185 | # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n      |   ^~~~~~~\n# github.com/gerp/dht22\nIn file included from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,\n                 from /usr/include/stdlib.h:25,\n                 from _cgo_export.c:3:\n/usr/include/features.h:185:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n  185 | # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n      |   ^~~~~~~\n# github.com/gerp/dht22\nIn file included from /usr/include/errno.h:25,\n                 from cgo-gcc-prolog:28:\n/usr/include/features.h:185:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n  185 | # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n      |   ^~~~~~~\n# github.com/gerp/dht22\nIn file included from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,\n                 from /usr/include/stdio.h:27,\n                 from dht22.c:1:\n/usr/include/features.h:185:3: warning: #warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\" [-Wcpp]\n  185 | # warning \"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE\"\n      |   ^~~~~~~\n\n# test our sample program\ncd ../\nsudo -E go run sample.go\n\n# if successful results in \nTemperature: 25.3C, Humidity: 40.9%\n```\n### Getting Ready to work with Fabric\n```\n# download raspberrypi Docker images\n./get-images.sh\n\n# check images for a similar result as this\ndocker images\nREPOSITORY                     TAG                         IMAGE ID            CREATED             SIZE\nblewater/fabric-ca             latest                      1f5796cac18c        19 hours ago        177MB\nhyperledger/fabric-ca          latest                      1f5796cac18c        19 hours ago        177MB\nblewater/fabric-tools          latest                      f82fe2f8d301        20 hours ago        1.49GB\nhyperledger/fabric-tools       latest                      f82fe2f8d301        20 hours ago        1.49GB\nblewater/fabric-buildenv       latest                      1d0ccc3dfc1a        20 hours ago        1.43GB\nhyperledger/fabric-buildenv    latest                      1d0ccc3dfc1a        20 hours ago        1.43GB\nblewater/fabric-ccenv          latest                      968779ee5bb2        20 hours ago        1.4GB\nhyperledger/fabric-ccenv       latest                      968779ee5bb2        20 hours ago        1.4GB\nblewater/fabric-orderer        latest                      76e57fc8518c        20 hours ago        111MB\nhyperledger/fabric-orderer     latest                      76e57fc8518c        20 hours ago        111MB\nblewater/fabric-peer           latest                      9b02746c9cf4        20 hours ago        118MB\nhyperledger/fabric-peer        latest                      9b02746c9cf4        20 hours ago        118MB\nblewater/fabric-zookeeper      latest                      969207ec1a59        21 hours ago        497MB\nhyperledger/fabric-zookeeper   latest                      969207ec1a59        21 hours ago        497MB\nblewater/fabric-kafka          latest                      3819183d7baa        21 hours ago        491MB\nhyperledger/fabric-kafka       latest                      3819183d7baa        21 hours ago        491MB\nblewater/fabric-couchdb        latest                      16dd2c814964        21 hours ago        246MB\nhyperledger/fabric-couchdb     latest                      16dd2c814964        21 hours ago        246MB\nblewater/fabric-baseimage      latest                      fd1c6de7680f        22 hours ago        1.34GB\nhyperledger/fabric-baseimage   latest                      fd1c6de7680f        22 hours ago        1.34GB\nblewater/fabric-baseos         latest                      2954a8577995        24 hours ago        78.6MB\nhyperledger/fabric-baseos      latest                      2954a8577995        24 hours ago        78.6MB\n\n# now copy Fabric raspberry binaries built in the fabric-tools Docker image\n# ease they are also included in this repo\nchmod +x ./bin/*\nchmod +x *.sh\nsudo cp ./bin/* /usr/local/bin\n```\n\n### Start an one organization network blockchain\n```\ncd ../fabric-samples/basic-network\n\n# generate static cryptographic material\n./generate.sh\n\n# a successful invocation should output this\n2020-02-23 21:06:20.537 UTC [common.tools.configtxgen] main -\u003e INFO 001 Loading configuration\n2020-02-23 21:06:20.544 UTC [common.tools.configtxgen.localconfig] Load -\u003e INFO 002 Loaded configuration: /home/p/go/src/github.com/hyperledger/fabric-samples/basic-network/configtx.yaml\n2020-02-23 21:06:20.550 UTC [common.tools.configtxgen.localconfig] completeInitialization -\u003e INFO 003 orderer type: solo\n2020-02-23 21:06:20.550 UTC [common.tools.configtxgen.localconfig] LoadTopLevel -\u003e INFO 004 Loaded configuration: /home/p/go/src/github.com/hyperledger/fabric-samples/basic-network/configtx.yaml\n2020-02-23 21:06:20.550 UTC [common.tools.configtxgen] doOutputAnchorPeersUpdate -\u003e INFO 005 Generating anchor peer update\n2020-02-23 21:06:20.550 UTC [common.tools.configtxgen] doOutputAnchorPeersUpdate -\u003e INFO 006 Writing anchor peer update\n\n# now start the network\n./start.sh\n\n# check for the final result of joining a channel\n\nCreating network \"net_basic\" with the default driver\nCreating orderer.example.com ... done\nCreating ca.example.com      ... done\nCreating couchdb             ... done\nCreating peer0.org1.example.com ... done\ndocker ps -a\nCONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS                     PORTS                                            NAMES\n28cbda73124c        hyperledger/fabric-peer      \"peer node start\"        4 seconds ago       Up Less than a second      0.0.0.0:7051-\u003e7051/tcp, 0.0.0.0:7053-\u003e7053/tcp   peer0.org1.example.com\ndb02bf6cc6c7        hyperledger/fabric-couchdb   \"tini -- /docker-ent…\"   8 seconds ago       Up 3 seconds               4369/tcp, 9100/tcp, 0.0.0.0:5984-\u003e5984/tcp       couchdb\nbf4b1e70900e        hyperledger/fabric-ca        \"sh -c 'fabric-ca-se…\"   8 seconds ago       Exited (1) 2 seconds ago                                                    ca.example.com\nf3622bdd58f6        hyperledger/fabric-orderer   \"orderer\"                8 seconds ago       Up 4 seconds               0.0.0.0:7050-\u003e7050/tcp                           orderer.example.com\n\n# wait for Hyperledger Fabric to start\n# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=\u003clarger number\u003e\nexport FABRIC_START_TIMEOUT=10\n#echo ${FABRIC_START_TIMEOUT}\nsleep ${FABRIC_START_TIMEOUT}\n\n# Create the channel\ndocker exec -e \"CORE_PEER_LOCALMSPID=Org1MSP\" -e \"CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp\" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx\n2020-02-23 21:12:25.431 UTC [channelCmd] InitCmdFactory -\u003e INFO 001 Endorser and orderer connections initialized\n2020-02-23 21:12:25.534 UTC [cli.common] readBlock -\u003e INFO 002 Received block: 0\n# Join peer0.org1.example.com to the channel.\ndocker exec -e \"CORE_PEER_LOCALMSPID=Org1MSP\" -e \"CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp\" peer0.org1.example.com peer channel join -b mychannel.block\n2020-02-23 21:12:26.326 UTC [channelCmd] InitCmdFactory -\u003e INFO 001 Endorser and orderer connections initialized\n2020-02-23 21:12:26.712 UTC [channelCmd] executeJoin -\u003e INFO 002 Successfully submitted proposal to join channel\n```\n\n### Groundwork for the chaincode run\n```\n# launch the fabric-tools container for chaincode interaction\ndocker-compose up -d cli\n# look for \"Creating cli ... done\"\n```\n\n### Getting to the chaincodes\n```\n# copy chaincode into peer bound chaincode folder\ncp -R ./samplecc ../fabric-samples/chaincode/\n\n# go to the source cc folder\ncd ../fabric-samples/chaincode/samplecc/\n\n# test build\ngo build \n\n# no news is good news :)\n```\n\n### Run the chaincode\n```\n# back to pifabric folder\ncd ../../../pifabric\n\n# * Run Once *\n# install chaincode\n# Two options\n# run this and note the version value -v 0 zero in this case\ndocker exec cli peer chaincode install -n samplecc -v 0 -p github.com/samplecc\n\n# or this\n./1.installcc.sh\n\n# a successful installation result\n2020-02-25 02:44:51.088 UTC [chaincodeCmd] checkChaincodeCmdParams -\u003e INFO 001 Using default escc\n2020-02-25 02:44:51.088 UTC [chaincodeCmd] checkChaincodeCmdParams -\u003e INFO 002 Using default vscc\n2020-02-25 02:44:51.859 UTC [chaincodeCmd] install -\u003e INFO 003 Installed remotely response:\u003cstatus:200 payload:\"OK\" \u003e\n\n# * Run Once *\n* invoke chaincode\n# requires privileged sudo access for accessing \n# the sensor functions to initiate the chaincode\n# it also saves the first sampling in the ledger\n./2.initcc.sh\n\n# Run as many times as needed\n# sample the sensor temp in Celsius and humidity %\n# append to the ledger\n./3.invokecc.sh\n\nx.x.x.x, 22.50,51.60\n^[34m2020-02-25 19:22:55.636 UTC [chaincodeCmd] InitCmdFactory -\u003e INFO 001^[0m Retrieved channel (mychannel) o\nrderer endpoint: orderer.example.com:7050\n^[34m2020-02-25 19:22:55.648 UTC [chaincodeCmd] chaincodeInvokeOrQuery -\u003e INFO 002^[0m Chaincode invoke succes\nsful. result: status:200\n\n# use watch to get a few samplings\nwatch -n 5 ./3.invokecc.sh\n\nEvery 5.0s: ./3.invokecc.sh                                                   ubuntu: Tue Feb 25 19:24:11 2020\n\nx.x.x.x, 22.50,51.50\n^[34m2020-02-25 19:24:14.465 UTC [chaincodeCmd] InitCmdFactory -\u003e INFO 001^[0m Retrieved channel (mychannel) o\nrderer endpoint: orderer.example.com:7050\n^[34m2020-02-25 19:24:14.477 UTC [chaincodeCmd] chaincodeInvokeOrQuery -\u003e INFO 002^[0m Chaincode invoke succes\nsful. result: status:200\n\n# access results from the CouchDB instance\n# from any browser within the same access subnet\n# run and select the eth0 or wifi \nip r\n\ndefault via 192.168.2.1 dev eth0 proto static\n172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown\n172.27.0.0/16 dev br-32a73e9a7d3b proto kernel scope link src 172.27.0.1\n192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.242\n\n# in this case, it's the 192.168.2.242 and 5984\n# the port also shows when executing docker ps and checking out the docker port\n```\n#### http://192.168.2.242:5984/_utils/\nclick on \n**mychannel_samplecc**\nthe ledger for the mychannel to view the saved readings\n\nYou may explore more with the [Fabric tutorials for chaincode development](https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorials.html)\n\n### Testing with concurrent chaincode calls \n#### 4 chaincode invoking processes in a single Pi4 4Gg Ram edition\n\nLaunched 4 [watch](https://linux.die.net/man/1/watch) processes, each invoking the samplecc chaincode with sensor readings every 5, 7, 10, and 20 seconds appears to put no pressure on the latest Pi rendition. \n\nGranted that this is among the simplest blockchain offerings, it is still no small feat for a $65 board to pull through with a low CPU energy profile. The is the  basic network--a single organization blockchain with a single peer, orderer, transaction endorser and CouchDB ledger database featuring the Solo consensus algorithm all runnning in docker containers. All portrayed sessions are employing ssh. In fact, it appears that the single sensor interface contention among the 4 processes appears to consume the most CPU resources.![4 ssh connections ](img/4-nodes-invoking-chaincodes.png)\n  \n #### How can you view the accumulated ledger data?\n \n Hyperledger Fabric offers the CouchDB document database (besides other lesser sophisticated options) for all its ledger (world state) and private data collections. Looking at the Pi's CouchDB exposed port at 5984 the channel's ledger is a document collection. You may choose among 3 viewing options: List, Metadata and Json, i.e., shown here![CouchDB](img/2-chaincodes-ledger-records.png)\n \n #### IoT Blockchain Data Analytics.\n \n By offering easy data export, Hyperledger Fabric offers a no-hassle data-friendly IoT blockchain platform. The data may be exported with ease in json format for subsequent machine-learning platforms ingestion. While this exercise, did not demonstrate Fabric's chaincode query capabilities, one may view documentation for performing state or more productive document-based queries.![exported data](img/full-ledger-by-4-nodes.png)\n \n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblewater%2Fpifabric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblewater%2Fpifabric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblewater%2Fpifabric/lists"}